From 17cd583e252c96256902b9cdce5519da2d0925f0 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 15 Mar 2024 09:45:41 +0000 Subject: [PATCH] Latch rvfi_instr_q to get csr writes --- verif/tb/uvmt/uvmt_cva6_tb.sv | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/verif/tb/uvmt/uvmt_cva6_tb.sv b/verif/tb/uvmt/uvmt_cva6_tb.sv index 6ff99dba7b5..965695aecea 100644 --- a/verif/tb/uvmt/uvmt_cva6_tb.sv +++ b/verif/tb/uvmt/uvmt_cva6_tb.sv @@ -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 */ @@ -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;