Commit 8beff79
committed
forwarding_unit: fix stale cache-hit load data in int->fp forwarding
Use MA-stage load data as the single source of truth for dependent load forwarding
into int->fp conversions and MA bypass paths.
Root cause:
- On cache-hit load dependencies, forwarding selected
i_from_cache.data_loaded_from_cache_reg.
- That registered cache value can be stale relative to the current MA load result,
causing incorrect operands for dependent fcvt.d.w operations.
Fix:
- Set int_capture_bypass_data to i_from_ma_comb.data_loaded_from_memory.
- For forward_data_ma cache-hit forwarding, use
i_from_ma_comb.data_loaded_from_memory instead of
i_from_cache.data_loaded_from_cache_reg.
- Keep cache-hit dependency detection logic, but source forwarded data from MA.
Validation:
- test_run_cocotb.py --sim verilator cpu --random-seed=1772418093
- CPU cocotb regression summary: TESTS=21 PASS=21 FAIL=01 parent af53f90 commit 8beff79
1 file changed
+18
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
140 | 155 | | |
141 | 156 | | |
142 | 157 | | |
143 | 158 | | |
144 | | - | |
145 | | - | |
146 | | - | |
| 159 | + | |
| 160 | + | |
147 | 161 | | |
148 | 162 | | |
149 | 163 | | |
| |||
0 commit comments