Commit 81b7b02
committed
cpu/cv32e41p: Keep standard variant on RV32IM
Issue #1364 reports litex_sim hanging with CV32E41P firmware built for RV32IMC. The analyzed failure is not in the LiteX wrapper: the archived CV32E41P RTL computes is_compressed_o in cv32e41p_merged_decoder.sv, but does not declare it as a decoder output port or connect it in cv32e41p_id_stage.sv.
With permissive SystemVerilog handling, id_stage_i.is_compressed becomes an implicit undriven net. The ID-stage IMMB_PCINCR path can then use pc+4 instead of pc+2 for compressed instructions; c.jal writes the wrong return address, skips the caller return-address restore, and loops.
A minimal CPU RTL fix was validated separately by declaring the decoder output, declaring logic is_compressed in the ID stage, and wiring .is_compressed_o(is_compressed). Since the CV32E41P repository is archived and the pythondata package tracks that RTL, keep LiteX on the known-good standard RV32IM variant and do not advertise an imc variant.
Tests: python3 -m pytest -q test/test_cpu.py1 parent 61bce27 commit 81b7b02
3 files changed
Lines changed: 35 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| |||
0 commit comments