From 77f4770f5443ef81a5223ce644ecc4124f670dcc Mon Sep 17 00:00:00 2001 From: Matteo Perotti Date: Wed, 20 Nov 2024 13:48:08 +0100 Subject: [PATCH] [hardware] Fix latches --- hardware/src/lane/operand_queue.sv | 2 +- hardware/src/lane/vmfpu.sv | 2 +- hardware/src/masku/masku.sv | 2 ++ hardware/src/vlsu/addrgen.sv | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hardware/src/lane/operand_queue.sv b/hardware/src/lane/operand_queue.sv index 640d77f14..0ccdcc6ae 100644 --- a/hardware/src/lane/operand_queue.sv +++ b/hardware/src/lane/operand_queue.sv @@ -209,7 +209,7 @@ module operand_queue import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::i last_packet = 1'b0; for (int i = 0; i < 2; i++) fp16[i] = '0; - for (int i = 0; i < 1; i++) fp32[i] = '0; + fp32 = '0; // Reductions need to mask away the inactive elements // A temporary solution is to send a neutral value directly diff --git a/hardware/src/lane/vmfpu.sv b/hardware/src/lane/vmfpu.sv index 3f7a80590..846638243 100644 --- a/hardware/src/lane/vmfpu.sv +++ b/hardware/src/lane/vmfpu.sv @@ -1388,7 +1388,7 @@ module vmfpu import ara_pkg::*; import rvv_pkg::*; import fpnew_pkg::*; : {vinsn_issue_q.use_vd_op, vinsn_issue_q.use_vs2, vinsn_issue_q.use_vs1}; for (int i = 0; i < 2; i++) fp16[i] = '0; - for (int i = 0; i < 1; i++) fp32[i] = '0; + fp32 = '0; first_op_d = first_op_q; simd_red_cnt_d = simd_red_cnt_q; diff --git a/hardware/src/masku/masku.sv b/hardware/src/masku/masku.sv index 34b9cb4ac..4d7e7fc14 100644 --- a/hardware/src/masku/masku.sv +++ b/hardware/src/masku/masku.sv @@ -690,6 +690,7 @@ module masku import ara_pkg::*; import rvv_pkg::*; #( end // Shuffle the VIOTA, VID byte enable signal + be_viota_shuf = '0; for (int b = 0; b < (NrLanes*StrbWidth); b++) begin automatic int shuffle_byte = shuffle_index(b, NrLanes, vinsn_issue.vtype.vsew); be_viota_shuf[shuffle_byte] = be_viota_seq_d[b]; @@ -701,6 +702,7 @@ module masku import ara_pkg::*; import rvv_pkg::*; #( // Prepare the background data with vtype.vsew encoding result_queue_mask_seq = vinsn_issue.op inside {[VIOTA:VID]} ? '0 : masku_operand_m_seq | {NrLanes*DataWidth{vinsn_issue.vm}} | {NrLanes*DataWidth{vinsn_issue.op inside {[VMADC:VMSBC]}}}; background_data_init_seq = masku_operand_vd_seq | result_queue_mask_seq; + background_data_init_shuf = '0; for (int b = 0; b < (NrLanes*StrbWidth); b++) begin automatic int shuffle_byte = shuffle_index(b, NrLanes, vinsn_issue.vtype.vsew); background_data_init_shuf[8*shuffle_byte +: 8] = background_data_init_seq[8*b +: 8]; diff --git a/hardware/src/vlsu/addrgen.sv b/hardware/src/vlsu/addrgen.sv index fe31d82ba..f4f2f7515 100644 --- a/hardware/src/vlsu/addrgen.sv +++ b/hardware/src/vlsu/addrgen.sv @@ -232,7 +232,10 @@ module addrgen import ara_pkg::*; import rvv_pkg::*; #( // Nothing to acknowledge addrgen_ack_o = 1'b0; addrgen_exception_o.valid = 1'b0; + addrgen_exception_o.gva = '0; + addrgen_exception_o.tinst = '0; addrgen_exception_o.tval = '0; + addrgen_exception_o.tval2 = '0; addrgen_exception_o.cause = '0; addrgen_illegal_load_o = 1'b0; addrgen_illegal_store_o = 1'b0;