Skip to content

Add serdes resources to Versa ECP5 boards #254

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions amaranth_boards/versa_ecp5.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ class VersaECP5Platform(LatticeECP5Platform):
Resource("pclk", 0, DiffPairs("A4", "A5", dir="i"),
Attrs(IO_TYPE="LVDS")),

# SerDes connections.
Resource("serdes", 0,
Subsignal("rx", DiffPairs("Y5", "Y6")),
Subsignal("tx", DiffPairs("W4", "W5")),
),
Resource("serdes", 1,
Subsignal("rx", DiffPairs("Y8", "Y7")),
Subsignal("tx", DiffPairs("W8", "W9")),
),
Copy link
Member

Choose a reason for hiding this comment

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

I think the reason I didn't add these resources originally is because:

  1. The two channels of a SerDes are not interchangeable so provided you are using a given dual, there is completely zero point in constraining anything as it will not result in any change to the netlist (but it might cause a placement error);
  2. Early on, nextpnr did not even support constraining SerDes instances via their pins;
  3. Most of the time you pick the dual by its explicit location on die, not by its pins.

However I don't object to merging it either. (The comment seems useless since it is fully implied by the code below it.)

Copy link
Author

Choose a reason for hiding this comment

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

You are totally right, this is somewhat sketchy since ther serdes pins are fixed on ECP5 anyway.
The Luna ECP5 serdes implementation uses these for building with Diamond and the comment says it does not work without. I guess I will find out later if it is really required. For the time being my local package is good enough for testing.


*LEDResources(pins="E16 D17 D18 E18 F17 F18 E17 F16", invert=True,
attrs=Attrs(IO_TYPE="LVCMOS25")),

Expand Down