1
0

fix vector length calc bug, thanks chris and andrew

This commit is contained in:
Yunsup Lee 2012-03-27 12:04:07 -07:00
parent 6bda8674bd
commit bb704dc0c9

View File

@ -40,8 +40,10 @@ class rocketDpathVec extends Component
{ {
val io = new ioDpathVec() val io = new ioDpathVec()
val nxregs = Mux(io.ctrl.fn === VEC_CFG, io.wdata(5,0), io.inst(15,10)).toUFix + UFix(0,7) val nxregs_stage = Mux(io.ctrl.fn === VEC_CFG, io.wdata(5,0), io.inst(15,10))
val nfregs = Mux(io.ctrl.fn === VEC_CFG, io.rs2(5,0), io.inst(21,16)).toUFix + UFix(0,7) val nfregs_stage = Mux(io.ctrl.fn === VEC_CFG, io.rs2(5,0), io.inst(21,16))
val nxregs = Mux(nxregs_stage(5), Bits(32), Mux(nxregs_stage === Bits(0), Bits(1), nxregs_stage)) + UFix(0,7)
val nfregs = Mux(nfregs_stage(5), Bits(32), nfregs_stage) + UFix(0,7)
val nregs = nxregs + nfregs val nregs = nxregs + nfregs
val uts_per_bank = MuxLookup( val uts_per_bank = MuxLookup(