Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFVI update in trace_apu_req found by hwloop single-stepping in debug mode. #859

Merged
merged 2 commits into from
Aug 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions bhv/cv32e40p_rvfi.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1109,12 +1109,29 @@ insn_trace_t trace_if, trace_id, trace_ex, trace_ex_next, trace_wb;
`CSR_FROM_PIPE(apu_req, misa)
`CSR_FROM_PIPE(apu_req, tdata1)
`CSR_FROM_PIPE(apu_req, tdata2)
trace_apu_req.m_csr.tinfo_we = '0; // READ ONLY csr_tinfo_we_i;
trace_apu_req.m_csr.tinfo_we = '0; // READ ONLY csr_tinfo_we_i;
trace_apu_req.m_csr.tinfo_rdata = r_pipe_freeze_trace.csr.tinfo_q;
trace_apu_req.m_csr.tinfo_rmask = '1;
trace_apu_req.m_csr.tinfo_wdata = r_pipe_freeze_trace.csr.tinfo_n;
trace_apu_req.m_csr.tinfo_wmask = '0;

trace_apu_req.m_csr.minstret_we = r_pipe_freeze_trace.csr.mhpmcounter_write_lower[2];
trace_apu_req.m_csr.minstret_rdata = r_pipe_freeze_trace.csr.mhpmcounter_q[2];
trace_apu_req.m_csr.minstret_rmask = '1;
trace_apu_req.m_csr.minstret_wdata = r_pipe_freeze_trace.csr.mhpmcounter_q;
trace_apu_req.m_csr.minstret_wmask = r_pipe_freeze_trace.csr.mhpmcounter_write_lower[2] ? '1 : '0;

trace_apu_req.m_csr.lpcount0_we = '0;
trace_apu_req.m_csr.lpcount0_rdata = r_pipe_freeze_trace.hwloop.counter_q[0];
trace_apu_req.m_csr.lpcount0_rmask = '1;
trace_apu_req.m_csr.lpcount0_wdata = '0;
trace_apu_req.m_csr.lpcount0_wmask = '0;

trace_apu_req.m_csr.lpcount1_we = '0;
trace_apu_req.m_csr.lpcount1_rdata = r_pipe_freeze_trace.hwloop.counter_q[1];
trace_apu_req.m_csr.lpcount1_rmask = '1;
trace_apu_req.m_csr.lpcount1_wdata = '0;
trace_apu_req.m_csr.lpcount1_wmask = '0;

`CSR_FROM_PIPE(apu_req, frm)

Expand Down Expand Up @@ -1478,7 +1495,7 @@ insn_trace_t trace_if, trace_id, trace_ex, trace_ex_next, trace_wb;
trace_ex.m_csr.frm_wmask = '0;
trace_ex.m_csr.fcsr_wmask = '0;

if (r_pipe_freeze_trace.apu_req) begin
if (r_pipe_freeze_trace.apu_req && r_pipe_freeze_trace.apu_gnt) begin
trace_id.m_is_apu = 1'b1;
trace_id.m_apu_req_id = cnt_apu_req;
trace_apu_req = new();
Expand Down
Loading