<somlo>
_florent_: turns out "identifier" doesn't work on 64bit (I think I knew that and was planning to investigate, but I forgot)
<somlo>
so with 6fe4994f booting with Rocket hangs after "Liftoff!"
<somlo>
I'm done for today ($DAYJOB wearing me out :) ) but hopefully I can make some time to dig into it tomorrow
gregdavill has joined #litex
Degi has quit [Ping timeout: 240 seconds]
Degi has joined #litex
proteusguy has quit [Ping timeout: 246 seconds]
jaseg has quit [Ping timeout: 272 seconds]
jaseg has joined #litex
<scanakci>
@_florent_, somlo: After I upgraded my LiteX version to the latest (and LiteDRAM as well), I also get fails in memtest when running BlackParrot on Genesys. I was using a LiteX version older than a month before upgrading to the most recent version (https://github.com/enjoy-digital/litex/commit/c136113a9b71cbcbdf525aaad38acb012f4a12f3). I do not remember which version of LiteDRAM I was using but most probably
<tpb>
Title: litedram_gen: expose a Bus Slave port instead of a CSR port. · enjoy-digital/litedram@fe47838 · GitHub (at github.com)
<scanakci>
Simulating using an SDRAM module works fine (i.e. memtest pass, and some random memory writes/reads that I perform also works fine) I used this exact command (./litex_sim.py --cpu-type blackparrot --cpu-variant standard --csr-data-width=32 --sdram-module MT41J256M16 --with-sdram)
SwimmingCode has joined #litex
gregdavill has quit [Ping timeout: 265 seconds]
<benh>
_florent_: the user I mentioned with issues on genesys reported that litex with vexriscv on genesys also fails the memory test
_franck_5 has joined #litex
_franck_ has quit [Ping timeout: 264 seconds]
_franck_5 is now known as _franck_
FFY00 has quit [Ping timeout: 244 seconds]
st-gourichon-fid has joined #litex
st-gourichon-fid has quit [Ping timeout: 260 seconds]
SwimmingCode has quit [Quit: leaving]
<_florent_>
benh, scanakci: i will do more test on the Genesys2, it you could provide me logs of the initialization, verilog sources and/or bitstream to test, that could help.
<_florent_>
somlo: that's strange the added identifier is preventing your from booting, even if not working, the issue is probably that adding the identifier has moved your CSRs. (the LiteX targets use dynamic CSR allocation, but it's possible to use fixed CSRs in your design if your Linux dts is generated manually).
<_florent_>
somlo: it could be related to the recent change we did on CSR/Wishbone DownConverter
<_florent_>
somlo: BTW, with https://github.com/enjoy-digital/litex/pull/580, the compile time with verilator is a lot faster (~5x) which is convenient for simulating Rocket since needs to be compiled with O3 to have decent simulation speed
SwimmingCode has joined #litex
<SwimmingCode>
Question: if I wanted to go about adding multiple UARTs/SPI/I2C instances, how would this be done within the Lite-X framework?
<SwimmingCode>
As far as I can tell, with the exception of the Timer and perhaps the memory modules, everything assumes it's the only instance of that piece of hardware
<SwimmingCode>
I've made it to the point of getting the migen to instantiate the modules, but then the generated interface code doesn't compile since the main system doesn't know anything about instanced methods
<_florent_>
benh: BTW, #580 is also interesting to speed up simulation with Microwatt + GHDL with litex_sim
<_florent_>
SwimmingCode: the BIOS indeed handles generally only one instance, but there is no restriction to add several instances to your SoC and handle it with a runtime software
<_florent_>
SwimmingCode: from what i understand, you are not able to generate the SoC? Could you provide the errors you have?
<SwimmingCode>
It's more that when instancing the peripherals, they should be logically grouped or numbered: i.e. uart0, uart1, uart2 or uart[3]
<SwimmingCode>
if the module's registers can be grouped as well, then the driver can trivially convert from an index vale into the hardware addresses
<SwimmingCode>
mucking down below in the codebase, I convinced it to generate a instanced name for the uart SoC.submodule
<_florent_>
but it also depends the kind of system you want to build
<SwimmingCode>
example error output:
<SwimmingCode>
/home/dciliske/litex/litex/litex/soc/software/libbase/uart.c:48:4: warning: implicit declaration of function 'uart_rxtx_write'; did you mean 'uart0_rxtx_write'? [-Wimplicit-function-declaration]
<SwimmingCode>
/home/dciliske/litex/litex/litex/soc/software/libbase/uart.c: In function 'uart_write':
<SwimmingCode>
/home/dciliske/litex/litex/litex/soc/software/libbase/uart.c:87:31: error: 'UART_INTERRUPT' undeclared (first use in this function); did you mean 'UART0_INTERRUPT'?
<SwimmingCode>
I'm fairly green with FPGAs, but my goal is to build a peripheral IC for adding essentially arbitrary numbers of low bandwidth peripherals to a main SoC
<_florent_>
the default LiteX targets and BIOS only provide 1 instance of each peripheral and let user add others instances and handle them with runtime software
<SwimmingCode>
can I inquire as to why they are treated differently?
<_florent_>
because depending the system, you don't necessarily want to handle the multiple peripherals in a similar way
<benh>
_florent_: ah nice, thanks
<SwimmingCode>
hmm... true
<SwimmingCode>
I'm coming at this from the land of rtoses, so perhaps my perspective here is a little different than most
<_florent_>
for example, if you have a SoC with CPU + ROM + RAM + 2 UARTs, only one of these UART will be used for the console
<SwimmingCode>
sure
<SwimmingCode>
but if I want to build a system that interfaces through standard file descriptors, they'll be treated the same
<SwimmingCode>
even if I'm *not* there's good odds that I'll want some sort of read8/write8/readn/writen/etc.
<SwimmingCode>
and this same basic procedure will be repeated multiple times
<SwimmingCode>
:/ sorry, I didn't mean to be complaining
<_florent_>
SwimmingCode: but i see your points, just that LiteX keeps things simple in the default targets/BIOS
<SwimmingCode>
so, question then: how am I expected to build out my more complex system?
<SwimmingCode>
do I add a Target to litex-boards?
<SwimmingCode>
or do I extract the guts of SoC and SoC-core and fork?
<SwimmingCode>
or something else?
<_florent_>
you can start from a target in litex-board
<SwimmingCode>
ok, that's where I'm at now
<_florent_>
and you can add your peripherals to the SoC, but not sure the add_ methods of LiteXSoC will allow you to easily add multiple instances of the same peripheral
<SwimmingCode>
well, I can confirm that at least for `add_uart` it doesn't.
<_florent_>
and rename your uart to uart1 , 2, 3 for example
<_florent_>
in the future, we could allow add_method to support multiple instances, but for now it's not the case
<SwimmingCode>
yeah, that's about where I was headed, I just know what it's like to write the software to handle this and it's less than ideal
<SwimmingCode>
well, thanks for at least pointing me in a direction
<_florent_>
SwimmingCode: i would be happy to see if we can improve this if this does not break things for previous designs, enabling multiple instances with add_uart would not be too complicated, you would still have uart0, uart1, uart2, etc.. submodules
<SwimmingCode>
does migen/litex have the ability to group instances of a peripheral or is it just based on the order of declaration?
<_florent_>
You could create a submodule with multiple instances, but each instances would still have its own CSRs
kgugala_ has joined #litex
kgugala__ has joined #litex
kgugala has quit [Ping timeout: 260 seconds]
kgugala_ has quit [Ping timeout: 246 seconds]
kgugala has joined #litex
kgugala__ has quit [Read error: Connection reset by peer]
kgugala_ has joined #litex
kgugala has quit [Ping timeout: 244 seconds]
indy has joined #litex
st-gourichon-fid has joined #litex
gregdavill has joined #litex
<somlo>
_florent_: I have to get in the habit of checking for shifting CSRs every time something seems to "break" :)
<somlo>
or maybe work on a building DTB into the bios automatically :)
proteusguy has joined #litex
_whitelogger has joined #litex
scanakci has quit [Quit: Connection closed for inactivity]
FFY00 has joined #litex
trabucayre has joined #litex
<st-gourichon-fid>
Hi all! Here using LiteX, design similar to FOMU, with an external more powerful CPU. FPGA becomes dedicated to I/O and real-time tasks. FOMU's VexRISCV softcore is FPGA-friendly, fully OSS workflow, yet still big. 32bit CPU not needed for such an I/O chip. OpenCores lists smaller CPU softcores. Would be fun to use e.g. A-Z80 which seems faithful to the battle-tested Z80, which I happen to know well. Also, we only
<st-gourichon-fid>
use Linux here, and so far only FLOSS. Any recommandation for a CPU that would play well with LiteX inside an ICE40?
<zyp>
you could try serv if small and slow is suitable for your needs
<st-gourichon-fid>
Okay, the TinyFPGA Bx with its ICE40 has a Core Score of 16, which means it can host 16 RISC-V SERV processors. Continuing video for information about speed. Thanks zyp for the hint.
kgugala has joined #litex
kgugala_ has quit [Ping timeout: 256 seconds]
<st-gourichon-fid>
No real hint about speed, but since SERV can power an I/O chip providing video interface for IR cameras used by mainstream FLIR company, it may be good enough for an I/O chip like ours.
<st-gourichon-fid>
Including booting the main CPU as we discussed yesterday.
<zyp>
I'd expect it to perform at about 1/32 of a non-serial rv32 implementation
kgugala_ has joined #litex
<st-gourichon-fid>
zyp, even when writing one byte, say, to drive a UARTbone?
<zyp>
yeah?
<zyp>
well, idk
<zyp>
why not just test it with a real world usecase? litex already supports it, so if you already have a suitable platform, you just have to pass --cpu-type serv
<zyp>
and the difference in memtest speed is on the order of 40x
<zyp>
but then again the rocket is rv64
FFY00 has quit [Read error: Connection reset by peer]
atommann6 has joined #litex
<atommann6>
Hi, I have a quick question: Does KC705 supports booting from a SDCard? I want to give it a try.
atommann6 has quit [Quit: Ping timeout (120 seconds)]
FFY00 has joined #litex
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #litex
FFY00 has quit [Remote host closed the connection]
<_florent_>
atommann6: (if you read the logs) yes, it has been added and tested
FFY00 has joined #litex
atommann91 has joined #litex
<atommann91>
_florent_ Thank you. I see your message in the log. My Internet connection is not stable.
<atommann91>
I' thinking if I use a Wi-Fi enabled SDCard, that will be convenient to update the files.
atommann91 has quit [Quit: Ping timeout (120 seconds)]
<somlo>
_florent_: what board are you using with the latest litesdcard changes? With nexys4ddr (and rocket), it hangs for me at "booting from sdcard in sd-mode / booting from boot.json...", with no fall-through to netboot or the bios command line
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #litex
Skip has joined #litex
scanakci has joined #litex
daddesio has quit [*.net *.split]
zyp has quit [*.net *.split]
zyp has joined #litex
Degi has quit [Ping timeout: 246 seconds]
daddesio has joined #litex
Degi has joined #litex
zyp has quit [*.net *.split]
kgugala_ has quit [*.net *.split]
jordigw has quit [*.net *.split]
acathla has quit [*.net *.split]
somlo has quit [*.net *.split]
acathla has joined #litex
kgugala_ has joined #litex
somlo has joined #litex
jordigw has joined #litex
zyp has joined #litex
<scanakci>
_florent_: sure. Does an email work for you?
<st-gourichon-fid>
zyp thanks for your reply about SERV and byte-size writes. We will probably try.
tcal has joined #litex
kgugala has joined #litex
kgugala_ has quit [Ping timeout: 240 seconds]
kgugala has quit [Read error: Connection reset by peer]
kgugala has joined #litex
Skip has quit [Remote host closed the connection]
<_florent_>
somlo: i'll continue working on it tomorrow but upstream was working with litex_sim --with-sdcard and on trellisboard with 16MHz clock
<_florent_>
scanakci: yes sure
sajattack[m] has quit [*.net *.split]
disasm[m] has quit [*.net *.split]
nrossi has quit [*.net *.split]
disasm[m] has joined #litex
nrossi has joined #litex
sajattack[m] has joined #litex
tcal has quit [Ping timeout: 264 seconds]
tcal has joined #litex
<somlo>
_florent_: hangs for me on trellisboard the same way as on nexys4ddr -- maybe it's a 32-vs-64-bit thing...
<tcal>
...also, are there any examples of accessing the Litex timer (or other performance information) from the user side in Zephyr?
<somlo>
_florent_: doesn't seem to be a 32-vs-64-bit thing, at least not on nexys4ddr
<_florent_>
somlo: ok thanks, there are still some changes i want to do, once done i'll do more tests on various boards/configurations
<somlo>
in an unrelated train of thought, i wonder how many fpu-enabled rocket cores I can cram in on a genesys2 board... apparently it's getting delivered tomorrow, so I'll have to find out :)
st-gourichon-fid has quit [Ping timeout: 260 seconds]