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

Add GPDI pins to ulx3s.py #103

Merged
merged 2 commits into from Nov 24, 2020
Merged

Add GPDI pins to ulx3s.py #103

merged 2 commits into from Nov 24, 2020

Conversation

GuzTech
Copy link
Contributor

@GuzTech GuzTech commented Aug 10, 2020

This adds the GPDI pins to the ULX3S platform. The constraints were taken from https://github.com/emard/ulx3s-misc/blob/master/constraints/ulx3s_v20.lpf

This adds the GPDI pins to the ULX3S platform. The constraints were taken from https://github.com/emard/ulx3s-misc/blob/master/constraints/ulx3s_v20.lpf
@whitequark
Copy link
Member

What is "GPDI"?

@GuzTech
Copy link
Contributor Author

GuzTech commented Aug 11, 2020

It is the HDMI port (but it's called the General Purpose Differential Interface for licensing reasons).

@awygle
Copy link
Contributor

awygle commented Aug 14, 2020

It would be nice to be consistent with other HDMI resources, even if the name is different. That would mean collecting the signals into a single Resource with Subsignals. I think the Arty Z7 offers the most complete example:

        Resource("hdmi_rx", 0,                                  # J10
            Subsignal("cec", Pins("H17", dir="io")),
            Subsignal("clk", DiffPairs("N18", "P19", dir="i"),
                Attrs(IOSTANDARD="TMDS_33")),
            Subsignal("d",   DiffPairs("V20 T20 N20", "W20 U20 P20", dir="i"),
                Attrs(IOSTANDARD="TMDS_33")),
            Subsignal("hpd", Pins("T19", dir="o")),
            Subsignal("scl", Pins("U14", dir="io")),
            Subsignal("sda", Pins("U15", dir="io")),
            Attrs(IOSTANDARD="LVCMOS33")),

Can you please make this resource follow this style?

@GuzTech
Copy link
Contributor Author

GuzTech commented Aug 14, 2020

Since the GPDI HDMI port is directly connected to the FPGA and can therefore be used as a source as well as a sink, do you think it would be better to define a single resource as bidirectional, or as two separate resources (one for rx, one for tx)?

@awygle
Copy link
Contributor

awygle commented Aug 14, 2020

The convention (derived from the atlys.py and supercon19badge.py files) appears to be a single resource. Compare/contrast:

        Resource("hdmi", 2, # J3, input only due to on board buffer, HDMI A connector
            Subsignal("scl",     Pins("M16"), Attrs(IOSTANDARD="I2C")),
            Subsignal("sda",     Pins("M18"), Attrs(IOSTANDARD="I2C")),
            Subsignal("clk",     DiffPairs("H17", "H18", dir="i")),
            Subsignal("d",       DiffPairs("K17 L17 J16", "K18 L18 J18", dir="i")),
            Attrs(IOSTANDARD="TMDS_33"),
        ),
        Resource("hdmi", 3, # JA, input/output as it is unbuffered, HDMI D connector
            Subsignal("scl",     Pins("C13"), Attrs(IOSTANDARD="I2C")),
            Subsignal("sda",     Pins("A13"), Attrs(IOSTANDARD="I2C")),
            Subsignal("clk",     DiffPairs("T9", "V9")),
            Subsignal("d",       DiffPairs("R3 T4 N5", "T3 V4 P6")),
            Attrs(IOSTANDARD="TMDS_33"),
        ),

@GuzTech
Copy link
Contributor Author

GuzTech commented Aug 14, 2020

All right, one resource it is. In your first example, the directions are explicit, but in the second one they are implicit for "hmdi, 3". Which one is preferred?

@awygle
Copy link
Contributor

awygle commented Aug 14, 2020

I'd recommend being explicit, I think it causes less confusion down the line.

@daveshah mentioned that the top bank of the ECP5 only support differential outputs, so make all differential pairs outputs.
@awygle
Copy link
Contributor

awygle commented Aug 14, 2020

Thanks a lot! This looks good to me now, when whitequark gets back from vacation we'll see what she says :)

@whitequark whitequark merged commit 895b4e1 into amaranth-lang:master Nov 24, 2020
@whitequark
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants