Skip to content

Commit

Permalink
Add pipeline register after LoopMatmul units (#60)
Browse files Browse the repository at this point in the history
* Add pipeline register between LoopMatmul and ROB

* Use a 2-entry queue instead

* Monitor all pipeline registers for io.busy
  • Loading branch information
jerryz123 authored Feb 13, 2021
1 parent e75b5e9 commit 2f645ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/scala/gemmini/Controller.scala
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ class GemminiModule[T <: Data: Arithmetic, U <: Data, V <: Data]
// compressed_cmd.ready := false.B

// val (unrolled_cmd, loop_matmul_unroller_busy) = LoopMatmul(unrolled_cmd_after_conv, rob.io.ld_utilization, rob.io.st_utilization, rob.io.ex_utilization,
val (unrolled_cmd, loop_matmul_unroller_busy) = LoopMatmul(raw_cmd, rob.io.ld_utilization, rob.io.st_utilization, rob.io.ex_utilization,
val (loop_cmd, loop_matmul_unroller_busy) = LoopMatmul(raw_cmd, rob.io.ld_utilization, rob.io.st_utilization, rob.io.ex_utilization,
meshRows*tileRows, coreMaxAddrBits, rob_entries, 4, 12, 2, sp_banks * sp_bank_entries, acc_banks * acc_bank_entries,
inputType.getWidth, accType.getWidth, dma_maxbytes)
val unrolled_cmd = Queue(loop_cmd)
unrolled_cmd.ready := false.B

// val cmd_decompressor = Module(new InstDecompressor(rob_entries))
Expand Down Expand Up @@ -370,7 +371,7 @@ class GemminiModule[T <: Data: Arithmetic, U <: Data, V <: Data]
rob_completed_arb.io.out.ready := true.B

// Wire up global RoCC signals
io.busy := raw_cmd.valid || loop_conv_unroller_busy || loop_matmul_unroller_busy || rob.io.busy || spad.module.io.busy
io.busy := raw_cmd.valid || loop_conv_unroller_busy || loop_matmul_unroller_busy || rob.io.busy || spad.module.io.busy || unrolled_cmd.valid || loop_cmd.valid
io.interrupt := tlb.io.exp.interrupt

rob.io.solitary_preload := ex_controller.io.solitary_preload
Expand Down

0 comments on commit 2f645ad

Please sign in to comment.