avl-riscv-coverage 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- avl_riscv_coverage/__init__.py +24 -0
- avl_riscv_coverage/__main__.py +185 -0
- avl_riscv_coverage/_coverage.py +32 -0
- avl_riscv_coverage/_elf.py +154 -0
- avl_riscv_coverage/_instr.py +78 -0
- avl_riscv_coverage/_isa.py +523 -0
- avl_riscv_coverage/_spike.py +54 -0
- avl_riscv_coverage/_trace.py +54 -0
- avl_riscv_coverage/coverage_packages/_compression.py +23 -0
- avl_riscv_coverage/coverage_packages/_jump.py +40 -0
- avl_riscv_coverage/coverage_packages/_opcodes.py +25 -0
- avl_riscv_coverage/instr_dict.json +15741 -0
- avl_riscv_coverage-0.0.1.dist-info/METADATA +177 -0
- avl_riscv_coverage-0.0.1.dist-info/RECORD +17 -0
- avl_riscv_coverage-0.0.1.dist-info/WHEEL +4 -0
- avl_riscv_coverage-0.0.1.dist-info/entry_points.txt +3 -0
- avl_riscv_coverage-0.0.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: avl-riscv-coverage
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Apheleia Verification Library RISCV Coverage Framework. Collect architectural coverage from elf and trace files with no HDL intermediate
|
|
5
|
+
License: MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) [2025] [avl@projectapheleia.net]
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Author: avl
|
|
28
|
+
Author-email: avl@projectapheleia.net
|
|
29
|
+
Maintainer: avl
|
|
30
|
+
Maintainer-email: avl@projectapheleia.net
|
|
31
|
+
Requires-Python: >=3.10
|
|
32
|
+
Classifier: Development Status :: 4 - Beta
|
|
33
|
+
Classifier: Programming Language :: Python
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: avl-core (>=0.4.1)
|
|
36
|
+
Requires-Dist: black (>=22.3.0) ; extra == "dev"
|
|
37
|
+
Requires-Dist: matplotlib (>=3.10.0) ; extra == "dev"
|
|
38
|
+
Requires-Dist: mypy (>=0.910) ; extra == "dev"
|
|
39
|
+
Requires-Dist: pytest (>=7.0) ; extra == "dev"
|
|
40
|
+
Requires-Dist: ruff (>=0.11.0) ; extra == "dev"
|
|
41
|
+
Requires-Dist: sphinx (>=8.1.3) ; extra == "dev"
|
|
42
|
+
Requires-Dist: sphinx_rtd_theme (>=3.0.2) ; extra == "dev"
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
|
|
45
|
+
# AVL RISCV Coverage - Apheleia Verification Library RISCV Coverage Framework
|
|
46
|
+
|
|
47
|
+
[](LICENSE)
|
|
48
|
+
[](https://www.python.org/)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
AVL RISCV Coverage has been developed by experienced, industry professional verification engineers to provide a framework \
|
|
52
|
+
and library of base classes for developing functional coverage for RISCV processors in [Python](https://www.python.org/) using \
|
|
53
|
+
the compiled test code and trace files. Coverage can be generated from higher level models with no HDL intermediate.
|
|
54
|
+
|
|
55
|
+
- Although a default instr_dict.json is provided, it can be overridden on the commandline.
|
|
56
|
+
|
|
57
|
+
- An elf file and spike trace are required.
|
|
58
|
+
|
|
59
|
+
- Additional coverage packages can be added from the commandline.
|
|
60
|
+
|
|
61
|
+
- Output is generated in AVL coverage.json and optionally rendered into html.
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
usage: avl-riscv-coverage [-h] [--ref REF] [--extensions [EXTENSIONS ...]] [--packages [PACKAGES ...]] [--elf ELF] [--trace TRACE] [--output OUTPUT] [--html] [--verbose]
|
|
65
|
+
|
|
66
|
+
options:
|
|
67
|
+
-h, --help show this help message and exit
|
|
68
|
+
--ref REF Pointer to instr_dict.json (generated from https://github.com/riscv/riscv-opcodes) (default: ./avl-riscv-coverage/avl_riscv_coverage/instr_dict.json)
|
|
69
|
+
--extensions [EXTENSIONS ...
|
|
70
|
+
List of extensions
|
|
71
|
+
--packages [PACKAGES ...]
|
|
72
|
+
List of python packages containing covergroups
|
|
73
|
+
--elf ELF Elf file for testcase
|
|
74
|
+
--trace TRACE List of trace files
|
|
75
|
+
--output OUTPUT Output directory for report
|
|
76
|
+
--html Generate HTML report
|
|
77
|
+
--verbose Verbose messages
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## ๐ฆ Installation
|
|
83
|
+
|
|
84
|
+
### Using `pip`
|
|
85
|
+
```sh
|
|
86
|
+
# Standard build
|
|
87
|
+
pip install avl-riscv-coverage
|
|
88
|
+
|
|
89
|
+
# Development build
|
|
90
|
+
pip install avl-riscv-coverage[dev]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Install from Source
|
|
94
|
+
```sh
|
|
95
|
+
git clone https://github.com/projectapheleia/avl-riscv-coverage.git
|
|
96
|
+
cd avl-riscv-coverage
|
|
97
|
+
|
|
98
|
+
# Standard build
|
|
99
|
+
pip install .
|
|
100
|
+
|
|
101
|
+
# Development build
|
|
102
|
+
pip install .[dev]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Alternatively if you want to create a [virtual environment](https://docs.python.org/3/library/venv.html) rather than install globally a script is provided. This will install, with edit privileges to local virtual environment.
|
|
106
|
+
|
|
107
|
+
This script assumes you have [Verilator](https://www.veripool.org/verilator/), [GTKWave](https://gtkwave.sourceforge.net/) and [Graphviz](https://graphviz.org/download/) installed, so all examples and documentation will build out of the box.
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
git clone https://github.com/projectapheleia/avl-riscv-coverage.git
|
|
112
|
+
cd avl-riscv-coverage
|
|
113
|
+
source avl-riscv-coverage.sh
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## ๐ Documentation
|
|
117
|
+
|
|
118
|
+
In order to build the documentation you must have installed the development build.
|
|
119
|
+
|
|
120
|
+
### Build from Source
|
|
121
|
+
```sh
|
|
122
|
+
cd docs
|
|
123
|
+
make html
|
|
124
|
+
<browser> build/html/index.html
|
|
125
|
+
```
|
|
126
|
+
## ๐ Examples
|
|
127
|
+
|
|
128
|
+
In order to run all the examples you must have installed the development build.
|
|
129
|
+
|
|
130
|
+
To run all examples:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
cd examples
|
|
134
|
+
|
|
135
|
+
# To run
|
|
136
|
+
make -j 8 sim
|
|
137
|
+
|
|
138
|
+
# To clean
|
|
139
|
+
make -j 8 clean
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
To run an individual example:
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
cd examples/THE EXAMPLE YOU WANT
|
|
146
|
+
|
|
147
|
+
# To run
|
|
148
|
+
make sim
|
|
149
|
+
|
|
150
|
+
# To clean
|
|
151
|
+
make clean
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
## ๐งน Code Style & Linting
|
|
158
|
+
|
|
159
|
+
This project uses [**Ruff**](https://docs.astral.sh/ruff/) for linting and formatting.
|
|
160
|
+
|
|
161
|
+
Check code for issues:
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
ruff check .
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Automatically fix common issues:
|
|
168
|
+
|
|
169
|
+
```sh
|
|
170
|
+
ruff check . --fix
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## ๐ง Contact
|
|
174
|
+
|
|
175
|
+
- Email: avl@projectapheleia.net
|
|
176
|
+
- GitHub: [projectapheleia](https://github.com/projectapheleia)
|
|
177
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
avl_riscv_coverage/__init__.py,sha256=fIqyzv6BT8dg1MVtJlhBudDGzv1oy7KIVzw7306rHG8,519
|
|
2
|
+
avl_riscv_coverage/__main__.py,sha256=_ExnIrAlpc6TDsqzgpD4fxiGnX3hE7IpPS0ZIXf9ZMk,5854
|
|
3
|
+
avl_riscv_coverage/_coverage.py,sha256=-FdbvM3AgZJU64CuhM74F621-vS289L-0yBdpqaBLMk,601
|
|
4
|
+
avl_riscv_coverage/_elf.py,sha256=-g818FHY6U5DaO3SzHpV7iw5Utbmet2kraGvw2SnLfg,4667
|
|
5
|
+
avl_riscv_coverage/_instr.py,sha256=98GKakCwmHVVk4e6VOsnMXy-USbIJE229GdjZ3Z-Sjs,2076
|
|
6
|
+
avl_riscv_coverage/_isa.py,sha256=0aZHSaLdkM195_zjqi8PK14nJPSuB4kN8EyEPpXI4q4,15171
|
|
7
|
+
avl_riscv_coverage/_spike.py,sha256=B-ftpD7koz5dB9vZAGhyeKDrmZrEuLRStGEL1-nJi9Q,1379
|
|
8
|
+
avl_riscv_coverage/_trace.py,sha256=LRLLd0dqOG2HmJKoutCUkfe9iYfwLKs-4CdT6zC7_vU,1340
|
|
9
|
+
avl_riscv_coverage/coverage_packages/_compression.py,sha256=G1Wr2xAUITQqw9zPfOJ4Oj-CGN_-lC1nkgc_4R422Vo,716
|
|
10
|
+
avl_riscv_coverage/coverage_packages/_jump.py,sha256=KqfA-BrS9zpIJCAy9mVrgnk8otWM3S2Fg27DG3x3nRw,1323
|
|
11
|
+
avl_riscv_coverage/coverage_packages/_opcodes.py,sha256=Ak3EL-EeABDz_goV1NyXkgaWlf4qBRo86mbxw6wVZk0,725
|
|
12
|
+
avl_riscv_coverage/instr_dict.json,sha256=MhduE1eT4vu6rS1MjFT9h8jgnHWma4bh-ZfT54CnYZA,281399
|
|
13
|
+
avl_riscv_coverage-0.0.1.dist-info/METADATA,sha256=tukJM3wEgCIQxPqlEQip_2MJ3H6le7xTaXY-UqfhtA8,5702
|
|
14
|
+
avl_riscv_coverage-0.0.1.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88
|
|
15
|
+
avl_riscv_coverage-0.0.1.dist-info/entry_points.txt,sha256=Xq6SKoMX5ZoYeoQzV3XfTOK8kv4vIfDMJGNBVSsiyIk,71
|
|
16
|
+
avl_riscv_coverage-0.0.1.dist-info/licenses/LICENSE,sha256=ntEa8g0YiBGeJaIJhIjvbmSi_5Jzr0s_Z_O5j2kkC1c,1084
|
|
17
|
+
avl_riscv_coverage-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [2025] [avl@projectapheleia.net]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|