Wednesday, 2021-02-24

*** tpb has joined #litex00:00
*** lf has quit IRC00:10
*** lf has joined #litex00:11
*** lkcl has quit IRC01:37
*** peepsalot has left #litex01:45
*** lkcl has joined #litex02:07
*** Degi_ has joined #litex03:28
*** TMM has quit IRC03:29
*** TMM has joined #litex03:29
*** Degi has quit IRC03:30
*** Degi_ is now known as Degi03:30
*** mikeK_de1soc has quit IRC03:56
*** CarlFK has quit IRC04:36
*** Bertl_oO is now known as Bertl_zZ05:45
_florent_nickoe: the --init args in litex_sim only support binary files for now, I could add json support but this is not yet the case07:04
_florent_nickoe: for  a small demo of litex_sim with ram initialization, you can do:07:04
_florent_litex_sim07:04
_florent_litex_bare_metal_demo --build-path=build/sim07:04
_florent_litex_sim --ram-init=demo.bin07:05
_florent_when using --with-sdram and --sdram-init, you also have to be aware that the initial memtest can corrupt the pre-initialized content07:07
_florent_you can disable the memtest by adding this: https://github.com/litex-hub/linux-on-litex-vexriscv/blob/master/sim.py#L14607:08
nickoeRight now my "custom software" os just the demp modified a bit.07:45
shenki_florent_: I got the sd card working! I saw someone else had a PR up that described the correct pinout; once I copied that it worked (but not with the card I was first using, I had to use a different one)07:53
shenkiI sent a PR taht adds support for the numato sd card adaptor07:53
*** cr1901_modern has quit IRC07:59
*** cr1901_modern has joined #litex08:01
*** kgugala_ has joined #litex09:27
*** kgugala has quit IRC09:29
*** kgugala has joined #litex09:29
*** kgugala_ has quit IRC09:33
_florent_shenki: great! I saw the PR, I'll merge it, thanks. (In the future we'll probably create definitions of the different PMODs outside the targets to be able to use a specific PMOD with a specific target more easily :))10:33
shenkiNo worries10:34
_florent_shenki: there is currently an issue with the Linux SDCard driver (issue in the driver or gateware, we don't know yet), if you hit this, please let us know :)10:35
_florent_https://github.com/enjoy-digital/litesdcard/issues/2210:35
shenkiI've been using it today with mor1kx and it was ok so far10:40
shenki_florent_: it does hang sometimes in the bios. I am netbooting, so I want the sd read to timeout, but some times it does not10:40
_florent_shenki: IIRC I also saw this, I should do more testing on this.10:45
*** Bertl_zZ is now known as Bertl12:34
*** rozpruwacz has joined #litex12:42
rozpruwaczHi all. I just started tinkering with the litex. I'm using de0 nano board and I wonder what would be the best way to add some new peripherials to the already defined de0nano board. For example, I want to add SD card controller or ethernet mac because I have some breakout boards that I can connect to GPIO connectors. Currently the de0nano board12:52
rozpruwaczdefines just gpios so I would somehow override those to use them for my peripherials. What would be the most elegant way to do it ? Copy paste'ing entire platform and board files seems not so elegant to me. Is there a better way ?12:52
zyprozpruwacz, platform.add_extension()12:56
rozpruwaczthanks, I look into it13:06
rozpruwaczI see that I can also reffer to already defined GPIOs trough defined connector like this: Pins("JP2:3"). quite neat :)13:15
_florent_rozpruwacz: here is an example with SDCard pins added with add_extension: https://github.com/enjoy-digital/litesdcard/blob/master/bench/trellisboard.py#L40-L5113:28
_florent_in your target you can then get the pads with platform.request() as if it was defined in the platform file13:29
_florent_otherwise to extend an existing target, you can just copy the litex_boards target and add your own peripherals after the ones defined in BaseSoC (or create another target reusing BaseSoC from litex_boards)13:30
_florent_the previous example I gave is extending BaseSoC from litex_boards target13:32
*** proteusguy has quit IRC13:59
*** proteusguy has joined #litex14:00
*** mikeK_de1soc has joined #litex14:50
mikeK_de1socrozpruwacz: which DE0-nano board are you using? The de0-nano-Soc?14:55
mikeK_de1socI got some stuff working on the De1-Soc..  similar board..14:56
rozpruwaczno, DE0-nano with cyclone IV FPGA14:56
mikeK_de1socAh, ok.. thanks..14:56
rozpruwaczDo You use liteeth ip ?14:57
mikeK_de1socDo you have a SD card connected on the GPIO pins?14:57
rozpruwacznot yet but I plan to do so14:57
mikeK_de1socno... not there yet... the reason I am asking on the DE1-Soc the Ethernet is connected to the HPS side of the chip..14:58
rozpruwaczI'm trying to setup ethernet but have problem with liteeth ip. The synthesis generates 30k+ LEs14:58
mikeK_de1socyup..14:58
mikeK_de1socI got he RiscV to go on my board, bit it's taking up 20K LE's14:59
mikeK_de1socIf we can try to figure out how to use the HPS side of the chip! I am all ears!  :)14:59
*** rozpruwacz has quit IRC15:03
trabucayremikeK_de1soc: I suppose it's the same approach as for the PS (zynq)15:11
mikeK_de1socPS? not sure of that board..15:12
trabucayreas long as you can avoid to use qsys :)15:12
mikeK_de1socyeah..15:12
mikeK_de1socit's just a shame... we need a board that has like a HUGE LE fpga...   :)15:13
mikeK_de1socjsut expensive..15:13
trabucayreyep15:14
*** Bertl is now known as Bertl_oO15:24
acathlaxobs, _florent_ : I want to write something similar to foboot but working over infrared instead of USB. Should I take the code I need to flash the SPI flash memory from foboot or is there something more recent or more adapted in LiteX? Or somewhere else?15:41
acathlathe flash write part seems tightly integrated with DFU15:42
_florent_acathla: we don't have something equivalent to foboot directly in LiteX, so yes I would say you can look at foboot (I think foboot was used as the DFU booloader for Fomu and OrangeCrab)15:44
acathlaOk, DFU seems not that much linked to USB.15:45
acathlaThank you15:45
_florent_maybe there is a new/different bootloader developed for Betrusted by xobs/bunnie, but I've not been following closely the development15:47
_florent_but at least I know we don't such bootloader directly in LiteX :), so foboot is a good candidate if you want Migen/LiteX code15:49
*** rj_ has quit IRC16:09
*** CarlFK has joined #litex16:11
xobsacathla: mostly it was a bit banged spi driver.16:24
xobsIt was originally taken from toboot, which traces its lineage back to the fadecandy bootloader.16:25
*** rj_ has joined #litex17:10
mikeK_de1socI just got a LED counter to work in Litex... OH joy!  :)   Feel like a High school Student!  ;)17:24
*** rj_ has left #litex17:40
*** rj_ has joined #litex17:45
*** rj_ has joined #litex17:46
acathlacongratuations mikeK_de1soc ! =)17:48
*** rj_ is now known as rj18:10
mikeK_de1socThanks!  still learning migen-Litex- and nMigen... my goal is to get this ADC DAC board working..   baby steps..18:10
mikeK_de1socacathla: for what's it's worth.. I found this file:  "dfu.py" in the litex/litex/build  directory..  if this helps..18:13
mikeK_de1socplace to start playing!! :)18:13
*** proteusguy has quit IRC18:16
acathlamikeK_de1soc, it's just to call the dfu-tools18:19
mikeK_de1socoh ok...18:28
somlo_florent_: do you remember how the argument value for sdcard ACMD41 was picked here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/liblitesdcard/sdcard.c#L159 ?18:45
*** mikeK_de1soc has quit IRC18:56
*** felix_ has quit IRC19:24
*** felix_ has joined #litex19:25
*** mikeK_de1soc has joined #litex19:30
*** rozpruwacz has joined #litex21:08
*** dayjaby has joined #litex21:35
nickoe_florent_: So I did try that --ram-init option to lxsim with the demo.bin but it asserts. https://dpaste.com/6ERQAYU5922:00
tpbTitle: dpaste: 6ERQAYU59 (at dpaste.com)22:00
nickoeIs that a bug or do I need more options?22:01
nickoe_florent_: https://i.snipboard.io/W3wILk.jpg22:10
nickoeSo I run with --ram-init=demo.bin --with-sdram22:12
nickoewhy does it think args.ram_init is None?22:13
nickoeit is certainly not none, https://i.snipboard.io/q4LjSG.jpg22:14
dayjabyIf with_sdram is set, then you cannot specify a ram_init (that's how I interpret the code)22:17
dayjabyassert ram_init is None just tries to make sure that ram_init is None, which failed the assert22:18
nickoeBut is that intended?22:18
nickoeI mean, I would epect to be able to boot my demo app with a simulation of having sdram22:18
nickoeThe assert was added in https://github.com/enjoy-digital/litex/commit/411bca790a6a263d994d724f8f366ce5d98e75cc22:19
nickoeI can't really tell if that line, 225 is really intendedor not.22:19
nickoe*intended.22:19
nickoeflorent wrote this yesterday,https://dpaste.com/FUF8CFPPP22:20
tpbTitle: dpaste: FUF8CFPPP (at dpaste.com)22:20
dayjabyis there no way to fill the RAM later in litex_sim like you could do with litex_term?22:21
nickoedayjaby: I don't know.22:23
nickoeI guess not because of what florent metioned, but even if I skip the ram test, I guess that is fine as this is a simulation.22:23
nickoebut I tried to add that adn remove the assert. It still does not seem to boot much. I mean, the last thing I see is the liftoff message, but no demo app output.22:24
*** rozpruwacz has quit IRC22:26
*** rj has quit IRC22:27
*** dayjaby has quit IRC22:30
*** TMM has quit IRC22:30
*** TMM has joined #litex22:30
*** dayjaby has joined #litex22:34
dayjaby@nickoe did you get the last message: "It seems possible: `$ lxterm /dev/ttyUSBX --kernel=demo.bin`"? I guess you would have to run lxsim with serial. how did you build the demo bin?22:41
nickoeNo, when should I have that messagE?22:43
nickoedayjaby: The demo.bin works fine without the --with-sdram arg and works fine on the real target as well.22:44
nickoebut I build it like,  python ../../../litex/litex/soc/software/demo/demo.py --build-path build/mars_ax3/ &22:44
dayjabyah nice that command worked:)  trying your lxsim call now22:46
nickoeSo if you run it without the with sdram arg it should boot the demo instead of the bios22:47
nickoedayjaby: What do you get?22:52
dayjabySame as you. Trying to run lxsim with some serial arguments in order to try to boot the demo.bin via lxterm22:54
*** rj has joined #litex22:55
nickoeI don't think it supports sertial. Maybe the etherbone stuff can be used?22:59
dayjabyNot etherbone then, but rather ethernet. You have to setup a tftp server to host the demo.bin then23:01
dayjabyhttps://github.com/litex-hub/linux-on-litex-vexriscv#load-the-linux-images-over-ethernet explains the process a bit more detailed23:07
nickoeyeah, well, I am not really interesed in the ethernet for now23:10
nickoeI just wanted to have a simulation with sdram enabled and be able to load my "demo" app23:11
nickoeI have to call it a day23:12
nickoegn23:12
dayjabyGood night!23:12

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