forked from chipsalliance/Cores-VeeR-EL2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3ef883
commit 63b3c34
Showing
1 changed file
with
6 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# Verification | ||
|
||
The verification directory contains [cocotb](https://github.com/cocotb/cocotb) tests and [pyuvm](https://github.com/pyuvm/pyuvm) tests | ||
The verification directory contains [pyuvm](https://github.com/pyuvm/pyuvm) tests, which rely on [cocotb](https://github.com/cocotb/cocotb) library. | ||
|
||
## Setup | ||
|
||
In order to run the tests, one must clone the repository, create a python virtual environment and patch cocotb's verilator support file. Verilator is used as a backend simulator and must be present in the system. | ||
In order to run the tests, create a python virtual environment. Verilator is used as a backend simulator and must be present in the system. | ||
|
||
### Clone repository | ||
|
||
Remember to set the `RV_ROOT` environment variable, which is required to generate a VeeR-EL2 Core configuration files. | ||
Remember to set the `RV_ROOT` environment variable, which is required to generate VeeR-EL2 Core configuration files. | ||
|
||
git clone [email protected]:chipsalliance/Cores-VeeR-EL2.git | ||
git clone --recurse-submodules [email protected]:chipsalliance/Cores-VeeR-EL2.git | ||
cd Cores-Veer-EL2 | ||
export RV_ROOT=$(pwd) | ||
|
||
|
@@ -21,20 +21,9 @@ Remember to set the `RV_ROOT` environment variable, which is required to generat | |
source venv/bin/activate | ||
pip install -r requirements.txt | ||
|
||
### Patch cocotb | ||
|
||
Due to issues with Verilator's `--timing` options, the `cocotb/share/lib/verilator.cpp` must be patched. The `--timing` option is only required if the HDL code contains timing structures. | ||
|
||
TODO: update link to upstream when patch is merged | ||
|
||
cd $RV_ROOT/third_party | ||
git clone https://github.com/antmicro/cocotb | ||
git checkout mczyz/verilator-patch-timing | ||
pip install -e $RV_ROOT/third_party/cocotb | ||
|
||
### Install Verilator | ||
|
||
Verification tests were run with Verilator-5.0.10. Installation instruction is avaialable in the Verilator's User Guide: | ||
Verification tests were run with Verilator-5.0.10. Installation instruction is available in the Verilator's User Guide: | ||
|
||
https://veripool.org/guide/latest/install.html | ||
|
||
|
@@ -44,13 +33,7 @@ All tests are wrapped in a pytest, which can be executed with: | |
|
||
python -m pytest -sv <test_name> | ||
|
||
If you want to generate html reports, it is recommended to use: | ||
|
||
python -m pytest -v <test_name> --html=index.html | ||
|
||
If you want to generate a mardkown report, it is recommended to use: | ||
|
||
python -m pytest -v <test_name> --md=test.md | ||
Note that HTML report can be produced with flag `--html=index.html` and a markdown report with `--md=test.md` | ||
|
||
### PyUVM | ||
|
||
|
@@ -64,7 +47,3 @@ Also available targets are: | |
make clean | ||
make verilator-pyuvm | ||
|
||
Run all tests: | ||
|
||
python -m pytest -sv test.py | ||
|