ucb-bar / hwacha-template

Template for projects using the Hwacha data-parallel accelerator
http://hwacha.org/
Other
34 stars 10 forks source link

System stuck at wfi #2

Open suehtamacv opened 5 years ago

suehtamacv commented 5 years ago

After a clean install of Hwacha (i.e., running make where needed), both the verilated and vcs simulators get stuck at _halt's wfi when running any test, even though the tests run fine with spike. Is this issue known?

This being said, there might be an issue with the bootrom. The make on a freshly-cloned repository complained about the absence of the bootrom folder in the root. I created a symlink from rocket-chip/bootrom that silenced this error.

a0u commented 5 years ago

6f35066b6b3c1890e3d98b8b1893bbdcd0f698e5 fixes the bootrom path. The intended bootrom image actually resides in testchipip, but the one in rocket-chip should also work for running the tests.

https://github.com/ucb-bar/hwacha-template/blob/8b30e186bcbf56549204b0e9800bd4f23228d8f7/src/main/scala/example/Configs.scala#L14

I am not able to reproduce your wfi issue. Are you using linking against libfesvr.so built from riscv/riscv-fesvr@68c12d06ebbdfe20856b886570822fe66804fd26 (the submodule version that esp-tools currently points toward)? fesvr should be triggering a debug interrupt to load the program, after which it will jump to the program entry point when returning from debug mode.