litex icon indicating copy to clipboard operation
litex copied to clipboard

Litex-demo-app prompt not answering in simulation

Open mohamedElbouazzati opened this issue 3 years ago • 1 comments

Hello @enjoy-digital, I want to simulate the bare metal demo application on RISC-V cores and I had this bug of no prompt response.

Cores tested : Ibex, cv32e40p, cv32e41p same result:

The litex bios prompt works well for me.

litex_sim --integrated-rom-size 0x10000 --cpu-type cv32e41p --rom-init litex/litex/soc/software/demo/demo.bin 

[xgmii_ethernet] loaded (0x559f082daef0)
[ethernet] loaded (0x559f082daef0)
[serial2console] loaded (0x559f082daef0)
[serial2tcp] loaded (0x559f082daef0)
[gmii_ethernet] loaded (0x559f082daef0)
[clocker] loaded
[spdeeprom] loaded (addr = 0x0)
[clocker] sys_clk: freq_hz=1000000, phase_deg=0

LiteX minimal demo app built Feb 22 2022 11:40:23

Available commands:
help               - Show this command
reboot             - Reboot CPU
donut              - Spinning Donut demo
helloc             - Hello C
litex-demo-app>  # i can't write any thing here 

Any idea to fix this problem. Thank you

mohamedElbouazzati avatar Feb 22 '22 14:02 mohamedElbouazzati

Did you create the demo.bin with this command: litex_bare_metal_demo --build-path=build/sim? If you use the prebuilt demo.bin then it might be based on the wrong csr.csv file. I just tried reproducing this. With --cpu-type vexriscv and --cpu-type cv32e40p everything works fine.

cv32e41p just prints random characters so I guess that cpu integration is somehow broken. For ibex I'm also running into issues with Verilator. Which version of Verilator are you using?

troibe avatar Mar 29 '22 14:03 troibe