Skip to content

Commit

Permalink
fix linewidth
Browse files Browse the repository at this point in the history
  • Loading branch information
cfuguet committed Nov 1, 2024
1 parent 1b14a1d commit edd501c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
8 changes: 6 additions & 2 deletions rtl/src/hpdcache_mshr.sv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 16 additions & 17 deletions rtl/src/hpdcache_wbuf.sv
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions rtl/src/hwpf_stride/hwpf_stride_arb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -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
// }}}
Expand Down

0 comments on commit edd501c

Please sign in to comment.