enjoy-digital / litex

Build your hardware, easily!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

litex_json2renode.py --bios-binary doesn't load bios to rom - wiki example doesn't work

AndrewD opened this issue · comments

https://github.com/enjoy-digital/litex/wiki/Generate-Renode-simulation describes using --bios-binary to load the bios as a "quick start" example, but this was broken by json2renode: Use opensbi->base for bios binary which changes the behaviour to assume the "bios" is actually opensbi. This means the only supported option for this script is a smp cpu with opensbi.

I suspect that commit should really have added an alternate --opensbi-binary command line option.

I nearly gave up on renode for litex after a rather time consuming exercise trying to work out how to make the documented example work.

I also tried to use --firmware-binary to load the bios to address 0x0, but this is hard coded to only load firmware to spiflash.

I had to manually edit the generated litex.resc to load the bios and set PC.

Note that the public renode examples mentioned in Try out Renode quickly with precompiled LiteX demos do work. The renode litex examples in the renode distribution also work OK. Examples include: renode @scripts/single-node/litex_vexriscv_smp.resc

More examples (on arch linux):

% ls /opt/renode/scripts/single-node/litex*
/opt/renode/scripts/single-node/litex_ibex.resc
/opt/renode/scripts/single-node/litex_microwatt.resc
/opt/renode/scripts/single-node/litex_minerva.resc
/opt/renode/scripts/single-node/litex_nexys_video_vexriscv_linux.resc
/opt/renode/scripts/single-node/litex_vexriscv.resc
/opt/renode/scripts/single-node/litex_vexriscv_linux.resc
/opt/renode/scripts/single-node/litex_vexriscv_micropython.resc
/opt/renode/scripts/single-node/litex_vexriscv_sdcard.resc
/opt/renode/scripts/single-node/litex_vexriscv_smp.resc
/opt/renode/scripts/single-node/litex_vexriscv_tftp.resc
/opt/renode/scripts/single-node/litex_vexriscv_tock.resc
/opt/renode/scripts/single-node/litex_vexriscv_verilated_cfu.resc
/opt/renode/scripts/single-node/litex_vexriscv_zephyr.resc