Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Eye scan support #518

wants to merge 6 commits into from

Conversation

tfcollins
Copy link
Collaborator

Add JESD eye scan helper functions and add JESD debug support to AD9081.

Copy link

Generated documentation for this PR is available at Link

Copy link

github-actions bot commented Jan 18, 2024

Unit Test Results

1 403 tests  +1      255 ✔️ ±0   9m 21s ⏱️ +4s
       1 suites ±0   1 147 💤 ±0 
       1 files   ±0          1 +1 

For more details on these failures, see this check.

Results for commit 54c2a10. ± Comparison against base commit 69b2d7a.

♻️ This comment has been updated with latest results.

@mhennerich mhennerich self-requested a review January 19, 2024 06:57

lanes = {}

def get_eye_data(self, lanes=None):
Copy link
Contributor

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?

Copy link
Collaborator Author

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

_jesd_es_duration_ms = 100
_jesd_prbs = 7

_half_rate = {"mode": "Half Fate", "scale": 0.004}
Copy link
Contributor

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

_jesd_prbs = 7

_half_rate = {"mode": "Half Fate", "scale": 0.004}
_quarter_rate = {"mode": "Quarter Rate", "scale": 0.001}
Copy link
Contributor

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

graph_helpers = {
"xlim": [-info[1] / 2, info[1] / 2 - 1],
"xlabel": "SPO",
"ylabel": "EYE Voltage (V)",
Copy link
Contributor

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

Copy link
Collaborator Author

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())

Copy link
Contributor

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)

Copy link
Collaborator Author

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

@tfcollins tfcollins requested a review from mhennerich January 26, 2024 16:44
Signed-off-by: Travis F. Collins <[email protected]>
@tfcollins tfcollins force-pushed the tfcollins/eye-diagram branch from 62f1456 to 8e7a6f6 Compare January 29, 2024 23:37
Signed-off-by: Travis F. Collins <[email protected]>
@tfcollins tfcollins force-pushed the tfcollins/eye-diagram branch from 8494983 to 54c2a10 Compare February 13, 2024 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants