use implicit parameters for ALU
This commit is contained in:
parent
90991014a0
commit
e80340198a
@ -43,7 +43,7 @@ object ALU
|
||||
}
|
||||
import ALU._
|
||||
|
||||
class ALU(xLen: Int) extends Module {
|
||||
class ALU(implicit p: Parameters) extends CoreModule()(p) {
|
||||
val io = new Bundle {
|
||||
val dw = Bits(INPUT, SZ_DW)
|
||||
val fn = Bits(INPUT, SZ_ALU_FN)
|
||||
|
@ -239,7 +239,7 @@ class Rocket(implicit p: Parameters) extends CoreModule()(p) {
|
||||
A2_IMM -> ex_imm,
|
||||
A2_FOUR -> SInt(4)))
|
||||
|
||||
val alu = Module(new ALU(xLen))
|
||||
val alu = Module(new ALU)
|
||||
alu.io.dw := ex_ctrl.alu_dw
|
||||
alu.io.fn := ex_ctrl.alu_fn
|
||||
alu.io.in2 := ex_op2.toUInt
|
||||
|
Loading…
Reference in New Issue
Block a user