_florent_ changed the topic of #litex to: LiteX FPGA SoC builder and Cores / Github : https://github.com/enjoy-digital, https://github.com/litex-hub / Logs: https://freenode.irclog.whitequark.org/litex
tpb has quit [Remote host closed the connection]
tpb has joined #litex
lf has quit [Ping timeout: 240 seconds]
lf has joined #litex
lkcl has quit [Ping timeout: 246 seconds]
peepsalot has left #litex ["Connection reset by peep"]
lkcl has joined #litex
Degi_ has joined #litex
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #litex
Degi has quit [Ping timeout: 260 seconds]
Degi_ is now known as Degi
mikeK_de1soc has quit [Quit: Connection closed]
CarlFK has quit [Quit: Leaving.]
Bertl_oO is now known as Bertl_zZ
<_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 case
<_florent_> nickoe: for a small demo of litex_sim with ram initialization, you can do:
<_florent_> litex_sim
<_florent_> litex_bare_metal_demo --build-path=build/sim
<_florent_> litex_sim --ram-init=demo.bin
<_florent_> when using --with-sdram and --sdram-init, you also have to be aware that the initial memtest can corrupt the pre-initialized content
<_florent_> you can disable the memtest by adding this: https://github.com/litex-hub/linux-on-litex-vexriscv/blob/master/sim.py#L146
<nickoe> Right now my "custom software" os just the demp modified a bit.
<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)
<shenki> I sent a PR taht adds support for the numato sd card adaptor
cr1901_modern has quit [Ping timeout: 256 seconds]
cr1901_modern has joined #litex
kgugala_ has joined #litex
kgugala has quit [Ping timeout: 240 seconds]
kgugala has joined #litex
kgugala_ has quit [Ping timeout: 246 seconds]
<_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 :))
<shenki> No worries
<_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 :)
<shenki> I've been using it today with mor1kx and it was ok so far
<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 not
<_florent_> shenki: IIRC I also saw this, I should do more testing on this.
Bertl_zZ is now known as Bertl
rozpruwacz has joined #litex
<rozpruwacz> Hi 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 board
<rozpruwacz> defines 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 ?
<zyp> rozpruwacz, platform.add_extension()
<rozpruwacz> thanks, I look into it
<rozpruwacz> I see that I can also reffer to already defined GPIOs trough defined connector like this: Pins("JP2:3"). quite neat :)
<_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-L51
<_florent_> in your target you can then get the pads with platform.request() as if it was defined in the platform file
<_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)
<_florent_> the previous example I gave is extending BaseSoC from litex_boards target
proteusguy has quit [Quit: Leaving]
proteusguy has joined #litex
mikeK_de1soc has joined #litex
<mikeK_de1soc> rozpruwacz: which DE0-nano board are you using? The de0-nano-Soc?
<mikeK_de1soc> I got some stuff working on the De1-Soc..  similar board..
<rozpruwacz> no, DE0-nano with cyclone IV FPGA
<mikeK_de1soc> Ah, ok.. thanks..
<rozpruwacz> Do You use liteeth ip ?
<mikeK_de1soc> Do you have a SD card connected on the GPIO pins?
<rozpruwacz> not yet but I plan to do so
<mikeK_de1soc> no... not there yet... the reason I am asking on the DE1-Soc the Ethernet is connected to the HPS side of the chip..
<rozpruwacz> I'm trying to setup ethernet but have problem with liteeth ip. The synthesis generates 30k+ LEs
<mikeK_de1soc> yup..
<mikeK_de1soc> I got he RiscV to go on my board, bit it's taking up 20K LE's
<mikeK_de1soc> If we can try to figure out how to use the HPS side of the chip! I am all ears!  :)
rozpruwacz has quit [Ping timeout: 240 seconds]
<trabucayre> mikeK_de1soc: I suppose it's the same approach as for the PS (zynq)
<mikeK_de1soc> PS? not sure of that board..
<trabucayre> as long as you can avoid to use qsys :)
<mikeK_de1soc> yeah..
<mikeK_de1soc> it's just a shame... we need a board that has like a HUGE LE fpga...   :)
<mikeK_de1soc> jsut expensive..
<trabucayre> yep
Bertl is now known as Bertl_oO
<acathla> xobs, _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?
<acathla> the flash write part seems tightly integrated with DFU
<_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)
<acathla> Ok, DFU seems not that much linked to USB.
<acathla> Thank you
<_florent_> maybe there is a new/different bootloader developed for Betrusted by xobs/bunnie, but I've not been following closely the development
<_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 code
rj_ has quit [Ping timeout: 268 seconds]
CarlFK has joined #litex
<xobs> acathla: mostly it was a bit banged spi driver.
<xobs> It was originally taken from toboot, which traces its lineage back to the fadecandy bootloader.
rj_ has joined #litex
<mikeK_de1soc> I just got a LED counter to work in Litex... OH joy!  :)   Feel like a High school Student!  ;)
rj_ has left #litex [#litex]
rj_ has joined #litex
rj_ has quit [Remote host closed the connection]
rj_ has joined #litex
<acathla> congratuations mikeK_de1soc ! =)
rj_ is now known as rj
<mikeK_de1soc> Thanks!  still learning migen-Litex- and nMigen... my goal is to get this ADC DAC board working..   baby steps..
<mikeK_de1soc> acathla: for what's it's worth.. I found this file:  "dfu.py" in the litex/litex/build  directory..  if this helps..
<mikeK_de1soc> place to start playing!! :)
proteusguy has quit [Remote host closed the connection]
<acathla> mikeK_de1soc, it's just to call the dfu-tools
<mikeK_de1soc> oh ok...
<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 ?
mikeK_de1soc has quit [Quit: Connection closed]
felix_ has quit [Quit: WeeChat 2.3]
felix_ has joined #litex
mikeK_de1soc has joined #litex
rozpruwacz has joined #litex
dayjaby has joined #litex
<nickoe> _florent_: So I did try that --ram-init option to lxsim with the demo.bin but it asserts. https://dpaste.com/6ERQAYU59
<tpb> Title: dpaste: 6ERQAYU59 (at dpaste.com)
<nickoe> Is that a bug or do I need more options?
<nickoe> So I run with --ram-init=demo.bin --with-sdram
<nickoe> why does it think args.ram_init is None?
<nickoe> it is certainly not none, https://i.snipboard.io/q4LjSG.jpg
<dayjaby> If with_sdram is set, then you cannot specify a ram_init (that's how I interpret the code)
<dayjaby> assert ram_init is None just tries to make sure that ram_init is None, which failed the assert
<nickoe> But is that intended?
<nickoe> I mean, I would epect to be able to boot my demo app with a simulation of having sdram
<nickoe> I can't really tell if that line, 225 is really intendedor not.
<nickoe> *intended.
<nickoe> florent wrote this yesterday,https://dpaste.com/FUF8CFPPP
<tpb> Title: dpaste: FUF8CFPPP (at dpaste.com)
<dayjaby> is there no way to fill the RAM later in litex_sim like you could do with litex_term?
<nickoe> dayjaby: I don't know.
<nickoe> I 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.
<nickoe> but 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.
rozpruwacz has quit [Quit: Connection closed]
rj has quit [Ping timeout: 268 seconds]
dayjaby has quit [Quit: Connection closed]
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #litex
dayjaby has joined #litex
<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?
<nickoe> No, when should I have that messagE?
<nickoe> dayjaby: The demo.bin works fine without the --with-sdram arg and works fine on the real target as well.
<nickoe> but I build it like, python ../../../litex/litex/soc/software/demo/demo.py --build-path build/mars_ax3/ &
<dayjaby> ah nice that command worked:)  trying your lxsim call now
<nickoe> So if you run it without the with sdram arg it should boot the demo instead of the bios
<nickoe> dayjaby: What do you get?
<dayjaby> Same as you. Trying to run lxsim with some serial arguments in order to try to boot the demo.bin via lxterm
rj has joined #litex
<nickoe> I don't think it supports sertial. Maybe the etherbone stuff can be used?
<dayjaby> Not etherbone then, but rather ethernet. You have to setup a tftp server to host the demo.bin then
<nickoe> yeah, well, I am not really interesed in the ethernet for now
<nickoe> I just wanted to have a simulation with sdram enabled and be able to load my "demo" app
<nickoe> I have to call it a day
<nickoe> gn
<dayjaby> Good night!