Skip to content

Commit 0e07e59

Browse files
committed
docs: Add Python environment setup and requirements.txt
This commit adds: - A new 'Python Environment Setup' section to README.md with venv and Conda instructions. - A top-level requirements.txt file consolidating all project dependencies including verification tools, linters, and documentation generators. - System-level dependency requirements for building SciPy and other tools. Signed-off-by: Miguel Osorio <miguelosorio@google.com>
1 parent 1153a73 commit 0e07e59

File tree

2 files changed

+62
-2
lines changed

2 files changed

+62
-2
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,37 @@ Files under the [tools](tools/) directory may be available under a different lic
4242

4343
- Verilator **(4.106 or later)** must be installed on the system if running with Verilator
4444
- If adding/removing instructions, [`espresso`](https://github.com/chipsalliance/espresso/tree/master) must be installed (used by `tools/coredecode`). Remember to checkout on `3.x` branch.
45-
- RISCV tool chain (based on gcc version 8.3 or higher) must be
46-
installed so that it can be used to prepare RISCV binaries to run.
45+
- RISCV tool chain (based on gcc version 8.3 or higher) must be installed so that it can be used to prepare RISCV binaries to run.
46+
- [**Verible**](https://github.com/chipsalliance/verible) is used for SystemVerilog linting and formatting.
47+
- **Python 3.10+** is required for verification, documentation, and linting.
48+
49+
### Python Environment Setup
50+
51+
It is recommended to use a virtual environment (venv) or Conda to manage Python dependencies.
52+
53+
#### Using `venv`
54+
```bash
55+
# Create a virtual environment
56+
python3 -m venv .venv
57+
58+
# Activate it
59+
source .venv/bin/activate
60+
61+
# Install all project dependencies
62+
pip install -r requirements.txt
63+
```
64+
65+
#### Using `Conda`
66+
```bash
67+
# Create a conda environment
68+
conda create -n veer-el2 python=3.12
69+
70+
# Activate it
71+
conda activate veer-el2
72+
73+
# Install dependencies
74+
pip install -r requirements.txt
75+
```
4776

4877
## Quickstart guide
4978

requirements.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Build and Workflow Tools
2+
nox
3+
meson
4+
5+
# Linters
6+
isort
7+
black
8+
flake8
9+
10+
# Documentation
11+
Sphinx>=8.0.2,<9
12+
# Sphinx utilities
13+
https://github.com/antmicro/antmicro-sphinx-utils/archive/main.zip
14+
15+
# Verification - Core
16+
# Note: Custom cocotb might be required for some flows
17+
# ./third_party/cocotb
18+
cocotb==1.8.0
19+
cocotb-bus==0.2.1
20+
cocotb-coverage==1.1.0
21+
cocotb-test==0.2.4
22+
pyuvm==2.9.1
23+
24+
# Verification - Testing & Reporting
25+
pytest==7.4.1
26+
pytest-html==3.2.0
27+
pytest-timeout==2.1.0
28+
pytest-md==0.2.0
29+
30+
# Scientific/Math (used in some block tests)
31+
scipy==1.13.1

0 commit comments

Comments
 (0)