Commit Graph

579 Commits

Author SHA1 Message Date
David Sawatzke 71cb365bc5 mac/sram: Handle endianness only in sram 2021-09-29 18:35:19 +02:00
enjoy-digital 40f22569a7
Merge pull request #77 from david-sawatzke/64bitmacpath
Add 64 bit support to mac pipeline
2021-09-27 17:28:03 +02:00
enjoy-digital 6fbb10abfb
Merge pull request #75 from lschuermann/dev/sram-wishbone-adjdw
mac/{sram,wishbone}: remove assumptions about 32-bit dw and add SRAM to Wishbone dw conversion
2021-09-27 17:25:27 +02:00
enjoy-digital 7847f72c6b
Merge pull request #74 from david-sawatzke/32bitmacpath
Add toggleable 32 bit support to mac pipeline
2021-09-27 17:22:51 +02:00
Florent Kermarrec 8733aecf89 liteeth_gen: Minor cleanups/simplifications. 2021-09-27 17:12:14 +02:00
Florent Kermarrec 5358234720 liteth_gen: Remove calls to add_csr (no longed required). 2021-09-27 17:02:23 +02:00
enjoy-digital bdff760128
Merge pull request #81 from ozbenh/gen-py-fixes
gen.py fixes
2021-09-27 17:00:17 +02:00
enjoy-digital 734d948665
Merge pull request #78 from lschuermann/dev/phy-gmii-model
phy/gmii: add model parameter to skip clock buffers & generation
2021-09-27 16:58:26 +02:00
enjoy-digital bcb1946711
Merge pull request #76 from lschuermann/dev/xgmii-phy
Add 64-bit XGMII PHY implementation for 10G Ethernet
2021-09-27 16:53:29 +02:00
Leon Schuermann 62855e14f6 mac/wishbone: support smaller Wishbone data width than SRAM dw
Adds a wishbone.Converter between the SRAM Wishbone slave and the
wishbone.Decoder connected to the SoC bus, to support SRAM data widths
larger than the system bus Wishbone data width. This is important to
be able to run a 32-bit SoC with a 64-bit MAC data path and SRAM
storage.

Signed-off-by: Leon Schuermann <leon@is.currently.online>
2021-09-27 08:26:06 +02:00
Leon Schuermann e6a4c2a2f6 mac/sram: support data widths larger than 32 bit
This removes various assumptions about having a 32 bit data width in
the SRAM module. Especially the last_be encoding and decoding have
been seperated into a module, which generates the one-hot encodings
and decodings on the fly.

Signed-off-by: Leon Schuermann <leon@is.currently.online>
2021-09-27 08:26:06 +02:00
Benjamin Herrenschmidt 63ff6f47e7 gen: Add clock constraints
Otherwise the generated verilog is missing necessary "keep" attributes

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2021-09-24 12:19:10 +10:00
Benjamin Herrenschmidt f2032a4227 Remove clock asserts
They aren't strictly necessary, especially since the MAC can have
a wider data path and thus cope with running slightly slower

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2021-09-23 12:24:58 +10:00
Florent Kermarrec 1db5299a62 core/ip: Simplify. 2021-09-22 18:59:48 +02:00
Florent Kermarrec e2eb74f704 core/icmp: Simplify. 2021-09-22 18:36:03 +02:00
Florent Kermarrec 33322ad80f core/arp: Simplify IDLE state. 2021-09-22 18:35:48 +02:00
Florent Kermarrec 4cadf912f2 bench/arty:bench/arty: Add UDP Streamer example with UDP TX stream from Switches. 2021-09-22 18:21:20 +02:00
Florent Kermarrec c7aa4e50f4 frontend/stream/LiteEthStream2UDPTX: Fix/Simplify no FIFO case. 2021-09-22 18:05:59 +02:00
Florent Kermarrec a26608f30f bench/arty: Add UDP Streamer example with UDP RX stream redirected to Leds.
Tested with:
./arty.py --build --load
./test_udp_streamer.py --leds
2021-09-22 17:06:27 +02:00
Florent Kermarrec a6298975bd core/udp: Simplify LiteEthUDPTX. 2021-09-22 16:54:41 +02:00
Florent Kermarrec 8f05e72f99 frontend/etherbone: Simplify code. 2021-09-22 16:45:37 +02:00
Florent Kermarrec bee34ee955 core/udp: Simplify LiteEthUDPRX and make sure to drop exceeding payload. 2021-09-22 16:32:47 +02:00
Benjamin Herrenschmidt 9b3837e636 Allow "device" to be specified in yaml
Otherwise we don't get the DDROutput overrides and the standalone
core fails to generate when using GMII_MII

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2021-09-22 22:27:30 +10:00
Benjamin Herrenschmidt cccc0c720a Add support for GMII_MII PHY to gen.py
It was missing. It's useful for Wukong

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2021-09-22 22:27:25 +10:00
Florent Kermarrec 393158f2a5 frontend/stream/LiteEthUDP2StreamRX: Pass last signal from Sink to Source. 2021-09-22 12:05:09 +02:00
Florent Kermarrec 9b88c0f299 frontend/stream: Apply convert_ip to ip_address. 2021-09-22 11:14:01 +02:00
Florent Kermarrec 27a0b99e54 common: Improve convert_ip to automatically detect passed format.
Simplify use in the code.
2021-09-22 11:13:33 +02:00
Florent Kermarrec e39fec240b CONTRIBUTORS: Update. 2021-09-15 14:49:06 +02:00
Florent Kermarrec 8e059b5124 phy/s6rgmii: Remove IBUF (ISE seems to have trouble with it). 2021-09-13 19:31:29 +02:00
Leon Schuermann 109002985a phy/gmii: add model parameter to skip clock buffers & generation
To support a simple GMII simulation, skip clock generation and buffer
logic. This allows to operate a GMII interface over sys_clk. Proper
GMII clocking support can still be added in the simulation, this
should work when setting model = False.

