@ -18,18 +18,33 @@ If `nix` is not installed, follow this [guide](https://librelane.readthedocs.io/
## Usage
## Usage
Compile jpeg decoder core using `iverilog` and run RTL simulation of the jpeg decoder core using `vvp`:
Compile jpeg decoder core using `iverilog` and run RTL simulation of the jpeg decoder core using `vvp`:
```
```
nix develop
nix develop
make
make
uv run jpeg_core_tb_run_plasma.py
uv run jpeg_core_tb_run_plasma.py
```
```
Call `uv run jpeg_core_tb_run_plasma.py --help` for more options.
Load synthesized circuits and display statistics (example code):
Load synthesized circuits and display statistics (example code):
```
```
uv run load_sky130_circuits.py
uv run load_sky130_circuits.py
```
```
Works also outside a `nix develop` shell if [uv](https://docs.astral.sh/uv/) is installed on the base system. The script demonstrates how to obtain synthesized netlists via nix derivations [published in this github repository](https://github.com/s-holst/benchmark-circuits). These circuits along with layout and timings are built on-demand (using LibreLane) if not yet available in local nix store.
Run picorv32's built-in testbench (generate `picorv32/testbench.vcd`):
```
make test_vcd
```
or
```
make test_ez_vcd
```
Import generated VCD with kyupy and convert it to a pattern file for later fault simulation:
```
uv run picorv32_vcd_import.py picorv32/testbench.vcd patterns.npy
```
Call `uv run picorv32_vcd_import.py --help` for more options.
Some `uv` commands work also outside a `nix develop` shell if [uv](https://docs.astral.sh/uv/) is installed on the base system. The script demonstrates how to obtain synthesized netlists via nix derivations [published in this github repository](https://github.com/s-holst/benchmark-circuits). These circuits along with layout and timings are built on-demand (using LibreLane) if not yet available in local nix store.
parser=argparse.ArgumentParser(description='Imports a VCD file from PicoRV32 simulation into kyupy, simulates a few cycles and save the patterns as npy file for later fault simulation.')
parser.add_argument('dut',type=str,help='verilog file with unit under test (uut)')