riscv-admin/riscv-ovpsim

RVE variant causing issues while programming elf file.

subhajit26 opened this issue · 7 comments

Hi,
Despite the fact that list of processor variant shows RV32E and I need that variant for baseline customization of Ibex core. I have also downloaded the toolchain file and model package file from ovpsim ..rv32E page but not being able to understand how to build the environment to run the program with RV32E variant. Any kind of suggestion with resources or commands will be of great help.

Seems you have posted this twice ?

Please describe exactly what will not run, this description is not detailed enough
-error messages ?
-unexpected behaviour ?

Also please provide a testcase or instructions to reproduce
Thx
Lee

Hi,
Extremely sorry for the inappropriate details.
The command ./riscvOVPsim.exe --variant RV32IMC --program gave me proper output
but the same when I am trying with variant RV32EMC , its not giving the output rather it is showing simulation exceptions are not enabled.
I looked though the files in this repository for a while but could not figure out the solution. I need help in running the above command with RV32EMC variant or atleast RV32EC.

The E configuration in the RISCV architecture excludes many instructions. You are probably trying to run an ELF file compiled for a RISCV I configuration, and thus getting illegal instruction exceptions (if you had posted the actual error messages then I could tell for sure.)

Make sure that if your choose an E variant in the simulator that you provide an ELF file properly compiled to target only the instructions included in the RISCV E configuration.

I am not sure what toolchain options you would use for this. Note that we are not the supporters of the toolchain - you need to ask elsewhere for this info.

@subhajit26
No problem, we can investigate the issue, but we need to have full instructions to reproduce the error

What is the full and exact command line you used
Please provide access to input files, eg ELF Program file

Also, please provide the error messages that you are seeing

Thx
Lee

Hi,
The full command is given below
./riscvOVPsim.exe --variant RV32IMC --program /home/ubuntu/riscv-ovpsim/examples/fibonacci/fibonacci.RISCV32.elf
Screenshot from 2020-11-05 00-10-12

I am trying to run the same command given that is given above with variant RV32E or RV32EC but then it shows some error. Please see the error screenshot below -
Screenshot from 2020-11-05 00-16-06.

path to the ELF file is mentioned in the command itself.

Ok, this makes sense
If you turn on instruction trace, I think you will find this elf file contains instructions which are not supported on the riscv E subset variant

In order to enable instruction trace you will need a copy of the riscvOVPsimPlus simulator, which is freely available at OVPWorld.org
https://www.ovpworld.org/riscvOVPsimPlus/

Thx
Lee

Please close this issue if you have no more questions.