add config option to trade mul/div area for speed
This commit is contained in:
parent
ce9f4881d2
commit
78868f6075
@ -159,7 +159,8 @@ class Datapath(implicit conf: RocketConfiguration) extends Component
|
|||||||
alu.io.in1 := ex_rs1.toUFix
|
alu.io.in1 := ex_rs1.toUFix
|
||||||
|
|
||||||
// multiplier and divider
|
// multiplier and divider
|
||||||
val div = new MulDiv(mulUnroll = 4, earlyOut = true)
|
val div = new MulDiv(mulUnroll = if (conf.fastMulDiv) 8 else 1,
|
||||||
|
earlyOut = conf.fastMulDiv)
|
||||||
div.io.req.valid := io.ctrl.div_mul_val
|
div.io.req.valid := io.ctrl.div_mul_val
|
||||||
div.io.req.bits.dw := ex_reg_ctrl_fn_dw
|
div.io.req.bits.dw := ex_reg_ctrl_fn_dw
|
||||||
div.io.req.bits.fn := ex_reg_ctrl_fn_alu
|
div.io.req.bits.fn := ex_reg_ctrl_fn_alu
|
||||||
|
@ -10,7 +10,8 @@ case class RocketConfiguration(ntiles: Int, co: CoherencePolicyWithUncached,
|
|||||||
icache: ICacheConfig, dcache: DCacheConfig,
|
icache: ICacheConfig, dcache: DCacheConfig,
|
||||||
fpu: Boolean, vec: Boolean,
|
fpu: Boolean, vec: Boolean,
|
||||||
fastLoadWord: Boolean = true,
|
fastLoadWord: Boolean = true,
|
||||||
fastLoadByte: Boolean = false)
|
fastLoadByte: Boolean = false,
|
||||||
|
fastMulDiv: Boolean = true)
|
||||||
{
|
{
|
||||||
val dcacheReqTagBits = 9 // enforce compliance with require()
|
val dcacheReqTagBits = 9 // enforce compliance with require()
|
||||||
val xprlen = 64
|
val xprlen = 64
|
||||||
|
Loading…
Reference in New Issue
Block a user