-
Notifications
You must be signed in to change notification settings - Fork 1
Add finedelay test procedure #17
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| Test the finedelay | ||
| ================== | ||
|
|
||
| 1. Plug two LVDSOUT pins to an oscilloscope and use rising edge of LVDSOUT1 | ||
| as trigger. | ||
|
|
||
| 2. Enable CLOCK1, set its period to the minimum(0.016us) and use it as input for | ||
| LVDSOUT1 and LVDSOUT2. | ||
|
|
||
| .. image:: ../images/finedelay_test_layout.png | ||
|
|
||
| 3. Set oct delay and fine delay to 0 in both LVDSOUTs. | ||
|
|
||
| 4. For LVDSOUT2, set oct delay from 1 to 7 and verify in the oscilloscope that | ||
| you get delays from 1ns to 7ns respectively, then set oct delay back to 0. | ||
|
|
||
| 5. Read initial one ns of LVDSOUT2 and use it as a reference to test fine delay. | ||
|
|
||
| 5.1 Set fine delay to half of initial one ns and verify in the oscilloscope | ||
| that the delay is around 500ps. | ||
|
|
||
| 5.2 Set fine delay to a quarter of initial one ns and verify in the | ||
| oscilloscope that the delay is around 250ps. | ||
|
|
||
| 5.3 .... Repeat halving until you reach the limit of your oscilloscope ... | ||
|
|
||
| 6. Run a script_ that sweeps all fine delay values for each oct delay value and | ||
| observe how LVDSOUT2 gets delayed very smoothly. | ||
|
|
||
| .. _script: https://raw.githubusercontent.com/PandABlocks/PandABlocks.github.io/refs/heads/main/scripts/finedelay-sweep.py | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #!/usr/bin/env python | ||
| import argparse | ||
| import socket | ||
| import time | ||
|
|
||
|
|
||
| def parse_args(): | ||
| parser = argparse.ArgumentParser() | ||
| parser.add_argument('host') | ||
| return parser.parse_args() | ||
|
|
||
|
|
||
| def main(): | ||
| args = parse_args() | ||
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
| s.connect((args.host, 8888)) | ||
| for wide in range(8): | ||
| s.sendall(f'LVDSOUT2.OCT_DELAY={wide}\n'.encode()) | ||
| assert s.recv(32) == b'OK\n' | ||
| time.sleep(0.5) | ||
|
|
||
| for wide in range(8): | ||
| s.sendall(f'LVDSOUT2.OCT_DELAY={wide}\n'.encode()) | ||
| assert s.recv(32) == b'OK\n' | ||
| for fine in range(512): | ||
| s.sendall(f'LVDSOUT2.FINE_DELAY={fine}\n'.encode()) | ||
| assert s.recv(32) == b'OK\n' | ||
| time.sleep(0.01) | ||
|
|
||
| time.sleep(1) | ||
| s.sendall('LVDSOUT2.OCT_DELAY=0\n'.encode()) | ||
| s.sendall('LVDSOUT2.FINE_DELAY=0\n'.encode()) | ||
| s.close() | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| main() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This link will become valid after merging