It also sets an attribute "model" such that we can avoid adding
Platform constraints in the rest of the ecosystem (such as
litex/litex/soc/integration/soc.py, add_ethernet and add_etherbone).

Signed-off-by: Leon Schuermann <leon@is.currently.online>
2021-09-01 20:30:51 +02:00
David Sawatzke c30abbdd60 mac/last_be: Adjust for dw≠8
In that case, last_be needs to be passed through

last_be also is now longer than 1
2021-08-18 13:54:12 +02:00
Leon Schuermann 9b38fd8df3 mac/preamble: Fix inserter to work for 64 bit
On vivado at least

Co-authored-by: David Sawatzke <d-git@sawatzke.dev>
2021-08-17 19:23:35 +02:00
David Sawatzke 033d2a570b mac/crc: Add 64 bit support to checker 2021-08-17 19:23:35 +02:00
David Sawatzke eeee9a1173 mac/crc: Add 64 bit support to inserter 2021-08-17 19:23:35 +02:00
Leon Schuermann ea55332d26 Add 64-bit XGMII PHY implementation for 10G Ethernet
Adds support for 64-bit wide XGMII PHYs in LiteEth. A 64-bit wide
XGMII data path is a common method to interconnect multi-gigabit
Ethernet inside FPGAs. This module expects a 64-bit MAC data path,
which is to be added later. It has been tested locally using a
rewritten XGMII module for the LiteX simulator as well as on a KCU116
board.

This work has been inspired by enjoy-digital/liteeth#21 but is
entirely rewritten using Migen FSMs and with respect to
IEEE802.3-2018. Thanks to Florent Kermarrec (@enjoy-digital) and Vamsi
Vytla (@jersey99) for providing the base implementation.

This implementation does not yet support proper 32-bit (DDR) XGMII
PHYs, although support can be easily added by an additional module
which performs the DDR encoding / decoding of the data respectively.

Signed-off-by: Leon Schuermann <leon@is.currently.online>
2021-08-17 17:31:43 +02:00
David Sawatzke fd827a545c mac/crc: Simplify MACCRC32
Since only the reg of the widest engine is needed, the rest can be
removed

reverse_bits is also a bit more readable

The range for the engine data could be removed, but it's more
understandable this way
2021-08-12 18:38:06 +02:00
David Sawatzke 5d51806d6e mac: Add endian converter if big endian for dw > 8 2021-08-12 18:38:06 +02:00
David Sawatzke 4119012b84 mac/core: Move gap into switchable domain & cleanup 2021-08-12 18:38:06 +02:00
David Sawatzke ef214571d5 mac/core: Move preamble into switchable domain 2021-08-12 18:38:06 +02:00
David Sawatzke 688011f936 mac/preamble: Fix inserter to work for 32/64 bit
The signal won't get wider in the 8 bit case, since max moves from 6 to
7
Untested for 64 bit
2021-08-12 18:38:06 +02:00
David Sawatzke 8c72362385 mac/preamble: Add 32/64 bit support in checker
Only tested for 32/8 bit
2021-08-12 18:38:06 +02:00
David Sawatzke 811722cbaa mac/core: Move crc into switchable domain 2021-08-12 18:38:06 +02:00
David Sawatzke 3f695a8320 mac/crc: Implement 32 bit support in inserter 2021-08-12 18:38:06 +02:00
David Sawatzke 03e847e90b mac/crc: Implement 32 bit support in checker 2021-08-12 18:38:06 +02:00
David Sawatzke 7306c58ac8 mac/crc: Adjust crc generator/checker for last_be
Since the data can end at any sub-byte, just a 32 bit mac wouldn't work
2021-08-12 18:38:06 +02:00
David Sawatzke 8b8dae9fac mac/core: Separate crc and premable block
So it can be more easily moved later on
2021-08-11 12:31:48 +02:00
David Sawatzke be492e32de mac/core: Add parameter to change processing domain
Per default, the processing should occur with sys_clk and dw, instead of
the phy parameters since it's not that much larger and allows for easier
timing requirements. But on some fpgas saving the few gates could be desirable
2021-08-11 12:31:44 +02:00
David Sawatzke 3e7979920a mac/padding: Add 32 bit support to inserter
*Should* also work for 16/64 bit
2021-08-11 12:30:49 +02:00
David Sawatzke 0fb14d3c3f mac/core: Extract data path converter into separate function
Allows it to be easily movable later on, as we move more into the sys
clk & dw path
2021-08-11 12:30:49 +02:00
enjoy-digital c6c8be703b
Merge pull request #73 from antmicro/row-hammer
liteeth/phy: add configurable hw reset duration
2021-08-11 09:35:24 +02:00