From e80340198a621c40bd5007ad71229b9df8d967c4 Mon Sep 17 00:00:00 2001 From: Howard Mao Date: Mon, 30 Nov 2015 17:35:33 -0800 Subject: [PATCH] use implicit parameters for ALU --- rocket/src/main/scala/dpath_alu.scala | 2 +- rocket/src/main/scala/rocket.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rocket/src/main/scala/dpath_alu.scala b/rocket/src/main/scala/dpath_alu.scala index 8aab0cfd..e26bff8a 100644 --- a/rocket/src/main/scala/dpath_alu.scala +++ b/rocket/src/main/scala/dpath_alu.scala @@ -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) diff --git a/rocket/src/main/scala/rocket.scala b/rocket/src/main/scala/rocket.scala index 570f120b..53824d51 100644 --- a/rocket/src/main/scala/rocket.scala +++ b/rocket/src/main/scala/rocket.scala @@ -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