From 8083cdb61d37a3b3a5f4f1c959caba4d2baee52f Mon Sep 17 00:00:00 2001 From: Laraib Khan <73219142+laraibkhan-lm@users.noreply.github.com> Date: Fri, 9 Apr 2021 09:48:43 +0500 Subject: [PATCH] Quasar 2.0 Final --- design/src/main/scala/pic_ctrl.scala | 33 ++++------------------------ 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/design/src/main/scala/pic_ctrl.scala b/design/src/main/scala/pic_ctrl.scala index 5bf784f1..e4c250fd 100644 --- a/design/src/main/scala/pic_ctrl.scala +++ b/design/src/main/scala/pic_ctrl.scala @@ -14,31 +14,12 @@ class pic_ctrl extends Module with RequireAsyncReset with lib { val extintsrc_req = Input(UInt (PIC_TOTAL_INT_PLUS1.W)) val lsu_pic = Flipped(new lsu_pic()) val dec_pic = Flipped(new dec_pic) - // val dec_tlu_meicurpl = Input(UInt(4.W)) - // val dec_tlu_meipt = Input(UInt(4.W)) - // - // val mexintpend = Output(Bool()) - // val pic_claimid = Output(UInt(8.W)) - // val pic_pl = Output(UInt(4.W)) - // val mhwakeup = Output(Bool()) + }) def cmp_and_mux (a_id : UInt, a_priority : UInt, b_id : UInt, b_priority : UInt) = (Mux(a_priority(0 to PIC_TOTAL_INT_PLUS1+1).map(j=> - // level_intpend_w_prior_en(i)(j)).reverse.reduce(Cat(_,_))).reverse.reduce(Cat(_,_)) - /////////////////////////////////////////////////////////////////////// // Config Reg` /////////////////////////////////////////////////////////////////////// @@ -299,8 +275,7 @@ class pic_ctrl extends Module with RequireAsyncReset with lib { val intpend_rd_part_out = Wire(Vec(INT_GRPS,UInt(32.W))) (0 until INT_GRPS).map (i=> intpend_rd_part_out(i) := Fill(32,(intpend_reg_read & (picm_raddr_ff(5,2) === i.asUInt))) & intpend_reg_extended((32*i)+31,32*i))//.reverse.reduce(Cat(_,_)) intpend_rd_out := intpend_rd_part_out.reduce (_|_) - //for(i <- 0 until PIC_TOTAL_INT_PLUS1) { when (intenable_reg_re(i).asBool){ intenable_rd_out := intenable_reg(i)}.otherwise {intenable_rd_out :=0.U} } - val intenable_rd_out = MuxCase(0.U,(0 until PIC_TOTAL_INT_PLUS1).map (i=> intenable_reg_re(i).asBool -> intenable_reg(i) )) + val intenable_rd_out = MuxCase(0.U,(0 until PIC_TOTAL_INT_PLUS1).map (i=> intenable_reg_re(i).asBool -> intenable_reg(i) )) val intpriority_rd_out = MuxCase(0.U,(0 until PIC_TOTAL_INT_PLUS1).map (i=> intpriority_reg_re(i).asBool -> intpriority_reg(i))) val gw_config_rd_out = MuxCase(0.U,(0 until PIC_TOTAL_INT_PLUS1).map (i=> gw_config_reg_re(i).asBool -> gw_config_reg(i))) ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -424,4 +399,4 @@ class pic_ctrl extends Module with RequireAsyncReset with lib { object pic extends App { println((new chisel3.stage.ChiselStage).emitVerilog(new pic_ctrl())) -} \ No newline at end of file +}