diff --git a/rtl/src/hpdcache_mshr.sv b/rtl/src/hpdcache_mshr.sv index 3f1fa7b..34d55d3 100644 --- a/rtl/src/hpdcache_mshr.sv +++ b/rtl/src/hpdcache_mshr.sv @@ -258,11 +258,15 @@ import hpdcache_pkg::*; for (int unsigned w = 0; w < HPDcacheCfg.u.mshrWays; w++) begin automatic bit v_valid; + hpdcache_uint32 v_check_set_st1; + hpdcache_set_t v_check_set; automatic bit v_match_set; automatic bit v_match_tag; + v_valid = mshr_valid_q[w*HPDcacheCfg.u.mshrSets + hpdcache_uint32'(check_set_st1)]; - v_match_set = (mshr_cache_set_q[w*HPDcacheCfg.u.mshrSets + hpdcache_uint32'(check_set_st1)] == - check_cache_set_q); + v_check_set_st1 = hpdcache_uint32'(check_set_st1); + v_check_set = mshr_cache_set_q[w*HPDcacheCfg.u.mshrSets + v_check_set_st1]; + v_match_set = (v_check_set == check_cache_set_q); v_match_tag = (mshr_rentry[w].tag == check_tag_i); v_hit_way[w] = (v_valid && v_match_tag && v_match_set); end diff --git a/rtl/src/hpdcache_wbuf.sv b/rtl/src/hpdcache_wbuf.sv index 1ad2222..e435415 100644 --- a/rtl/src/hpdcache_wbuf.sv +++ b/rtl/src/hpdcache_wbuf.sv @@ -272,27 +272,26 @@ import hpdcache_pkg::*; end end - generate - if (WBUF_OFFSET_WIDTH > WBUF_WORD_OFFSET) begin : gen_wbuf_write_be_gt - always_comb - begin : wbuf_write_be_comb - for (int unsigned w = 0; w < WBUF_DATA_NWORDS; w++) begin - if (w == hpdcache_uint32'(write_addr_i[WBUF_OFFSET_WIDTH-1:WBUF_WORD_OFFSET])) begin - write_be[w] = write_be_i; - end else begin - write_be[w] = '0; - end - end - end - end else begin : gen_wbuf_write_be_le - always_comb - begin : wbuf_write_be_comb - for (int unsigned w = 0; w < WBUF_DATA_NWORDS; w++) begin + if (WBUF_OFFSET_WIDTH > WBUF_WORD_OFFSET) begin : gen_wbuf_write_be_gt + always_comb + begin : wbuf_write_be_comb + for (int unsigned w = 0; w < WBUF_DATA_NWORDS; w++) begin + if (w == hpdcache_uint32'(write_addr_i[WBUF_OFFSET_WIDTH-1:WBUF_WORD_OFFSET])) + begin write_be[w] = write_be_i; + end else begin + write_be[w] = '0; end end end - endgenerate + end else begin : gen_wbuf_write_be_le + always_comb + begin : wbuf_write_be_comb + for (int unsigned w = 0; w < WBUF_DATA_NWORDS; w++) begin + write_be[w] = write_be_i; + end + end + end hpdcache_fxarb #( .N (WBUF_DIR_NENTRIES) diff --git a/rtl/src/hwpf_stride/hwpf_stride_arb.sv b/rtl/src/hwpf_stride/hwpf_stride_arb.sv index 973c397..1fc5496 100644 --- a/rtl/src/hwpf_stride/hwpf_stride_arb.sv +++ b/rtl/src/hwpf_stride/hwpf_stride_arb.sv @@ -112,8 +112,9 @@ import hpdcache_pkg::*; always_comb begin : resp_demux for (int unsigned i = 0; i < NUM_HW_PREFETCH; i++) begin - hwpf_stride_rsp_valid_o[i] = hpdcache_rsp_valid_i && (i == hpdcache_uint32'(hpdcache_rsp_i.tid)); - hwpf_stride_rsp_o[i] = hpdcache_rsp_i; + hwpf_stride_rsp_valid_o[i] = hpdcache_rsp_valid_i && + (i == hpdcache_uint32'(hpdcache_rsp_i.tid)); + hwpf_stride_rsp_o[i] = hpdcache_rsp_i; end end // }}}