Skip to content

Commit d4eec43

Browse files
danghaitaoliug
authored andcommitted
Update information about instruction for running scripts (chipsalliance#420)
* riscv-dv requires python >=3 for install * README.md: Update information about running script Fixed chipsalliance#418
1 parent b91d240 commit d4eec43

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,35 @@ which supports SystemVerilog and UVM 1.2. This generator has been verified with
4040
Synopsys VCS, Cadence Incisive/Xcelium, and Mentor Questa simulators. Please
4141
make sure the EDA tool environment is properly setup before running the generator.
4242

43-
Install RISCV-DV:
43+
### Install RISCV-DV
4444

45+
Getting the source
4546
```bash
4647
git clone https://github.com/google/riscv-dv.git
47-
cd riscv-dv
48-
pip3 install -e .
48+
```
49+
50+
There are two ways that you can run scripts from riscv-dv. You can directly run
51+
by `python3`. Example:
52+
53+
```bash
54+
pip3 install -r requirements.txt # install dependencies (only once)
55+
python3 run.py --help
56+
```
57+
Or you can run by installing the scripts of riscv-dv. For developer guide, developers
58+
can test changes to scripts of riscv-dv by using "development mode" from python's
59+
setuptools package. First, cd to the directory where riscv-dv is cloned and run:
60+
61+
```bash
62+
pip3 install --user -e .
63+
```
64+
65+
This installs riscv-dv in a mode where any changes within the repo are immediately
66+
available simply by running `run`/`cov`. There is no need to repeatedly run `pip install .`
67+
after each change. Example for running:
68+
69+
```bash
70+
run --help
71+
cov --help
4972
```
5073

5174
### Setup RISCV-GCC compiler toolchain

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ include_package_data = True
1616
# Let pip install dependencies automatically.
1717
install_requires = PyYAML
1818
bitstring
19+
python_requires = >=3
1920

2021
[options.entry_points]
2122
# Set up an executable script that calls the main() function in riscv-dv

0 commit comments

Comments
 (0)