Thursday, 2020-02-13

*** tpb has joined #litex00:00
*** levi has quit IRC00:27
*** levi has joined #litex00:27
*** rohitksingh has joined #litex00:42
*** rohitksingh has quit IRC02:12
*** rohitksingh has joined #litex02:49
*** rohitksingh has quit IRC03:09
*** rohitksingh has joined #litex03:30
*** rohitksingh has quit IRC03:31
*** rohitksingh has joined #litex03:43
*** rohitksingh has quit IRC08:39
*** rohitksingh has joined #litex08:40
*** rohitksingh has quit IRC08:50
*** freemint has joined #litex11:45
*** freemint has quit IRC12:18
*** freemint has joined #litex12:24
*** freemint has quit IRC12:38
*** freemint has joined #litex14:23
*** freemint has quit IRC14:34
somlo_florent_, Xiretza: liteeth commit 153c160 causes the linux driver (minimally adapted for 64bit Rocket from the vexriscv driver) to hang during boot14:39
somloI noticed that change was further modified by commit 7a44209, which doesn't fix the behavior I'm observing14:40
somloI'm investigating to see what actually changes in terms of the memory map state before vs. after MACCore initialization that might impact the linux driver (the generated csr.csv file is the same before vs. after the "breakage", so at least "officially" my IRQ numbers, and CSR and MMIO buffer addresses are unchanged)14:42
somloso at first glance it's not that I'm telling the driver to access the "wrong" address(es)14:43
somlowhich is addmittedly weird, beacause gen.py shouldn't even come into play when building a litex SoC with "--with-ethernet"14:58
somlobut weirdly enough, if I check out ec9bc57 (right before ec9bc57) the linux driver loads fine, and, before 7a44209, if *revert* 153c160 the driver also loads fine15:00
somloI'm very confused at this point :)15:00
*** tnt has joined #litex15:32
tntWould anyone have a link to the vex configuration used in litex to run linux ?15:32
tntDoes it use the Linux variant of https://github.com/m-labs/VexRiscv-verilog ?15:33
tpbTitle: GitHub - m-labs/VexRiscv-verilog: Using VexRiscv without installing Scala (at github.com)15:33
daveshahtnt: almost, I think it actually uses https://github.com/enjoy-digital/VexRiscv-verilog15:33
tpbTitle: GitHub - enjoy-digital/VexRiscv-verilog: Using VexRiscv without installing Scala (at github.com)15:33
tntdaveshah: tx.15:39
tntFailing miserably at trying to rebuild those though :/ https://pastebin.com/HrrysXTk15:40
tpbTitle: nt@ritsuko-ubnt:~/data/vex/VexRiscv-verilog$ sbt compile "runMain vexriscv.GenCo - Pastebin.com (at pastebin.com)15:40
*** freemint has joined #litex16:35
somlo_florent_, Xiretza: looks like I should rely on (my ability to use) git bisect a bit less :)17:07
somlolast night I *thought* bouncing around in the liteeth tree made a difference in whether my liteeth linux driver would hang on boot or not, now it hangs no matter what I do in liteeth17:08
somloso I'm taking it all back, I really don't know what (combination of) litex and liteeth recent changes are causing the issue :)17:08
_florent_tnt: sorry not sure i can help to generate Vexriscv, i only reused the instructions from @Dolu in the README more than 6 months ago, maybe it's no longer up to date.17:28
tnt_florent_: Ah it's ok, got it worked out. Java version was too recent.17:31
*** freemint has quit IRC17:36
*** freemint has joined #litex17:39
somlo_florent_: at least part of my problem might have been using ctrl-r to recall the last litex build command line I had used... Keeping multiple windows open, and logging into and out of the dev vm from many places during the day, I didn't notice I had retrieved the one where I'm asking for a 40MHz clock :)18:31
somloso now I'm trying again with the usual 60MHz, then I'm going bisecting again (if the problem still persists)18:32
somloso, apologies to everyone for the noise, will update if/when I figure out more about what's going on (and how I'm being an idiot) :D18:32
_florent_somlo: no problem for the noise. From the quick test i did yesterday, it seems the problem also occurs in simulation, maybe it would be faster to bisect? (lxsim --cpu-type=rocket --with-ethernet --opt-level=O0)18:36
somlo_florent_: I'll try both ways, see whether compiling trellisboard bitstream is slower than simulating rocket in verilator :)18:48
somlobut thanks for the confirmation -- and now that I'm paying attention to my command line, bisect should hopefully produce something useful :)18:48
CarlFKdoes someone have a URL to the $10 led driver board that has an fpga and 2 gig-e ports?18:59
somlo_florent_: ok, so at litex commit #5b34f4cd and liteeth commit #ae10eea it works fine19:03
somloI'll take it from there and see what I can find...19:04
*** freemint has quit IRC19:12
*** freemint has joined #litex19:44
*** freemint has quit IRC19:51
scanakciI am a bit stuck when trying to use tftp to copy files into DRAM. My guess is that it is related to my network configuration (have very limited experience).20:39
scanakcihttps://usercontent.irccloud-cdn.com/file/y6abQVkj/tftp.png20:39
scanakciThis is what I am getting after some time on FPGA.20:39
scanakciI followed this link to set up tftp on my machine (https://askubuntu.com/questions/795481/how-can-i-make-my-tftp-server-visible-available-on-my-local-network). Also, I looked into this link to get more info:  https://github.com/timvideos/litex-buildenv/wiki/Networking20:40
tpbTitle: networking - How can I make my tftp server visible/available on my local network? - Ask Ubuntu (at askubuntu.com)20:40
scanakciI also put a fake boot.bin file under /tftpboot folder20:41
scanakciI connected the ethernet cable to my host machine by using a usb Ethernet Internet Adapter.20:44
scanakciThe ip for this interface is set 192.168.1.100 (not sure if this is correct)20:45
*** CarlFK has quit IRC20:46
scanakcihttps://usercontent.irccloud-cdn.com/file/SqeUEGW0/ethernetadapter.png20:46
scanakciit would be great if you can point out some useful links that can help me for setting up tftp properly (or ways to debug where the problem originates from).20:47
somloscanakci: you have to ensure that your host machine has 192.168.1.100 as one of the available IP addresses on the network interface you connected to the fpga20:58
somlothe way I do that is "sudo ip addr add 192.168.1.100/24 scope global dev enp1s0"20:59
somloreplace enp1s0 with whatever your network interface is named20:59
somlothen, obviously, "systemctl start tftp.service"21:00
somlolast, but not least: I tried connecting my laptop with an ethernet cable to the fpga board, and nothing happened21:00
somlosome auto-negotiation speed/duplex failure21:00
somloit did work when I used a cheap/generic gigabit capable switch, and connected both the laptop *and* the fpga to it with rj45 cables21:01
somlohaven't had a chance to track down why direct point-to-point didn't work (I tried with a straight-through *and* with a cross-over rj45 cable, neither worked, not even after manually hard-coding the speed/duplex settings on the laptop side)21:02
scanakciThank you so much @somlo. I will try it soon.21:06
somloat any point after connecting the fpga to the computer, whether through a switch or directly, you can (should) run a sniffer, e.g. "tshark -i enp1s0 host 192.168.1.50" to check for any sort of activity21:06
*** rohitksingh has joined #litex21:16
*** rohitksingh has quit IRC21:42
somlo_florent_, Xiretza: seems to work fine (if I pick 60MHz) with current git masters (57fb3720 for litex, 466223e for liteeth)21:45
somloon trellisboard, so I didn't try the simulator21:46
leviI'd highly recommend running a sniffer to debug network problems, but be aware that you typically won't see problems below the layer of complete and correct Ethernet frames, and when you're dealing with a FPGA, that's unfortunately a likely layer for errors to occur in. There's a program called `ethtool` that will sometimes let you configure a NIC to accept malformed frames anyway instead of dropping them, but there needs21:49
levito be support in both the NIC and driver for it to work.21:49
somloI spoke too soon, it boots, gets past the linux liteeth driver initialization to the busybox shell prompt21:53
somlobut when I try ifconfig on eth0, I get "LITEETH_READER_READY timed out"21:53
somloso that behavior is relatively new, and should be something I can use as a bisect criterion21:54
somlolevi: thanks, but it's not really a "network" problem, it's getting Linux to talk to liteeth before driving it to generate network traffic to begin with21:56
somlointerestingly, tftp seems to work from the bios (that's how I get my kernel), but then the driver I had that used to work from inside linux is now either hanging during initialization (on boot) or seriously malfunctioning once it got past inititialization21:57
somloit's entirely possible (althoug I'm not sure yet) that the LiteETH "hardware" (RTL) is now *better* than before, and the linux driver needs to be updated.21:58
scanakci@somlo: I plug FPGA and my machine to a switch. Also, I did "sudo ip addr add 192.168.1.100/24 scope global dev eno1". However, still no luck :( .22:39
scanakciUnfortunately, could not catch any packet with tshark for 192.168.1.50.22:39
scanakciip addr shows returns this. I assume 192.168.1.100 is one of the available IP addresses on the network interface now https://usercontent.irccloud-cdn.com/file/FOFUIEqq/ipaddr22:45
somloscanakci: for about the last year I've plugged the fpga into a switch port that also has my workstation on a different port, and things worked fine22:52
somlothen a few days ago I set up a laptop for a "portable" demo I wanted to do in a conference room, and tried to use a single rj45 cat6 ethernet cable between the laptop's usb-ethernet dongle and the fpga22:52
somlonot one single ethernet frame made it across22:53
somlountil I plugged them both into a netgear switch, then they started talking :)22:53
somloso there's something (probably on the LiteETH side) that doesn't autonegotiate speed, duplex, or mdi/mdix properly22:53
somlobut if you go through an ethernet switch, it works (at least for me)22:54
somlowait22:54
somloyou said you did that -- sorry, my reading comprehension is not the greatest today :)22:54
somloand yeah, your ip address lools ok22:55
daveshahI've never had any issues with liteeth directly connected to a proper motherboard Ethernet port23:04
daveshahWith a cheapo realtek USB adaptor I have had issues before, primarily with NFS but once or twice TFTP too23:05
daveshahPretty sure that was just dodgy PC side Linux drivers as much as anything else23:05
*** rohitksingh has joined #litex23:08
somlodaveshah: dodgy pc-side cheapo usb ethernet, passed-through by osx to the linux VM I was using :)23:16
somlothe only one I had handy at the time, though (aside from the 4-port netgear switch sitting around in a drawer :)23:17
somlowhich was really a last-ditch effort to throw something at the wall and see if it sticks -- and it stuck!23:18
daveshahIn a similar situation I had three different USB ethernet dingles handy and all used the same dodgy chipset23:18
somlothat's how cargo-cult style myths are born, I guess...23:18

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!