Commit d9fc6da
committed
Pipeline the FP divider and sqrt paths in fp_div_shim
Convert fp_divider.sv and fp_sqrt.sv from sequential FSMs to fully
pipelined datapaths using generate blocks to unroll the iterative
division/sqrt loops. Pipeline depths: SP=36 stages, DP=65 stages.
Rewrite fp_div_shim to directly instantiate 4 sub-units (div_s, div_d,
sqrt_s, sqrt_d) with per-sub-unit tag queue shift registers, holding
registers, a fixed-priority arbiter, and a depth-4 result FIFO.
Credit-based back-pressure prevents FIFO overflow. Add i_div_accepted
port and wire fp_div_result_accepted in tomasulo_wrapper.
Retain o_stall port (tied low) on both pipelined units for backward
compatibility with the in-order fpu_div_sqrt_unit, which connects but
does not read it.
Update cocotb tests with FIFO-based output protocol (drive i_div_accepted
to pop results) and add pipeline-specific tests: back-to-back issue,
interleaved div/sqrt, multi-op flush, and FIFO backpressure.1 parent e9c0381 commit d9fc6da
File tree
8 files changed
+1990
-1175
lines changed- hw/rtl/cpu_and_mem/cpu
- ex_stage/fpu
- tomasulo
- fu_shims
- tomasulo_wrapper
- verif/cocotb_tests/tomasulo/fu_shims
8 files changed
+1990
-1175
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
| 306 | + | |
| 307 | + | |
308 | 308 | | |
309 | | - | |
310 | | - | |
| 309 | + | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
| 314 | + | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
326 | | - | |
| 325 | + | |
| 326 | + | |
327 | 327 | | |
328 | | - | |
329 | | - | |
| 328 | + | |
| 329 | + | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
343 | | - | |
| 342 | + | |
| 343 | + | |
344 | 344 | | |
345 | | - | |
346 | | - | |
| 345 | + | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
0 commit comments