Skip to content

Commit

Permalink
Latch rvfi_instr_q to get csr writes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioOpenHWGroup committed Mar 15, 2024
1 parent 529437d commit 17cd583
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions verif/tb/uvmt/uvmt_cva6_tb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ module uvmt_cva6_tb;
.tb_exit_o()
); // Status information generated by the Virtual Peripherals in the DUT WRAPPER memory.

rvfi_instr_t [CVA6Cfg.NrCommitPorts-1:0] rvfi_instr_q;
/**
* DUT WRAPPER instance
*/
Expand All @@ -122,11 +123,15 @@ module uvmt_cva6_tb;
.axi_switch_vif (axi_switch_vif),
.default_inputs_vif (default_inputs_vif),
.core_cntrl_if(core_cntrl_if),
.tb_exit_o(rvfi_if.tb_exit_o),
.rvfi_o(rvfi_if.rvfi_o),
.tb_exit_o(tb_exit_if.tb_exit_o),
.rvfi_o(rvfi_instr_q),
.rvfi_csr_o(rvfi_if.rvfi_csr_o)
);

always_ff @(clknrst_if.clk) begin
rvfi_if.rvfi_o = rvfi_instr_q;
end

for (genvar i = 0; i < RVFI_NRET; i++) begin
assign rvfi_instr_if[i].clk = clknrst_if.clk;
assign rvfi_instr_if[i].reset_n = clknrst_if.reset_n;
Expand Down

0 comments on commit 17cd583

Please sign in to comment.