Sunday, 2021-02-28

*** tpb has joined #litex00:00
*** lf has quit IRC00:06
*** lf has joined #litex00:07
*** pftbest has joined #litex00:13
*** pftbest has quit IRC00:17
*** pftbest has joined #litex00:33
*** rektide has joined #litex01:21
rektideanyone know of any resources talking to avalon-st vs wishbone vs axi? is there any work on tilelink?01:40
rektidedoes anyone have suggestions for how i can understand core sizes? i dont know what i am doing yet, only just beginning, but i'd like to try to understand the impact of adding, say, an sd-card. i'm not sure what i'm adding it to yet though. this would likey be on an ecp5 85f.01:43
rektidethird, i see two efforts on usb, the ft245 usb1.1 work in https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/usb_fifo.py and the usb3 work in https://github.com/enjoy-digital/usb3_pipe . are there any other notable projects on usb? it'd be great to be able to play around with something in-between: usb2 high-speed.01:52
*** Degi_ has joined #litex03:19
*** Degi has quit IRC03:23
*** Degi_ is now known as Degi03:23
futarisIRCcloudrektide: join ##usbhacking - LUNA is working with usb 2.0 ULPIs04:32
*** Bertl is now known as Bertl_zZ05:45
*** feldim2425 has quit IRC05:59
*** feldim2425 has joined #litex06:00
*** TMM has quit IRC08:12
*** TMM has joined #litex08:12
pftbestI am trying to debug why ethernet doesn't work and i see that ethcore.mac.core.preamble_errors increase by 1 with each received packet, is that normal?09:41
*** lkcl has quit IRC11:06
*** lkcl has joined #litex11:19
_florent_nickoe: I would first recomment starting from litex_sim and the Litescope tutorial at: https://github.com/enjoy-digital/litex/wiki/Use-LiteScope-To-Debug-A-SoC (and make sure you reproduce the results), then adapt this to your own needs. This will give you a starting point that you can progressively adapt.11:42
_florent_nickoe: otherwise if you have empty .vcd, make sure the trace signal is set to 1 in the simulation:11:43
_florent_https://github.com/enjoy-digital/litex/wiki/Use-LiteScope-To-Debug-A-SoC11:43
_florent_sorry, wrong link, this one: https://github.com/enjoy-digital/litex/blob/master/litex/tools/litex_sim.py#L33011:43
_florent_somlo: nice for the 32-bit CSR, thanks @shorne_11:44
_florent_pftbest: with add_etherbone you should be able to ping the board yes, it's possible there is an issue on the ethphy in your case11:46
_florent_pftbest: You can see the expected behavior with the simulation: litex_sim --with-etherbone and then ping the sim 192.168.1.5111:47
_florent_(on hardware the default eth ip is 192.168.1.50)11:48
pftbest_florent_: do you have any suggestion on how to troubleshoot issues with ethernet phy? I've got ecpix-5 board with KSZ9031 phy. I think the phy itself is working because in the litex console I can dump MDIO registers12:21
pftbestlitex> mdio_dump 0 212:21
pftbestMDIO dump @0x0:12:21
pftbest0x00 0x114012:21
pftbest0x01 0x796d12:21
pftbestAnd the values look reasonable to me12:21
pftbestUnfortunately I don't have oscilloscope at hand to check the signal on RXD pins12:21
*** _whitelogger has quit IRC12:48
*** _whitelogger has joined #litex12:50
*** Bertl_zZ is now known as Bertl12:51
nickoe_florent_: yeah, well, that is what I did. That is sarting from the litex_sim.py and then I jused added the LedChaser and I am trying to trace that.13:12
nickoeI do get the tracing from the CPU and stuff, but I can't find my leds.13:12
*** nickoe has quit IRC13:18
*** nickoe has joined #litex13:20
*** FFY00_ has quit IRC14:40
*** jimbzy has left #litex14:42
*** dayjaby has joined #litex14:56
*** FFY00 has joined #litex15:10
*** FFY00_ has joined #litex15:47
*** FFY00 has quit IRC15:49
*** TMM has quit IRC16:40
*** TMM has joined #litex16:40
_florent_nickoe: I assume you probably added pins to the Sim Platform to add the LedChaser, so the signals in the dump should have the name of the top level outputs16:59
*** iTitou has left #litex16:59
nickoe_florent_: I linked my script before, let me find it, but yes in the sim platform16:59
nickoe_florent_: it looks like this, https://github.com/nickoe/litex-boards/blob/60f0ecb0e140f6eab6043e559aff2781becf849e/litex_boards/targets/mars_ax3_sim_litex.py17:01
_florent_ok, and in the dump you don't see the user_led outputs?17:02
nickoeNo, so now I just tried with "./mars_ax3_sim_litex.py --with-sdram --sdram-init=demo.bin   --trace"  (not using the analyzer), but just enabling the trace17:03
nickoenow opening gtkwave ./build/sim/gateware/sim.vcd17:03
nickoeMm, I see the user_led signals in the TOP17:04
_florent_nickoe: ok, litex_sim does not have a virtual user_led component, so for the LedChaser you'll just see the signals in the dump17:04
nickoemm, so I thought didn't see that yesterday, but that was probably with the --with-analyzer17:05
_florent_pftbest: For Ethernet on the ECPIX5, I would recommend testing the default litex-boards target with --with-ethernet:17:05
_florent_https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/ecpix5.py17:05
nickoeSo I want to just trace my own module, such that no time is spent tracing the CPU17:05
nickoeand then I guess I need to use the analyzer, right?17:06
_florent_pftbest: And see if you are able to boot over Ethernet: https://github.com/enjoy-digital/litex/wiki/Load-Application-Code-To-CPU#ethernet-boot17:06
_florent_pftbest: you can also enable the software debug traces to see TX/RX packets:17:07
_florent_pftbest: set software_debug to True here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L134917:07
_florent_pftbest: with also Wireshark on your Host to be able to capture TX packets/ have a reference for RX packets17:08
_florent_pftbest: if you see malformed packets on RX, you can try to play with the rx_delay of the PHY:17:09
_florent_pftbest: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/ecpix5.py#L11617:09
nickoe_florent_: But if I run with --with-analyzer only, I get https://dpaste.com/BPAYZC4VH17:09
tpbTitle: dpaste: BPAYZC4VH (at dpaste.com)17:09
_florent_pftbest: And once working with --with-ethernet, you could go back to --with-etherbone17:09
nickoeShould I run with --trace as well?17:09
_florent_nickoe: --with-analyzer will generally be pretty limited compare to --trace17:10
_florent_but the Analyzer can be used in simulation and also on hardware17:11
nickoeYes, and that is what I want. But I may not really understand who to add the analyzer to my user_leds pins17:11
_florent_for simulation, I would just recommend using --trace that gives you full visibility17:11
_florent_with --trace, it's not possible to select the signals, it will just dump all the signals17:12
nickoeok17:12
nickoeBut can I use the analyzer on any of the led signals? I would expect it to be able to trace the pins at least, or am I wrong?17:12
_florent_yes you should be able to do this17:13
nickoeI may not fully understand the syntax used to add signals to the analyzer.17:13
_florent_in the analyzer, you can add something like platform.lookup_request("user_led", x) with x = 0, 1, 2, 317:14
nickoeBecause I get that attribute error.17:14
nickoeor type error in that paste at lest.17:14
_florent_you just need to provide a list of signals17:14
nickoeI got my pin definition: https://github.com/nickoe/litex-boards/blob/mars_ax3_sim/litex_boards/targets/mars_ax3_sim_litex.py#L65-L6817:16
nickoeI add the LedChaser https://github.com/nickoe/litex-boards/blob/mars_ax3_sim/litex_boards/targets/mars_ax3_sim_litex.py#L276-L28017:16
nickoeI attempt to add the pads of the module to the analyzer https://github.com/nickoe/litex-boards/blob/mars_ax3_sim/litex_boards/targets/mars_ax3_sim_litex.py#L30417:16
nickoebut with that I get AttributeError: 'Cat' object has no attribute 'name_override17:16
nickoeok, I just missed the lookup_request thing, will try17:18
nickoe_florent_: I guess I can't just add the LedChaser module and get all signals from inside that?17:18
nickoemm, litex.build.generic_platform.ConstraintError: Resource not found: user_led:417:19
nickoemm, litex.build.generic_platform.ConstraintError: Resource not found: user_led:417:19
nickoeah, zero index17:19
nickoeSo I run it and ctrl+c the simulation.. it errors with this: https://dpaste.com/DLZ3MRPY517:21
tpbTitle: dpaste: DLZ3MRPY5 (at dpaste.com)17:21
nickoeI wonder if that is the same issue as described breifly here https://github.com/enjoy-digital/litex/issues/83117:22
nickoe_florent_: Or is there a better way to abort the simulation at will?17:22
_florent_can you try adding if to the analyzer with: platform.lookup_request("user_led", x)?17:22
nickoe_florent_: "if"?  I am not sure what you mean. I can push my latest.17:26
nickoethe with x thing didn't work so I just added them explicitly for now, https://github.com/nickoe/litex-boards/blob/mars_ax3_sim/litex_boards/targets/mars_ax3_sim_litex.py#L304-L30717:27
nickoeIt appears to works with the --trace option, but with --with-analyzer only I don't get traces, and I am not running with --sim-debug, so self.comb += platform.trace.eq(1) should be set always.17:34
_florent_nickoe: with --with-analyzer, you have to use litex_server and litescope_cli to get your dump:17:41
_florent_https://github.com/enjoy-digital/litex/wiki/Use-LiteScope-To-Debug-A-SoC17:42
nickoehmm, ok, I thought it would trace as it appears to attempt to write a vcd17:43
_florent_The analyzer is storing the captured data in a RAM of the SoC that needs to be read through the bridge once captured17:43
_florent_no, the analyzer is a hardware module that is demonstrated in the simulation but mostly useful on real hardware17:44
_florent_That's similar to Chipscope/SignalTap/Reveal tools17:45
nickoeI can start the simulation with etherbone and see the ip in "ip a", but I can't seem to get "litex_server --udp --udp-ip=192.168.1.51" to connect to it..17:46
nickoealthoguh the remote appears to get "192.168.1.100" and not .51. but changing it ... still no luck17:47
nickoe"Exception: Unable to probe Etherbone server at 192.168.1.100."17:47
*** rozpruwacz has joined #litex17:48
_florent_nickoe: once the simulation is started, are you able to ping 192.168.1.51?17:53
rozpruwaczHi, I'm using linux-on-litex-vexrisc project with de0nano board. I successfuly added the litespi core and i can send data through it from within linux. Now i want to add spi device with interrupt line. How i can add gpio input interrupt to the soc and use it with linux ? I was trying to add GPIOIn module but i don't know how to handle it from linux17:55
rozpruwaczside (seems to me that litex,gpio driver does not support interrupts).17:55
_florent_Hi rozpruwacz, the interrupt has been recently added on the GPIO input, so that's indeed possible it's not yet supported by the Linux driver17:57
nickoeyes, I can ping .5117:59
rozpruwacz_florent_ oh great :) is someone working on it or I can try to add support for it ? It would be fun way to get familiar with riscv for me :)18:02
nickoehmm, now it did connect. odd.18:03
_florent_rozpruwacz: I don't think anyone is working on this currently, this could indeed be a good way to get familar with riscv and contribute18:05
_florent_rozpruwacz: if you are stuck, somlo, shenki_  or shorne_ would probably be happy to discuss linux driver related issues/questions18:09
rozpruwacz_florent_ ok, thanks.18:12
*** rozpruwacz has quit IRC18:19
pftbest_florent_: thanks for the advice. It appears both rx and tx works when using with-ethernet. I don't have a linux image to test full netboot, but I see in wireshark that the board is able to receive ARP replies and I see both tx and rx data in the UART log19:11
pftbestthat is good news i think, it means my board is not damaged19:12
pftbestbut it doesn't explain why etherbone doesn't work while ethernet is ok :(19:28
*** pftbest has quit IRC19:43
*** pftbest has joined #litex19:43
*** pftbest has joined #litex19:43
_florent_pftbest: ah, but it's also possible the timings are not met with Etherbone on this board. Some work has been done on that but it's not yet merged, I'll try to integrate it in the next weeks.20:06
pftbest_florent_: I don't see any timing errors in the log https://dpaste.com/HNVKTLJYN.txt20:08
pftbestOr do you mean some other timings?20:08
_florent_It seems fine yes20:15
_florent_I also have an ECPIX5, I'll try to do some tests next week with Etherbone on it20:16
pftbest_florent_: that would be great, thank you20:16
pftbestI will also try to build the linux for this board to check how it behaves20:18
*** st-gourichon-fid has quit IRC20:38
*** st-gourichon-fid has joined #litex20:39
*** Bertl is now known as Bertl_oO20:41
*** dayjaby has quit IRC21:25
*** _whitelogger has quit IRC21:54
*** _whitelogger has joined #litex21:56

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!