-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endless illegal instructions when running elf executables #2135
Comments
I notice that the first PC that is reported is 0x00100000, but your code starts at Is the problem just that you've started at the wrong address? |
0x464c457f is the ELF magic number, could the file have been loaded 'raw'? Also shouldn't the code be at 0010xxxx but the disassembly seems to be 0001xxxx? |
now the first instruction is at the address of
instructions are still reported illegal but at a different address again:
Actually the first illegal instruction is always reported at a different address if I run a different binary, although the start address of these binaries are all the same at |
I'd suggest taking a look at the simulation trace that's coming out. Notice that the cycle counter in the first column is now going up by 80 each line (instead of just one). My guess is that Ibex thinks it's running 79 valid instructions in the gaps... |
actually the boot address of ibex is not 0x100000 but 0x100080, we should start the program at that address. |
I am using the simple system example of Ibex to run a program with Verilator, the program is generated by a random instrucion generator.
A short example of assembly files look like this:
I use riscv gnu toolchain to compile it with command:
riscv64-unknown-elf-gcc -march=rv32imac -mabi=ilp32 -nostdlib -nostartfiles -o test test.s
the disassembly looks as below, and it seems to be no problem:
However, when I simulate the simple system example of Ibex with this elf using Verilator and command:
./build/lowrisc_ibex_ibex_simple_system_0/sim-verilator/Vibex_simple_system -t --meminit=ram,test
ibex seems to be not able to execute these instructions as all I've got is endless illegal instruction like this:
Can anybody help me as to point out at which step I am making a mistake?
The text was updated successfully, but these errors were encountered: