mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-20 12:17:19 -04:00
ras: Handle simultaneous push
and pop
This commit is contained in:
parent
95e099ca6f
commit
13a9767dfe
1 changed files with 8 additions and 1 deletions
|
@ -47,10 +47,17 @@ module ras #(
|
|||
stack_d[DEPTH-1].valid = 1'b0;
|
||||
stack_d[DEPTH-1].ra = 'b0;
|
||||
end
|
||||
// leave everything untouched and just push the latest value to the
|
||||
// top of the stack
|
||||
if (pop_i && push_i) begin
|
||||
stack_d = stack_q;
|
||||
stack_d[0].ra = data_i;
|
||||
stack_d[0].valid = 1'b1;
|
||||
end
|
||||
|
||||
if (flush_i) begin
|
||||
stack_d = '0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
always_ff @(posedge clk_i or negedge rst_ni) begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue