ucb-bar / gemmini

Berkeley's Spatial Array Generator
Other
818 stars 170 forks source link

Principles and necessities of TransposePreloadUnroller #366

Open infinitexplore opened 2 months ago

infinitexplore commented 2 months ago

Hello companions in Gemmini:

TransposePreloadUnroller seems to expand a pair of preload and flip-compute instructions into three instructions. The C address is rearraged into another preload instruction.

This expansion really perplex me. Why do WS transposed instructions get such special treatment?

And I also found

 first_compute_cmd.cmd.inst.rs1 := Cat(cmds(1).cmd.rs1(63, 32), garbage_addr)
 first_compute_cmd.cmd.inst.rs2 := Cat(cmds(1).cmd.rs2(63, 32), garbage_addr)

inst is signal of RoCCInstruction type. They are used to exchange data between Gemmini and RISC-V CPU. In the downstream stages of Gemmini pipeline, it is not used anymore. So what is the point of above codes?

Thanks in advance for whoever might enlighten me in any way.

infinitexplore commented 2 months ago

@hngenc