-
Notifications
You must be signed in to change notification settings - Fork 106
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
Eye scan support #518
base: main
Are you sure you want to change the base?
Eye scan support #518
Conversation
Signed-off-by: Travis F. Collins <[email protected]>
Signed-off-by: Travis F. Collins <[email protected]>
Signed-off-by: Travis F. Collins <[email protected]>
Generated documentation for this PR is available at Link |
adi/jesd_internal.py
Outdated
|
||
lanes = {} | ||
|
||
def get_eye_data(self, lanes=None): |
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.
Not sure if this belongs into jesd_internal
This is a MxFE side JRX eye_scan and is specific to MxFE...
I would assume this should go into ad9081.py?
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.
I reorganized the inheritance so this will be only pulled in by MxFE
adi/jesd_internal.py
Outdated
_jesd_es_duration_ms = 100 | ||
_jesd_prbs = 7 | ||
|
||
_half_rate = {"mode": "Half Fate", "scale": 0.004} |
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.
Let's scale to mV for half rate the API already scales things.
So here we use 1.0
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.
Fixed
adi/jesd_internal.py
Outdated
_jesd_prbs = 7 | ||
|
||
_half_rate = {"mode": "Half Fate", "scale": 0.004} | ||
_quarter_rate = {"mode": "Quarter Rate", "scale": 0.001} |
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.
For quarter rate we need to scale until the API updates the next time.
So scale should be 4.0 here
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.
Fixed
adi/jesd_internal.py
Outdated
graph_helpers = { | ||
"xlim": [-info[1] / 2, info[1] / 2 - 1], | ||
"xlabel": "SPO", | ||
"ylabel": "EYE Voltage (V)", |
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.
Let's do mV instead
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.
Fixed
|
||
eye_data_per_lane = dev._jesd.get_eye_data() | ||
num_lanes = len(eye_data_per_lane.keys()) | ||
|
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.
I updated the driver to return -EINVAL if a physical lane is not used (virtually mapped)
So we could do:
def get_mapped_lanes(lanes):
mapped_lanes = []
for lane in lanes:
try:
dev._ctrl.debug_attrs["bist_2d_eyescan_jrx"].value = f"{lane} 7 1"
mapped_lanes.append(lane)
except:
continue
return mapped_lanes
all_lanes = ['0', '1', '2', '3', '4', '5', '6', '7']
lanes = get_mapped_lanes(all_lanes)
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.
I added some pieces around this. There was some confusion around the link naming in sysfs which always goes 0,1,2,... N which is not the actual lanes mapped index. This is handled now
Signed-off-by: Travis F. Collins <[email protected]>
Signed-off-by: Travis F. Collins <[email protected]>
62f1456
to
8e7a6f6
Compare
Signed-off-by: Travis F. Collins <[email protected]>
8494983
to
54c2a10
Compare
Add JESD eye scan helper functions and add JESD debug support to AD9081.