Comments (10)
Ethernet has not been tested yet in an Intel platform. The design your created seems fine:
- https://github.com/micro-FPGA/litex-boards/blob/master/litex_boards/partner/platforms/c10lprefkit.py
- https://github.com/micro-FPGA/litex-boards/blob/master/litex_boards/partner/targets/c10lprefkit.py
Now since this is a configuration that hasn't been validated yet, there can be some small things to figure out.
While testing your design, it seems there is a first issue with AsyncResetSynchronizer on Intel platforms, since eth_tx/eth_rx clock domain are not toggling, for now you can workaround this by replacing https://github.com/enjoy-digital/liteeth/blob/master/liteeth/phy/mii.py#L86-L89 with:
self.comb += [
self.cd_eth_tx.rst.eq(reset),
self.cd_eth_rx.rst.eq(reset)
]
This allow having eth_tx/eth_rx toggling and fix the netboot freeze.
To see what is transmitted by the CPU and what is received, you can un-comment:
https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/libnet/microudp.c#L21-L22
RX packets seem corrects (i pinged the board while it was trying to netboot), but TX packets are not seen by Wireshark.
from litex-boards.
rx packets are visible, TX not in wireshark, not sure yet why. maybe phy problem, checking
from litex-boards.
The issue with the AsyncResetSynchronizer was probably the polarity, it should be fixed with enjoy-digital/litex@0ba9ab9.
from litex-boards.
ok, I see TX_EN being activated then also TX_DATA for the transmit packet, but still nothing in wireshort, weird..
from litex-boards.
tested both eth1 and eth2 with LiteX soc, no tx data ever seen, for some reason also not with phy loopback. Tested the PHY working using hamsterz arty ethernet transmit code, this worked instantly and transmit packet (no PHY registers accessed..) so the PHY works and can transmit
from litex-boards.
It's probably related to the edge where tx_data/tx_en is set. Can you do a test with by replacing:
https://github.com/enjoy-digital/liteeth/blob/master/liteeth/phy/mii.py#L76 with:
self.comb += self.cd_eth_tx.clk.eq(~clock_pads.tx)
from litex-boards.
I had tried already to insert "falling edge" flops to txdata and txen with no success inverting the tx_clk did also not make it work. whats even more strange changing main clock input from 12MHz to 25MHz input (in different bank) made the rx path to fail also? 25mhz clock is sync to the PHY reference clocks same source, while 12Mhz is async to the phy clocks. weird, doing more signaltap analyze
from litex-boards.
so simple, all solved. the tx_clk inversion is not needed. the problem was in SDC file generated it does try to timing constraints to PORTS while using internal clock net names, this causes those constraints to be ignored by Quartus, fix
in top.sdc
create_clock -name eth_rx_clk -period 80.0 [get_ports {eth1_clocks_rx}]
create_clock -name eth_tx_clk -period 80.0 [get_ports {eth1_clocks_tx}]
after that it all works, now I only need to figure out how to-do in python ;)
from litex-boards.
OK thanks, i just opened enjoy-digital/litex#239 to be sure fix that.
from litex-boards.
The best for now is to use this in your target file:
platform.add_period_constraint(platform.lookup_request("eth_clocks").tx, 1e9/12.5e6)
platform.add_period_constraint(platform.lookup_request("eth_clocks").rx, 1e9/12.5e6)
platform.add_false_path_constraints(
platform.lookup_request("clk12"),
platform.lookup_request("eth_clocks").tx,
platform.lookup_request("eth_clocks").rx
)
from litex-boards.
Related Issues (20)
- digilent_arty fails to build using f4pga due to dependency on unsupported features (DNA_PORT, XADC) HOT 4
- Sipeed Tang Nano 9k no Boot Message from SoC-Core HOT 4
- VCU128 DDR4 memory calibration failure HOT 13
- Error Related to csr.json File During Generation of Litex.resc and Litex.repl Files HOT 1
- qmtech_wukong: how do I add SPI? HOT 1
- arty 35t: SPI SDCard without PMOD HOT 1
- Sipeed Tang Nano 1k support HOT 2
- Nitefury board PCIe clock setting HOT 2
- ModuleNotFoundError: No module named 'litex' HOT 1
- efinix_titanium_ti60_f225_dev_kit: ethernet non functional
- Bitstream loading on ECPIX-5 board needs --cable ft4232 HOT 2
- Unable to replicate Analogue Pocket HOT 6
- Issues with cpu type rocket for terasic de2 115 HOT 1
- Mini901 Initial investigations - anyone interested ? HOT 1
- Sipeed Tang Mega 138k : SDRAM test failed. HOT 4
- How to make : Running Dual-Core RISC-V Linux on Cheap FPGA Board HOT 2
- limesdr_mini_v2 loading firmware: [LITEX-TERM] Got unexpected response from device 'b'\n'' HOT 7
- Sipeed Tang primer 20k : usb host test failed. HOT 5
- Sipeed Tang Primer 25k no serial out after successful flash HOT 4
- 5a-75b revision 8.2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from litex-boards.