Monday, 2019-08-26

*** tpb has joined #litex00:00
*** rohitksingh has quit IRC00:01
*** freemint has quit IRC00:10
*** rohitksingh has joined #litex00:17
*** rohitksingh has quit IRC00:58
*** John_K has joined #litex02:46
*** rohitksingh has joined #litex03:41
John_Kwas chatting @mithro on Twitter about adding Pano Logic G2 support to linux-on-litex-vexriscv. Just got JTAG wired up and talking to the S6. Trying to get the "new" ISE working on Linux to generate a blinky bitstream before diving into litex03:48
*** rohitksingh has quit IRC04:03
John_Kis it typical for ./sim.py to take a long time after printing "Booting Linux" to displaying anything from the kernel?04:11
John_K(for linux-on-litex-vexriscv)04:11
John_K(apparently so, took 8min on my little machine here)04:18
CarlFKJohn_K: both (based on chat a few hours ago:04:27
CarlFKis it normal that it takes minutes to pass -========== Booting Linux =============--04:27
CarlFKhttps://logs.timvideos.us/%23litex/%23litex.2019-08-25.log.html#t2019-08-25T22:33:1604:27
_florent_John_K, goran-mahovlic_: for linux, we've switched to a LiteX UART driver recently and it with it, first UART message are not printed as soon as before but only when the driver is loaded, so can be few seconds on hardware, but a few minutes on simulation04:43
_florent_i'd like to see if we can improve that have the benefits of both: first UART message as early as before and use a real UART driver04:44
_florent_goran-mahovlic_: for Ethernet, if netboot command is not available in the bios, something is probably wrong in the LiteEthPHYRMII integration04:45
_florent_goran-mahovlic_: by the way, it's now possible to read/write mdio registers to do some verifications on the PHY04:46
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/bios/main.c#L345-L34904:47
tpbTitle: litex/main.c at master · enjoy-digital/litex · GitHub (at github.com)04:47
_florent_if your PHY address is 1 and you want to do a dump of the 32 first registers: mdiod 1 3204:49
_florent_goran-mahovlic_: on the nexys4ddr, the LAN8720A RMII PHY does not have a XTAL and we need to generate the clock, that's why we have the Subsignal("ref_clk", Pins("D5"))05:14
_florent_if you don't have this on your PMOD, it's that there is a 25MHz XTAL on your PMOD board, so you can just ignore this05:15
*** rohitksingh has joined #litex05:26
*** rohitksingh has quit IRC05:55
*** olofk has joined #litex09:25
olofkMorning09:25
olofk_florent_: Do I need a 100MHz clock for litesdcard or is 25 enough?09:26
olofkAlso, is it possible to move the {I,O}DDR and FDPE instantiations out of the core? I would like to keep it tech-agnostic10:07
olofk_florent_: Shouldn't the sd_rst signal be synced? Seems it's coming directly from the locked signal of the mmcme210:20
olofkIs the DRP bus of them MMCM unused or did I wire something up incorrectly? Looks like all input wires are tied to 010:27
*** olofk has quit IRC11:00
*** GoranMahovlic has joined #litex11:26
GoranMahovlicTnx, after work I will fork and put my setting so you can check what is wrong --- all is really slow on hardware (if boots it take 15-30mins), and network is not generated...11:28
GoranMahovlicIs it possible to boot from SD?11:29
GoranMahovlicI have added SD card module and set pinout11:29
GoranMahovlicAnd I do not know how complicate is to add HDMI out is there any board that have it already?11:29
*** olofk has joined #litex12:20
olofkAhh.. my internet connection is terrible12:20
olofkIs there any documentation on the LiteDRAM native ports? I think I understand how they work from looking at the signal names but I'm not sure if there are any restrictions I should know about12:37
*** rohitksingh has joined #litex13:02
*** olofk has quit IRC13:15
*** rohitksingh has quit IRC13:25
_florent_GoranMahovlic: booting from serial should not be that long, IIRC ~5 mins (unless image size exploded with recent changes)13:30
_florent_GoranMahovlic: it's not yet possible to boot from SD, but we it's planned, same for HDMI13:30
GoranMahovlictnx, so I will focus then on adding RMII13:31
GoranMahovlicI already have everything prepared, just have some missing lines or something...13:32
*** John_K_ has joined #litex13:38
*** John_K_ has quit IRC13:43
*** GoranMahovlic has quit IRC13:46
somloI finally had a chance to actually test the natively built (with yosys/trellis/nextpnr on fedora-riscv64) bitstream for litex+rocket13:49
somloand it works! http://www.contrib.andrew.cmu.edu/~somlo/BTCP/#sec_413:50
tpbTitle: A Trustworthy Free/Libre Linux Capable 64bit RISC-V Computer (at www.contrib.andrew.cmu.edu)13:50
somlostill need to run fedora-riscv64 on an actual litex+rocket 64bit linux system instead of just a qemu VM :)13:51
*** freemint has joined #litex14:45
goran-mahovlic_I am back home, will fork and push now for ethernet fix14:45
goran-mahovlic_is this wrong14:57
goran-mahovlic_        Board.__init__(self, ulx3s.BaseSoC, "serial+ethernet")14:57
goran-mahovlic_I see on Versa it has ethSoc14:58
goran-mahovlic_versa_ecp5.EthernetSoC14:58
goran-mahovlic_will try to change that14:58
daveshahIf you have added Ethernet to BaseSoC then it wouldn't be needed14:58
daveshahfor Versa we have BaseSoC and then EthernetSoC derives from it adding liteeth14:59
goran-mahovlic_I have added this https://github.com/goran-mahovlic/litex/commit/41c794576f2b8f4f286e927aabf4c973bee76c6d#diff-6dffc3d6d684b0e53ee204c8a8fd2f3815:05
tpbTitle: Adding changes to use Microchip LAN8720 RMII board and SD card · goran-mahovlic/litex@41c7945 · GitHub (at github.com)15:05
goran-mahovlic_So I have two SoC and I am using Base - I should put then under one SoC15:06
goran-mahovlic_https://github.com/goran-mahovlic/litex/blob/master/litex/boards/targets/ulx3s.py15:07
tpbTitle: litex/ulx3s.py at master · goran-mahovlic/litex · GitHub (at github.com)15:07
goran-mahovlic_or I should just pass argument and how15:09
goran-mahovlic_ cls = EthernetSoC if args.with_ethernet else BaseSoC15:09
goran-mahovlic_ok I have braked platform file will fix it now15:28
goran-mahovlic_still does not generate network files15:56
goran-mahovlic_https://gist.github.com/goran-mahovlic/d6abf5a6001f2562c963f6a251cda7cc15:56
tpbTitle: main.py · GitHub (at gist.github.com)15:56
daveshahhttps://gist.github.com/goran-mahovlic/d6abf5a6001f2562c963f6a251cda7cc#file-main-py-L145 should be EthernetSoC not BaseSoC15:57
tpbTitle: main.py · GitHub (at gist.github.com)15:57
goran-mahovlic_ok, now I need to find errors :)16:07
goran-mahovlic_    self.submodules.ethphy = LiteEthPHYRMII(self.platform.request("eth"))16:08
goran-mahovlic_TypeError: __init__() missing 1 required positional argument: 'pads'16:08
goran-mahovlic_I did not update yet o git -- it is wrong file I will do it now16:09
goran-mahovlic_done -- So this is the module I want to add LiteEthPHYRMII16:12
goran-mahovlic_it has two bit RX and two bit TX as my board16:12
goran-mahovlic_I just copy pasted from here https://github.com/goran-mahovlic/litex/blob/master/litex/boards/targets/netv2.py16:13
tpbTitle: litex/netv2.py at master · goran-mahovlic/litex · GitHub (at github.com)16:13
goran-mahovlic_but seams that I did not copy all needed16:14
goran-mahovlic_ok found it, i removed clk -- will add it again16:19
_florent_goran-mahovlic_: i just improved serialboot, it should be a lot faster now to boot over serial now: https://github.com/litex-hub/linux-on-litex-vexriscv/issues/4316:37
tpbTitle: Loading images over serial is expected to be slow... but not that slow... · Issue #43 · litex-hub/linux-on-litex-vexriscv · GitHub (at github.com)16:37
goran-mahovlic__florent: Great,tnx!16:38
goran-mahovlic_Now I see that LiteEthPHYRMII is not for lattice :)16:39
goran-mahovlic_ERROR: Module `\ODDRXD1' referenced in module `\top' in cell `\ODDRXD1' is not part of the design.16:39
goran-mahovlic_Or I am wrong?16:39
goran-mahovlic_I am probably wrong :) -- modules are complaining about eth clock so I just copy pasted         pll.create_clkout(self.cd_eth, 50e6)16:41
goran-mahovlic_and that is probably wrong16:41
daveshahODDRXD1 looks like an ECP3 primitive16:42
daveshahThe ECP5 equivalent is ODDRX1F16:42
_florent_daveshah: indeed, it's used for DDROutput16:45
_florent_goran-mahovlic_: you need to do the changes here: https://github.com/enjoy-digital/litex/blob/master/litex/build/lattice/common.py#L30-L3516:46
tpbTitle: litex/common.py at master · enjoy-digital/litex · GitHub (at github.com)16:46
_florent_and use a ODDRX1F16:46
_florent_i'll do the proper changes later to support both ECP3 and ECP516:47
goran-mahovlic_ERROR: Module `ODDRX1F' referenced in module `top' in cell `ODDRX1F' does not have a port named 'DB'.16:49
goran-mahovlic_is it D0 D116:52
goran-mahovlic_like here https://github.com/emard/galaksija/blob/master/proj/lattice/galaksija_ulx3s_hdmi/top/galaksija_ulx3s.vhd#L18616:53
tpbTitle: galaksija/galaksija_ulx3s.vhd at master · emard/galaksija · GitHub (at github.com)16:53
goran-mahovlic_Or I will burn my computer building it :) It is doing something16:53
_florent_goran-mahovlic_: you need to replace DA/DB with D0/D117:02
goran-mahovlic_it compiled but my laptop needed cleaning - will see now how it will go. It started to do something ... And I think I did see IP with nmap -- but will recheck17:20
goran-mahovlic_I see it in wireshark need to fix port17:30
goran-mahovlic_seams to work! Tnx _florent and Dave!  I will upload it -- it can probably be made better I have just copy pasted :)  It is a bit slow but that is maybe expected ... It is still downloading I see on wireshark17:53
daveshahWith the ECP5 RGMII it usually downloads in less than 10s, and the link isn't the bottleneck so RGMII vs RMII shouldn't be a big difference18:03
daveshahhowever, dodgy TFTP servers can sometimes cause odd behaviour18:03
_florent_goran-mahovlic_: cool it's it's alive, it should not be too long (similar to Arty with MII), so as daveshah is saying, maybe it's related to the known TFTP bug (which i haven't investigated yet...)18:28
goran-mahovlic_I did not have bios.bin in root folder it has failed so now I am trying again18:33
goran-mahovlic_probably something else is wrong to -- now it is up for 6 minutes, but yes, probably something missing again on TFTP18:37
goran-mahovlic_Booting from network...18:38
goran-mahovlic_Local IP : 192.168.1.5118:38
goran-mahovlic_Remote IP: 192.168.1.24918:38
goran-mahovlic_Fetching from: UDP/6918:38
goran-mahovlic_Unable to download Image over TFTP18:38
goran-mahovlic_Network boot failed18:38
goran-mahovlic_Unable to download Linux images, falling back to boot.bin18:38
goran-mahovlic_Unable to download boot.bin over TFTP18:38
goran-mahovlic_Network boot failed18:38
goran-mahovlic_No boot medium found18:38
goran-mahovlic_where boot.bin needs to be?18:38
daveshahThat will depend how the TFTP server is configured18:41
daveshahit needs to be in the root folder your tftp server is serving18:41
goran-mahovlic_First it starts with the image - and it is loading for 7 minutes after block 2146 it requests boot.bin file and failes18:42
daveshahSome people have found dnsmasq more reliable than tftpd (I find tftp-hpa fine)18:44
daveshahOh wait18:44
daveshahI wonder if this is the 50MHz bug again (TFTP needs 55MHz+ to be reliable on the Versa)18:44
daveshahalthough that might only affect Gigabit/RGMII18:44
daveshah*55MHz+ system clock18:44
*** freemint has quit IRC18:58
*** freemint has joined #litex18:58
*** GoranMahovlic has joined #litex19:06
GoranMahovlicWell I could also do something not right :)  Or in LiteX or on TFTP that is bigger possibility :)19:08
GoranMahovlicWill let you know once I tryout TFTP localy and upload all changes19:08
_florent_GoranMahovlic: it's also possible you don't have all the files on the tftp19:13
GoranMahovlicwell yes :)    I did put then like you noted in README, but path or something else could be wrong19:15
_florent_You need to have Image, rootfs.cpio, rv32.dtb and emulator.bin19:15
GoranMahovlicand bios.bin that what I see on failed TFTP request19:15
GoranMahovlicemulator.bin  should be is inside emulator folder?19:16
GoranMahovlicall others I have in root19:17
_florent_you don't need bios.bin, it's just that it's falling back to bios.bin if it's not possible to find the linux binaries19:17
_florent_yes, emulator.bin is in emulator19:17
GoranMahovlicok, but I see on wireshark it starts to download Image and after 7 minutes just asks for bios.bin and fails19:18
GoranMahovlicit is asking for packets really slowly19:19
GoranMahovlicI can probably repeat and put capture online19:19
GoranMahovlicbut I will first check TFPT19:19
_florent_yes sure, i can have a look19:19
*** GoranMahovlic has quit IRC19:22
*** GoranMahovlic has joined #litex21:16
GoranMahovlichttps://send.firefox.com/download/66d3ea7db93b2589/#NyDmlifiFuXf_RSSZiv93w21:17
tpbTitle: Firefox Send (at send.firefox.com)21:17
GoranMahovlicI have checked and locally I can download Image file in second --- but board is downloading it and fails after some time --- did not wait here to fail, but check start and finish time21:18
GoranMahovlicmaybe I messed something in this file https://github.com/goran-mahovlic/litex/blob/master/litex/boards/targets/ulx3s.py21:19
tpbTitle: litex/ulx3s.py at master · goran-mahovlic/litex · GitHub (at github.com)21:20
daveshahSomething interesting to try is to replace Image and rootfs.cpio with small (e.g. 16-byte) dummies (but keep emulator)21:20
GoranMahovliccool will try21:20
daveshahThis won't load Linux, but it will at least see if you can boot the emulator via tftp21:20
GoranMahovlicyup21:21
GoranMahovlicBooting from serial...Press Q or ESC to abort boot completely.sL5DdSMmkekroTimeoutBooting from network...Local IP : 192.168.1.51Remote IP: 192.168.1.251Fetching from: UDP/69Downloaded 1000 bytes from Image over TFTP to 0xc000000021:23
daveshahif it works you should see something like VexRiscv Machine Mode software built ...21:24
daveshahseems like something is still not right with the tftp21:24
GoranMahovlicI can see it is downloading21:26
GoranMahovlicI think it is just slow21:26
GoranMahovlicBut yes, I think it would already load 1Mb and emulator is just 10K21:34
GoranMahovlicIf I did switch TX0 and TX1 would it get IP and work like this?21:35
GoranMahovlicOr if I get ip all pins are OK21:36
daveshahPretty sure if you get an IP and see the request the wiring is fine21:38
daveshahI guess a more subtle fault (e.g. signal integrity or timing) could mess up reliability and thus tftp. but margins in rmii should be pretty good21:38
GoranMahovlicI could load over serial and check network then21:45
GoranMahovlicI will leave it so it can see what happened in morning22:05
*** GoranMahovlic has quit IRC22:05
*** freemint has quit IRC22:05
*** freemint has joined #litex22:06
*** freemint has quit IRC22:09
*** freemint has joined #litex22:09
*** rohitksingh has joined #litex22:14
*** rohitksingh has quit IRC23:23
futarisIRCcloudJohn_K: I've got a Pano Logic G2 here too.23:32
*** CarlFK has quit IRC23:44

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