mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-23 13:47:13 -04:00
WIP: Disable CSR side-effects on exception
This commit is contained in:
parent
940a586873
commit
53e674aeb3
2 changed files with 11 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -175,6 +175,9 @@ lint:
|
|||
verilator $(ariane_pkg) $(src) --lint-only \
|
||||
$(list_incdir) --top-module ariane
|
||||
|
||||
verify:
|
||||
qverify vlog -sv src/csr_regfile.sv
|
||||
|
||||
clean:
|
||||
rm -rf work/ *.ucdb
|
||||
|
||||
|
|
|
@ -467,6 +467,13 @@ module csr_regfile #(
|
|||
csr_read = 1'b0;
|
||||
end
|
||||
endcase
|
||||
// if we are retiring an exception do not modify anything
|
||||
if (ex_i.valid) begin
|
||||
mret = 1'b0;
|
||||
sret = 1'b0;
|
||||
csr_we = 1'b0;
|
||||
csr_read = 1'b0;
|
||||
end
|
||||
// ------------------------------
|
||||
// Debug Multiplexer (Priority)
|
||||
// ------------------------------
|
||||
|
@ -671,7 +678,7 @@ module csr_regfile #(
|
|||
`ifndef VERILATOR
|
||||
// check that eret and ex are never valid together
|
||||
assert property (
|
||||
@(posedge clk_i) !(eret_i && ex_valid_i))
|
||||
@(posedge clk_i) !(eret_o && ex_i.valid))
|
||||
else $warning("eret and exception should never be valid at the same time");
|
||||
`endif
|
||||
`endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue