verilog-ethernet icon indicating copy to clipboard operation
verilog-ethernet copied to clipboard

Add VC707 board example

Open jrrk2 opened this issue 1 year ago • 13 comments

Here is an example, based on KC705, adapted for VC707 which uses the same PHY but hardwired for SGMII.

Feel free to ignore since this board is not available anymore.

jrrk2 avatar Mar 08 '24 15:03 jrrk2

Have you tested code in board ?

kavyash15 avatar Jan 03 '25 04:01 kavyash15

I have this board but only the most rudimentary test was carried out, i would not have submitted the pull request untested. However with the passage of time i do not know if it would still work with the latest Vivado.

jrrk2 avatar Jan 03 '25 07:01 jrrk2

I am working on modifying the code for a different board, so I wanted to know about the testing cases and scenarios that can be done to test working of the modified code. When I connected the board directly to the PC using ethernet and used netcat comand as mentioned( after entering the command i gave "hi" input and pressed enter) it was blank and it did not echo back the message i sent.

kavyash15 avatar Jan 03 '25 09:01 kavyash15

Depending on the MAC address of your board, you might have to set up a static route from the chosen IP to the chosen MAC address. You can use the route add command on Linux for this, if you have Windows I don't know how to do it. You might find it helpful to have Wireshark running to snoop on any traffic and try to figure out what is happening. My modification is totally specific to the exact PHY on the VC707, check what PHY you have, one of the existing projects might be closer to what you have.

jrrk2 avatar Jan 03 '25 09:01 jrrk2

The board has KSZ9031RNX PHY( datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/00002117F.pdf ), but it didnot seem to have a MAC address as far as I refered datasheets. Should we need to configure the MAC address ourselves Screenshot from 2025-01-03 15-37-53 ?

kavyash15 avatar Jan 03 '25 10:01 kavyash15

I am using Nexys Video fpga board for reference, and it says it responds to ARP requests, but after i statically route, it ain't responding to the ARP messages

kavyash15 avatar Jan 03 '25 10:01 kavyash15

Yes, the MAC address needs to be set manually or from an EEPROM which is hardware dependent. Linux will not generate ARP messages if a static route is present already.

jrrk2 avatar Jan 03 '25 11:01 jrrk2

yes the MAC address for the fpga board is set already in the code, Is there any way to route the mac address ? isnt the route add command used to route ip address?

kavyash15 avatar Jan 04 '25 08:01 kavyash15

My recommendation is to slap an ILA on the RX side of the MAC and see what's going on there.

alexforencich avatar Jan 04 '25 08:01 alexforencich

there is more than one type of routing table, to associate an IP with a particular MAC address you can use:

arp -s address hw_addr

this is assuming that your ethernet card is on the same subnet

jrrk2 avatar Jan 04 '25 09:01 jrrk2

Thanks!, i set it up, but it aint replying back, so will use ila

kavyash15 avatar Jan 04 '25 10:01 kavyash15

@jrrk2 @alexforencich thankyou so much for your help, it works now !!! I have not added mdio functionality though but it echo back packets

kavyash15 avatar Jan 07 '25 10:01 kavyash15

well done, the MDIO functionality is optional as most PHYs default to autonegotiation, however you can detect additional conditions such as the cable being unplugged.

jrrk2 avatar Jan 07 '25 10:01 jrrk2