assert not (PMP_NUM_REGIONS > 0) report "NEORV32 CPU CONFIG NOTE: Implementing ...
assert not ((CPU_EXTENSION_RISCV_Zihpm = true) and (HPM_NUM_CNTS > 0)) report "NEORV32 CPU ...
To apply patch execute : patch -u ./neorv32/rtl/core/neorv32_cpu.vhd -i neorv32_cpu.vhd.patch
patch -u ./neorv32/sim/run.py -i run.py.patch
to scan the project use command :
sonar-scanner -Dsonar.sources=. -Dsonar.projectKey=TEST_NEORV32 -Dsonar.host.url=https://sonar.linty-services.com -Dsonar.login=<token> -Dsonar.vhdl.topLevelEntity=neorv32_ProcessorTop_UP5KDemo -Dsonar.coverageReportPaths=./coverage.xml
GHDL can support coverage with the help of GCC backend with gcov.
To enable this feature you have to recompile GHDL with the official procedure or applie the one below if you are running Ubuntu 22.04.1 LTS (change gcc version to yours if not). The new ghdl
application will be installed in /opt/ghdl
. Do not forget to add it to the path with command export PATH=/opt/ghdl/bin:$PATH
to replace your previous ghdl version
by this one for the test.
$ sudo apt-get install gnat build-essential libmpc-dev flex bison libz-dev lcov gcc-11-source texinfo gcovr
$ git clone https://github.com/ghdl/ghdl.git
$ cd /usr/src/gcc-11
$ sudo tar xvf gcc-11.3.0.tar.xz
$ cd gcc-11.3.0
$ ./contrib/download_prerequisites
$ cd ghdl
$ mdir build
$ cd build
$ ../configure --with-gcc=/usr/src/gcc-11/gcc-11.3.0 --prefix=/opt/ghdl
$ make copy-sources
$ mkdir gcc-objs; cd gcc-objs
$ /usr/src/gcc-11/gcc-11.3.0/configure --prefix=/opt/ghdl --enable-languages=c,vhdl --disable-bootstrap --disable-lto --disable-multilib --disable-libssp --disable-libgomp --disable-libquadmath --enable-default-pie
$ make -j4 && make install MAKEINFO=true
$ cd ..
$ make ghdllib
$ make install
GHDL-gcc support version automatically pack the coverage support. you can use :
docker version fedora36-gcc-11.3.0 from GHDL docker hub.
or daily binaires ghdl-gha-ubuntu-22.04-gcc.tgz from ghdl but be careful with GCC version ( even if I was running on ubuntu 22.04 I got a library error libgcov profiling error:./ghdl-coverage-master/projects/adder/adder.gcda:Version mismatch - expected 11.3 (release) (B13*) got 11.2 (release) (B12*)
trying to execute it).
pip install vunit_hdl
pip install gcovr
pip install beautifulsoup4
export PATH=<ghdl/bin/path>:$PATH
VUNIT_SIMULATOR=ghdl
VUNIT_SIMULATOR=ghdl ./run.py
in the neorv32-1.7.8/sim/
coverage.xml
file will be created at the root of the project.install impulse
software from NanoXplore with the licence server.
execute nxpython3 build.nxmap.py
fromthe root of the project. A measures.json
file should be created at the root of the project.