Commit graph

85 commits

Author SHA1 Message Date
Florent Kermarrec
2f4964cf56 phy: Add initial Ultrascale+ 1000BaseX PHY. 2021-07-02 12:59:00 +02:00
Jędrzej Boczar
dbc0b75178 phy/s7rgmii: add configurable iodelay_clk_freq 2021-04-27 10:59:27 +02:00
Shawn Hoffman
17f6dca544 Revert "phy/ecp5rgmii: remove p_DEL_MODE (not required since we specify DEL_VALUE)."
This reverts commit 5247a2008a.
2021-03-29 11:31:54 -07:00
Florent Kermarrec
7448170390 liteth/phy/rmii: add support for ref_clk as input.
In some hardware, ref_clk can be input for both the MAC and the PHY. In this
case, setting refclk_cd to None will make the CRG use ref_clk as the RMII
input reference clock:

Pads:
# RMII Ethernet
("eth_clocks", 0,
    Subsignal("ref_clk", Pins("D17")),
    IOStandard("LVCMOS33"),
),
("eth", 0,
    Subsignal("rst_n",   Pins("F16")),
    Subsignal("rx_data", Pins("A20 B18")),
    Subsignal("crs_dv",  Pins("C20")),
    Subsignal("tx_en",   Pins("A19")),
    Subsignal("tx_data", Pins("C18 C19")),
    Subsignal("mdc",     Pins("F14")),
    Subsignal("mdio",    Pins("F13")),
    Subsignal("rx_er",   Pins("B20")),
    Subsignal("int_n",   Pins("D21")),
    IOStandard("LVCMOS33")
),


PHY:

self.submodules.ethphy = LiteEthPHYRMII(
    clock_pads = self.platform.request("eth_clocks"),
    pads       = self.platform.request("eth"),
    refclk_cd  = None)

Thanks @mwick83 for reporting the use case and for the initial implementation.
2020-12-28 11:32:11 +01:00
Florent Kermarrec
dea35908c9 phy/rmii: add refclk_cd parameter (to select reference eth clock domain) and make clock_pads optional. 2020-12-23 11:00:25 +01:00
Florent Kermarrec
291b257eb4 phy/crg: make rst_n optional on all PHYs and minor cleanup. 2020-11-23 16:24:44 +01:00
Florent Kermarrec
5247a2008a phy/ecp5rgmii: remove p_DEL_MODE (not required since we specify DEL_VALUE). 2020-11-23 12:16:07 +01:00
Greg Davill
6ee11edb87 phy/ecp5rgmii: Fix io delay blocks
For correct io delays in nextpnr the DEL_VALUE parameter needs to
be an integer, instead of the "DELAY{}" string.

The use of a "DELAY{}" string appears in the Lattice primitive
manual, but appears to be incorrect. At least based of the current
nextpnr.

Because we are not making use of dynamic io delays here we can
also use the simpler DELAYG block instead of DELAYF.

Fixes #50
2020-10-11 15:16:58 +10:30
Florent Kermarrec
54acf9fd76 phy/pcs_1000basex: keep up to date with MiSoC (adds SGMII and 10/100Mbps support).
3768f5acc1
2020-08-24 22:14:35 +02:00
Florent Kermarrec
64b85e621e add SPDX License identifier to header and specify file is part or LiteEth.
Artix7/Ultrascale 1000BaseX is reused from MiSoC/LiteEthMini, specify it.
2020-08-23 16:07:12 +02:00
Florent Kermarrec
0feed1720d phy/gmii/CRG: add BUFG on RX and do the TX clock Mux with combinatorial logic (from @skiphansen initial work).
This makes clocking more flexible and allows routing on more boards (ex: Pano Logic G2). Since TX clocking
does not need clock phase relationship with the input clock using a combinatorial path is fine.
2020-05-29 10:39:18 +02:00
Florent Kermarrec
8afdec936d phy/ecp5rgmii: review/simplify inband_status integration.
For now keep it specific to ECP5, we'll integrate this soon on the others PHYs,
but some other refactoring/merging is required before.
2020-05-19 09:41:09 +02:00
Shawn Hoffman
26c4e41b96 ecp5rgmii: enable reading inband PHY_status 2020-05-11 03:01:50 -07:00
Florent Kermarrec
dc67e6d070 phy/ecp5rgmii: use DDROutput/DDRInput now available for ECP5. 2020-04-22 10:14:36 +02:00
Florent Kermarrec
3bd807cf8f litex.build: update from migen.genlib.io litex.build.io. 2020-04-10 09:20:41 +02:00
Florent Kermarrec
fb478537e7 phy/gmii: use a BUFG between eth_rx.clk and eth_rx.clk.
This makes it Xilinx specific, but without it ISE simplifies this as a single signal
(which is fine) but is not able to keep track of the "keep" attribute of both signals
and fails applying the constraints.
2020-03-25 12:40:02 +01:00
Florent Kermarrec
32d4af1148 phy/__init__: import all phys. 2020-03-01 20:13:23 +01:00
Florent Kermarrec
b2e12724cc phy: add tx/rx_clk_freq to phys (useful to add an add_ethernet method in LiteX and simplify timing constraints). 2020-03-01 19:10:39 +01:00
Florent Kermarrec
fcadd60cea liteeth/gen: initial switch to YAML config file (similar to LiteDRAM/LitePCIe) 2020-02-12 00:18:22 +01:00
Florent Kermarrec
f532a12b40 phy/common: use CSRField for MDIO registers 2020-01-28 10:43:33 +01:00
Florent Kermarrec
8edf4f3f9a phy/1000basex: cleanup primitive instances, use Open signal class on open ports, polish code comments 2020-01-28 10:43:08 +01:00
Florent Kermarrec
de40a66873 phy/gmii: cleanup BUFGMUX instance 2020-01-28 10:41:53 +01:00
Florent Kermarrec
983017a9ed phy/rgmii: cleanup primitive instances 2020-01-28 10:41:32 +01:00
Vamsi K Vytla
8ecaaf0546 phy/{s7,us}rgmii.py:
Recent modification that adds S7PLL that in return adds an AsyncResetSynchronizer inside XilinxClocking.

