Linty-Services / test-neorv32

0 stars 0 forks source link

sonarqube importation

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

coverage

GHDL coverage support

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 :

neorv32 coverage

prerequisite

Run

NX occupation measures

prerequisites

install impulse software from NanoXplore with the licence server.

Run

execute nxpython3 build.nxmap.py fromthe root of the project. A measures.json file should be created at the root of the project.