Please help to simulate noelv-generic

Hello,

I am trying to compile noel-v systest using ‘make soft’
with ncc-1.0.4-gcc (the single compiler for noel-v that i’ve found on the gasiler.com site)
i get the following error
laur@laurPC-100:noelv-generic$ make soft
riscv-gaisler-elf-gcc -I./…/…/software/noelv/systest/sw -I./…/…/software/greth/ -I./…/…/software/l2c/ -mcmodel=medany -static -std=gnu99 -O2 -march=rv64ima_zicsr_zifencei -mabi=lp64 -Wl,–no-gc-sections -nostdlib -T./…/…/software/noelv/systest/prom.link ./…/…/software/noelv/systest/prom.S -o prom.elf
cc1: error: ‘-march=rv64ima_zicsr_zifencei’: unsupported ISA subset ‘z’

Please, also tell me if prom.srec and ram.srec that come by default with grlib 2024.2
for noelv-generic are for riscv 32 or 64. However, when I try to simulate using ghdl 5.0 I get segmentation fault
no matter if I choose 32 or 64 in make xconfig.

Note that leon3mp works with ghdl 5.0.0-dev.

Thank you

Hello,
“zicsr” and “zifencei” is not supported by the riscv-gaisler-elf-gcc.

To print supported march and mabi values, please run
riscv-gaisler-elf-gcc -print-multi-lib

Hi, did you succeed in simulate noelv-generic with ghdl? What version of ghdl have you used and what changes to the makefile are necessary in order to successfully test ‘make soft’

if i set -march=rv64imac in the makefile i get core dumped in simulation

thank you

Hi!

We know there have been some issues with simulating with GHDL before. This should hopefully have been fixed in the 2024.4 release. Let me know if you are still having issues after this release.

hello,

make ghdl-run
it compiles and then

./testbench --assert-level=error --ieee-asserts=disable
./testbench:error: bound check failure at ./rtl/core/noelvcore.vhd:382
in process .testbench(behav).cpu@noelvmp(rtl).core0@noelvcore(rtl).no_ahbjtagrvgen0.P1
./testbench:error: error during elaboration
make: *** […/…/bin/Makefile:509: ghdl-run] Error 1

I can’t replicate the issue you are having I was however wrong about the ram model being updated in the 2024.4 release.

Once I applied the patch found here I could successfully launch a simulation with ghdl GHDL 5.0.0-dev (4.1.0.r479.gc319b79b5) [Dunoon edition]
I am running the design found in designs/noelv-generic with CFG_DISAS=3 (config.vhd)

Sorry I was mistaken in my last reply, I did things incorrectly and I can reproduce what you are seeing. You can simply comment out line 382 for now.

thank you, it noelv starts.
i am facing the following problem when trying make soft;

laur@laurPC-100:noelv-generic$ make soft
riscv-none-elf-gcc -I./…/…/software/noelv/systest/sw -I./…/…/software/greth/ -I./…/…/software/l2c/ -mcmodel=medany -static -std=gnu99 -O3 -march=rv32ima_zicsr_zifencei -mabi=ilp32 -DNOELV_SYSTEST -DSYSTEST_TYPE=GRETH_SYSTEST -DGRLIB_REPORTDEV_BASE=0x80000000ULL -DAPBUART_ADDR_SYSTEST=0xfc001000ULL -DGRETH_ADDR_SYSTEST=0xfc084000ULL -c ./…/…/software/noelv/systest/sw/gptimer.c -o obj//gptimer.o
./…/…/software/noelv/systest/sw/gptimer.c:8:12: fatal error: bcc/bcc.h: No such file or directory
8 | # include “bcc/bcc.h”

^~~~~~~~~~~
compilation terminated.
make: *** […/…/software/noelv/systest/Makefile:78: obj//gptimer.o] Error 1

sorry for my last message, i was using a wrong compiler (riscv-none-elf-gcc)
now, with gaisler gcc compiler if i do make ghdl-run, i get the following

noelvsys: ---------------------------------------------------
noelvsys: Memory map:
noelvsys: 0x00000000-0x7fffffff Single-port AHB SRAM module
noelvsys: 0x80000000-0x800fffff Test report module
noelvsys: 0x80100000-0xbfffffff Unmapped AHB space
noelvsys: 0xc0000000-0xdfffffff Single-port AHB SRAM module
noelvsys: 0xe0000000-0xe00fffff RISC-V ACLINT
noelvsys: 0xe0100000-0xf7ffffff Unmapped AHB space
noelvsys: 0xf8000000-0xfbffffff RISC-V PLIC
noelvsys: 0xfc000000-0xff8fffff Unmapped AHB space
noelvsys: 0xff900000-0xff9fffff AHB/APB Bridge
noelvsys: 0xff900000-0xff9000ff Generic UART
noelvsys: 0xff900100-0xff907fff Unmapped APB space
noelvsys: 0xff908000-0xff9080ff Modular Timer Unit
noelvsys: 0xff908100-0xff980fff Unmapped APB space
noelvsys: 0xff981000-0xff9810ff Version and Revision Register
noelvsys: 0xff981100-0xff981fff Unmapped APB space
noelvsys: 0xff982000-0xff9820ff AHB Status Register
noelvsys: 0xff982100-0xff982fff Unmapped APB space
noelvsys: 0xff983000-0xff9830ff General Purpose I/O port
noelvsys: 0xff983100-0xff983fff Unmapped APB space
noelvsys: 0xff984000-0xff9840ff GR Ethernet MAC
noelvsys: 0xff984100-0xff985fff Unmapped APB space
noelvsys: 0xff986000-0xff9860ff AHB Debug UART
noelvsys: 0xff986100-0xff9fffff Unmapped APB space
noelvsys: 0xffa00000-0xffffefff Unmapped AHB space
noelvsys: 0xfffff000-0xffffffff Plug’n’play table
noelvsys: ---------------------------------------------------

**** GRLIB system test starting ****
Test passed, halting with IU error mode

./…/…/lib/gaisler/sim/ahbrep.vhd:145:9:@82571ns:(assertion failure): Assertion violation
./testbench:error: assertion failed
in process .testbench(behav).cpu@noelvmp(rtl).core0@noelvcore(rtl).test0@ahbrep(rtl).log
./testbench:error: simulation failed
make: *** […/…/bin/Makefile:509: ghdl-run] Error 1

That is the expected behavior, if you want to see the instructions that are executed you can set CFG_DISAS=1 in designs/noelv-generic/config.vhd
If you want to load your own program you can convert your elf file to an srec, name it ram.srec and then do make ghdl-run.