This actually creates a multi-driven net because there is another AsyncResetSync* being added in the Phys.

This change instantiates the PLL without a reset for now, leaving the CD reset intact.
2020-01-27 12:52:10 -08:00
Vamsi K Vytla
cd413c5c20 phy/usrgmii.py:
IDELAYE3 requires EN_VTC to be enabled for fixed mode time delay. This eliminates implementation time CRITICAL WARNINGs and ensures generating a bitfile.
2020-01-27 10:32:38 -08:00
Florent Kermarrec
3a54bf2b8b phy/rgmiis: uniformize a bit more 2020-01-18 00:24:40 +01:00
Florent Kermarrec
e41f06bbf2 phy: cleanup imports/dw 2020-01-17 23:19:56 +01:00
Florent Kermarrec
a48c78044e phy/s7rgmii/usrgmii: use S7PLL and USPLL 2020-01-17 23:08:38 +01:00
Vamsi K Vytla
c16e6b2d86 phy/ecp5rgmii.py: Missed moving dw as class variable here 2020-01-17 12:45:37 -08:00
Vamsi K Vytla
0a922bb2ad A few minor changes that help RGMII phy related debugging. {s6, s7, us}rgmii.py Make dw a class variable instead 2020-01-17 09:23:03 -08:00
Florent Kermarrec
17e228d4b0 phy/usrgmii: add configurable tx/rx_delay (2ns by default) 2020-01-17 09:24:35 +01:00
Florent Kermarrec
6270eb38d2 phy/s7rgmii: cleanup 2020-01-17 09:22:30 +01:00
Florent Kermarrec
ee4f8c0f34 phy/usrgmii: improve presentation 2020-01-17 09:15:51 +01:00
Florent Kermarrec
2bdae4e7bd phy/s7rgmii: add configurable tx/rx_delay (2ns by default) 2020-01-17 09:13:29 +01:00
Florent Kermarrec
aea81e19e9 phy/s7rgmii: improve presentation 2020-01-17 09:05:09 +01:00
Florent Kermarrec
2748e442a9 phy/s6rgmii: add configurable tx/rx_delay (2ns by default) 2020-01-17 09:03:34 +01:00
Florent Kermarrec
8fb0dae18a phy/s6rgmii: improve presentation 2020-01-17 08:57:52 +01:00
Florent Kermarrec
0cf9c2057d phy/ecp5rgmii: add configurable tx/rx_delay (2ns by default) 2020-01-17 08:54:31 +01:00
Florent Kermarrec
e5c4ee7065 phy/ecp5rgmii: improve presentation 2020-01-17 08:35:15 +01:00
Florent Kermarrec
73bd27b506 phy/s7rgmii: add 2ns delay on ctl/data 2020-01-16 15:46:13 +01:00
Florent Kermarrec
4d9e74f10a phy/usrgmii: cleanup (style, indent) 2019-09-28 22:16:07 +02:00
Vamsi K Vytla
59e04608a8 Adds RGMII phy support for Xilinx Ultrascale Devices. Hardware tested on HTG-940 2019-09-04 15:11:20 -07:00
Florent Kermarrec
ad187d35f2 add CONTRIBUTORS file and add copyright header to all files 2019-06-24 11:43:10 +02:00
Florent Kermarrec
b318300414 phy/ku_1000basex: keep tx/rx in reset until pll is fully reseted and locked 2019-04-11 21:51:09 +02:00
Florent Kermarrec
e6c35cdec8 phy/ku_1000basex: incease pll_reset 2019-04-10 15:38:21 +02:00
Florent Kermarrec
816f592469 phy: add initial ECP5RGMII PHY 2019-02-25 14:45:19 +01:00
Florent Kermarrec
77fa4bfb1e phy: add Kintex7 1000BaseX PHY 2019-01-22 19:40:32 +01:00
Florent Kermarrec
c2d8a467c9 phy: add Kintex Ultrascale PHY (copyright M-Labs Ltd) 2019-01-21 11:27:33 +01:00
Florent Kermarrec
d7fdcbb1dc phy: add Spartan6 RGMII PHY 2018-12-18 08:58:16 +01:00
Florent Kermarrec
c370e9f71f phy/model: remove creation/deletion of ethernet tap (now handled by the simulator) 2018-09-20 22:49:37 +02:00