Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jadafi opened this issue Oct 1, 2020 · 20 comments
Closed

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

jadafi opened this issue Oct 1, 2020 · 20 comments

Comments

@jadafi
Copy link

jadafi commented Oct 1, 2020

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...

@enjoy-digital
Copy link
Owner

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.

@jadafi
Copy link
Author

jadafi commented Oct 2, 2020

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.

@enjoy-digital
Copy link
Owner

@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?

@jadafi
Copy link
Author

jadafi commented Oct 2, 2020

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)?

@enjoy-digital
Copy link
Owner

--load is sufficient yes.

@jadafi
Copy link
Author

jadafi commented Oct 2, 2020

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

@jadafi
Copy link
Author

jadafi commented Oct 2, 2020

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

@enjoy-digital
Copy link
Owner

enjoy-digital commented Oct 5, 2020

@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.

@jadafi
Copy link
Author

jadafi commented Oct 5, 2020

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

@enjoy-digital
Copy link
Owner

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

@jadafi
Copy link
Author

jadafi commented Oct 6, 2020

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

@rednaz1337
Copy link

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
Copy link

wlcx commented Nov 17, 2020

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.

@enjoy-digital
Copy link
Owner

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

@VisionShilin
Copy link

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

@enjoy-digital enjoy-digital reopened this Nov 24, 2020
@enjoy-digital
Copy link
Owner

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

@VisionShilin
Copy link

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

@enjoy-digital
Copy link
Owner

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

@VisionShilin
Copy link

Thanks.

@rednaz1337
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants