mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-23 21:57:11 -04:00
Remove obvious bugs from store buffer
This commit is contained in:
parent
e80b846d03
commit
d330ed32a6
1 changed files with 4 additions and 3 deletions
|
@ -65,7 +65,7 @@ module store_buffer (
|
|||
logic [63:0] data;
|
||||
logic [7:0] be;
|
||||
logic valid; // this entry is valid, we need this for checking if the address offset matches
|
||||
} speculative_queue_n [DEPTH-1], speculative_queue_q [DEPTH-1],
|
||||
} speculative_queue_n [DEPTH-1:0], speculative_queue_q [DEPTH-1:0],
|
||||
commit_queue_n [DEPTH-1:0], commit_queue_q [DEPTH-1:0];
|
||||
|
||||
// keep a status count for both buffers
|
||||
|
@ -84,12 +84,13 @@ module store_buffer (
|
|||
always_comb begin : core_if
|
||||
automatic logic [DEPTH:0] speculative_status_cnt = speculative_status_cnt_q;
|
||||
|
||||
// we are ready if the speculative queue has a space left
|
||||
ready_o = !(speculative_status_cnt_q != DEPTH-1);
|
||||
// we are ready if the speculative and the commit queue have a space left
|
||||
ready_o = (speculative_status_cnt_q < DEPTH) && (commit_status_cnt_q < DEPTH);
|
||||
// default assignments
|
||||
speculative_status_cnt_n = speculative_status_cnt_q;
|
||||
speculative_read_pointer_n = speculative_read_pointer_q;
|
||||
speculative_write_pointer_n = speculative_write_pointer_q;
|
||||
speculative_queue_n = speculative_queue_q;
|
||||
// LSU interface
|
||||
// we are ready to accept a new entry and the input data is valid
|
||||
if (ready_o && valid_i) begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue