Code Monkey home page Code Monkey logo

Comments (10)

enjoy-digital avatar enjoy-digital commented on July 1, 2024

Ethernet has not been tested yet in an Intel platform. The design your created seems fine:

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.

AnttiLukats avatar AnttiLukats commented on July 1, 2024

rx packets are visible, TX not in wireshark, not sure yet why. maybe phy problem, checking

from litex-boards.

enjoy-digital avatar enjoy-digital commented on July 1, 2024

The issue with the AsyncResetSynchronizer was probably the polarity, it should be fixed with enjoy-digital/litex@0ba9ab9.

from litex-boards.

AnttiLukats avatar AnttiLukats commented on July 1, 2024

ok, I see TX_EN being activated then also TX_DATA for the transmit packet, but still nothing in wireshort, weird..

from litex-boards.

AnttiLukats avatar AnttiLukats commented on July 1, 2024

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.

enjoy-digital avatar enjoy-digital commented on July 1, 2024

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.

AnttiLukats avatar AnttiLukats commented on July 1, 2024

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.

AnttiLukats avatar AnttiLukats commented on July 1, 2024

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.

enjoy-digital avatar enjoy-digital commented on July 1, 2024

OK thanks, i just opened enjoy-digital/litex#239 to be sure fix that.

from litex-boards.

enjoy-digital avatar enjoy-digital commented on July 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.