enjoy-digital/colorlite

Server not responsive / what do I do with the ethernet port?

jadafi opened this issue · 20 comments

I am a bloody beginner, so this is probably very simple...
I was able to build and load. Flash gets stuck at 10% saying that a two read was not as expected. But from my understanding it should suffice to load the bitstream into the FPGA.
I get no response to the blink test. I think I have the ethernet cable plugged in incorrectly/something is not set up properly in that regard. Can I connect the Ethernet cable directly to the host PC or do I have to connect it to my LAN? When looking at the ethernet ports the left one is the one to use, right? In which order should I plug in, start client, load bitstream ?
I am sorry for all that confusion...

Hi @jadafi,

can you try to ping the board at 192.168.1.20 (default IP address: https://github.com/enjoy-digital/colorlite/blob/master/colorlite.py#L113) If this is not responding, can you try with the bitstream attached here: litex-hub/litex-boards#43 (comment)? (at 192.168.1.50 with this).

Once ping will be responding, the rest should work as described in the README.

I'm loosing all packets...

ping 192.168.1.50
PING 192.168.1.50 (192.168.1.50) 56(84) bytes of data.
^C
--- 192.168.1.50 ping statistics ---
225 packets transmitted, 0 received, 100% packet loss, time 229361ms

when capturing the packets at my ethernet card I get lots of ARP requests:

169	20.250407015	QiHardwa_00:00:00	Broadcast	ARP	60	Who has 192.168.1.100? Tell 192.168.1.50

Not quite sure but it seems like it searches for some 192.168.1.100 which is not present.

@jadafi: i'm not sure which bitstream you are running. (if it try to reach 192.168.1.100, it's probably more a bitstream with just the MAC and a CPU). Can you give more information: which version of the board are you using? which command are you using to build to bitstream? to load it?

Hey, I build the bitstream from https://github.com/litex-hub/litex-boards.git (the colorlight target) using multiple different build options.

Currently I am back to trying to get the bitstream from this (colorlite) repo to work. My current problem is that I do not have a ftdi at hand -> I am using a dirtyJtag to upload the bitstream. Is loading sufficient (--load) or do I have to write to flash (--flash)?

--load is sufficient yes.

Can I replace the load step by running (in the gateware folder): With BSDLLFE5U25FCABGA256.bsm in the same folder.

jtag 
jtag> bsdl path .
jtag> cable dirtyjtag
jtag> detect
jtag> svf colorlite.svf ref_freq=600000

Just to be sure: I have the ethernet cable directly connected to the PC. Is that correct?

@jadafi: sorry i'm not familiar with dirtyJtag. Having the Ethernet cable directly connected to the PC is fine yes. I think you first have to verify if you are able to load a bitstream correctly. To do so, you can try to replace https://github.com/enjoy-digital/colorlite/blob/master/colorlite.py#L85-L86 with:

counter = Signal(32)
self.sync += counter.eq(counter + 1)
self.comb += platform.request("user_led_n").eq(counter[26])

and then verify that after loading the bitsteam, the led is blinking correcly. Once ok, you can try to ping the board at the configured ip address.

Well It does blink, when I insert your code, but still no ping :/

Can you provide the generated bitstream? With the command that is used to generate it?

I am currently not in reach of my pc. Currently setting up a new machine. Pls stand by

Hi, did you get this running? Because I have the same problem, even with the prebuilt bitstream, the board won't respond to pings.

wlcx commented

No ping replies (or any network activity) here either. I am using:

  • colorlite b52aa38
  • latest litex
  • nextpnr-ecp5 93faa752
  • yosys Yosys 0.9+3624 (git sha1 4c925a32)
  • ecppack Version 1.0-176-gf93243b

I'm using a glasgow to program the svf, and get a blinking LED with the above snippet
I'm not sure if I'm messing something up in the build however - since I don't have an openocd compatible cable I am running:

  • /colorlite.py --ip-address=192.168.1.50 --flash which exits with an openocd error due to lack of cable
  • ./build_colorlite.sh in build/gateware
  • then flashing the resulting svf with a glasgow.

Hi @jadafi, @rednaz1337, @wlcx,

I just updated the design with 959f447 and tested it. An update was required to take into account the LiteEth fixes from enjoy-digital/liteeth#51.

Please find attached the .svf generated with: ./colorlite.py --build --load.

Note that this project uses a revision 7.0 of the ColorLight 5A-75B, it should be possible to run it on another revision, but maybe with minor adaptations.

Florent

colorlite_2020_11_23.zip

Hi,

I used the colorlite.svf in colorlite_2020_11_23.zip.
The led is blinking correctly while there is still not ping response.

Lin

Hi VisionShilin,

can you provide more information:

  • Is it a ColorLight 5A-75B revision 7.0?
  • Are you using the Ethernet port near the 5V connector?
  • How are you powering the board?
  • Can you try with the board directly connected to your computer? or be sure you are using a Gibabit Ethernet switch? (100Mbps is not supported by the ECP5 RGMII PHY).

Thanks

Hi VisionShilin,

can you provide more information:

  • Is it a ColorLight 5A-75B revision 7.0?
  • Are you using the Ethernet port near the 5V connector?
  • How are you powering the board?
  • Can you try with the board directly connected to your computer? or be sure you are using a Gibabit Ethernet switch? (100Mbps is not supported by the ECP5 RGMII PHY).

Thanks

Hi,
Thanks.
I found the reason why there was no ping response. I didn't use the Ethernet port near the 5V connector. Now I can ping the board successfully by using the Ethernet port near the 5V connector.
By the way, the test_flash.py reported error: "socket.timeout: timed out". Any suggestion?
Thank you very much again.

Lin

For test_flash.py, make sure open litex_server before: lxserver --udp --udp-ip=192.168.1.20. I just tested it:

./test_flash.py 
00ef4016
ff
ff
ff
ff
ff
ff
ff
ff
ff
ff
ff
ff
ff
ff
ff

Thanks.

Thanks a lot, this finally works! I used a 10/100Mbit switch before. Using a gigabit switch and the newest commit it works! 😄