You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trim READMEs to eliminate dual-source-of-truth drift, add --list CLI flags
The hw/rtl, sw, formal, and tests READMEs had exhaustive listings of
every module/app/target that duplicated what was already in code. This
created two sources of truth that were already drifting (3 sw apps were
undocumented in the old README).
- hw/rtl/README: replace file-by-file tree with subdirs-only map;
keep the architectural "Module Details" section (high-value, low-drift)
- sw/README: replace multi-paragraph app descriptions with a compact
20-row table of one-line summaries covering all apps; point to
source-level doc comments as the authoritative detail
- formal/README: replace target table with pointer to --list-targets
- tests/README: replace test table with pointer to --list-tests
- test_run_cocotb.py: add --list-tests flag (single source of truth)
- test_run_formal.py: add --list-targets flag (single source of truth)
|**cache_hit**|`cache_hit.sby`|`cache_hit_detector`| bmc, cover | MMIO exclusion, non-load exclusion, tag mismatch exclusion, byte/halfword/word valid bit checks |
34
-
|**cache_write**|`cache_write.sby`|`cache_write_controller`| bmc, cover | MMIO stores bypass cache, AMO byte enables, stale load prevention, store valid bit merging |
35
-
|**data_mem_arb**|`data_mem_arb.sby`|`data_mem_arbiter`| bmc, cover | Priority encoding (FP > AMO write > AMO stall > default), stall gates stores, AMO gets all bytes |
25
+
Formal targets are intentionally documented from code, not duplicated in this README.
26
+
The source of truth is `FORMAL_TARGETS` in `tests/test_run_formal.py` plus the `.sby`
27
+
files in this directory.
28
+
29
+
```bash
30
+
# List all targets and their supported tasks
31
+
./tests/test_run_formal.py --list-targets
32
+
33
+
# See CLI help (includes --target choices)
34
+
./tests/test_run_formal.py --help
35
+
```
36
36
37
37
## Running
38
38
@@ -42,6 +42,7 @@ pytest tests/test_run_formal.py
42
42
43
43
# Standalone runner
44
44
./tests/test_run_formal.py
45
+
./tests/test_run_formal.py --list-targets
45
46
./tests/test_run_formal.py --target hru
46
47
./tests/test_run_formal.py --task bmc
47
48
./tests/test_run_formal.py --verbose
@@ -129,15 +130,7 @@ Yosys supports a subset of SystemVerilog Assertions. Key constraints:
129
130
formal/
130
131
├── README.md # This file
131
132
├── .gitignore # Ignores sby working directories
132
-
├── hru.sby # Hazard resolution unit
133
-
├── lr_sc.sby # LR/SC reservation register
134
-
├── trap_unit.sby # Trap unit
135
-
├── csr_file.sby # CSR file
136
-
├── fwd_unit.sby # Forwarding unit
137
-
├── fp_fwd_unit.sby # FP forwarding unit
138
-
├── cache_hit.sby # Cache hit detector
139
-
├── cache_write.sby # Cache write controller
140
-
└── data_mem_arb.sby # Data memory arbiter
133
+
└── *.sby # Formal targets (one file per block)
141
134
```
142
135
143
136
Assertions live in the RTL files themselves (inside `ifdef FORMAL` blocks), not in separate files.
0 commit comments