-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SUServo: Coherent phase tracking mode #1467
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are really good ideas and valuable work here and most of it should probably ultimately land in ARTIQ. I'm happy to review them and merge them.
But I see no way to review this PR properly. We need to ensure that it doesn't break on the dozens of installations out there. It seems to be still far away from something mergeable. As I said before you have a much better chance of getting anything through by breaking it up into small PRs that can be reasoned about merged, and tested individually. I'm not saying the existing code is perfect or clean or should not be improved and fixed. But I think if we want to do that, we need a broader plan than this PR.
For example, one could suspect that the half-duplex changes are not backwards compatible breaking all existing users unless they upgrade the CPLD gateware (and that doesn't even have a PR yet). There seems to be no assessment of compatibility here. None of the changes are mentioned or explained in the RELEASE NOTES.
artiq/gateware/eem.py
Outdated
@@ -125,17 +126,17 @@ def io_qspi(eem0, eem1, iostandard="LVDS_25"): | |||
), | |||
] | |||
ttls = [(6, eem0, "io_update"), | |||
(7, eem0, "dds_reset_sync_in"), | |||
(7, eem0, "dds_reset_sync_in", Misc("IOB=TRUE")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As pointed out elsewhere, this leads to
CRITICAL WARNING: [Place 30-722] Terminal 'urukul5_dds_reset_sync_in_n' has IOB constraint set to TRUE, but it is either not connected to a FLOP element or the connected FLOP element could not be brought into the I/O
which indicates a problem. Please investigate and resolve that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The warning shows up since that patch was applied. "Seems to work for everyone" can't be our benchmark for robustness, correctness and maintainability. Yes. Let's discuss it there.
artiq/coredevice/suservo.py
Outdated
|
||
@kernel | ||
def measure_io_update_alignment(self, delay_start, delay_stop): | ||
"""Refer to artiq.coredevice.ad9910 :meth:`measure_io_update_alignment`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make an effort to adhere to the prevalent coding style.
artiq/coredevice/suservo.py
Outdated
@kernel | ||
def read32(self, addr): | ||
""" | ||
! This method returns only the .suservo.CPLD.rb_len least significant bits ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style.
@jordens Thank you for your feedback and agreeing to review our changes. I will break it up into even smaller pieces as you suggested. |
Thanks. Please close this PR once superseded. |
AFAICT it has not been superseded? |
Part 1 was superseded by #1782.
I can provide the patches for these two updates.
|
Requires a sufficiently up-to-date CPLD gateware.
This is prerequisite for phase coherent operation of SUServo. The I/O update alignment delays can be configured by writing to servo memory. The optimal io_update alignment delay and sync_in delay can be found using the existing AD9910 (overloaded) methods, relying on half-duplex CPLD readback capability.
Extension of the per-channel control interface by a flag en_pt, serving to enable coherent DDS phase mode. This works by tracking the DDS-internal phase accumulator as well as the servo runtime to calculate the POW accordingly. The reference time for this calculation can be set for each output channel individually in real time.
2421931
to
e643e47
Compare
@sbourdeauducq the source branch is now rebased on m-labs/master with the experimental var-urukuls patch applied. The new commits include all known fixups. |
Maybe we can copy the Urukul CPLD code into the ARTIQ repository? Then the experimental-features patches would also apply. |
Or just add the patch to nix-scripts and add a Hydra build for patched CPLD, I suppose there shouldn't be too many of those patches and it may not be worth the trouble/bloat associated with using the artiq repos for this. |
My instant reaction to this was |
hell no |
ARTIQ Pull Request
Description of Changes
SUServo upgrade:
en_pt
, serving to enable coherent DDS phase mode. This works by tracking the DDS-internal phase accumulator as well as the servo runtime to calculate the POW accordingly.ClockGen
phy. The optimal sync settings can be found using the existing method, relying on half-duplex CPLD readback capability.Related Issue
Resolves #1339
Type of Changes
Steps
All Pull Requests
git commit --signoff
, see copyright).Code Changes
flake8
to check code style (follow PEP-8 style).flake8
has issues with parsing Migen/gateware code, ignore as necessary.Documentation Changes
cd doc/manual/; make html
) to ensure no errors.Git Logistics
git rebase --interactive
). Merge/squash/fixup commits that just fix or amend previous commits. Remove unintended changes & cleanup. See tutorial.git show
).Licensing
Credits for this also to @dnadlinger !
See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.