We are logging now.

This commit is contained in:
Rose Thompson 2023-11-21 13:02:34 -06:00
parent 6ff8d19157
commit 3fd6d3464c

View File

@ -510,20 +510,20 @@ module wallyTracer import cvw::*; #(parameter cvw_t P) (rvviTrace rvvi);
always_ff @(posedge clk) begin
if(rvvi.valid[0][0]) begin
if(`STD_LOG) begin
$fwrite(file, "%08x, $08x, %s ", rvvi.pc_rdata[0][0], rvvi.insn[0][0], instrWName);
$fwrite(file, "%08x, %08x, %s ", rvvi.pc_rdata[0][0], rvvi.insn[0][0], instrWName);
for(index2 = 0; index2 < `NUM_REGS; index2 += 1) begin
if(rvvi.x_wb[0][0][index2]) begin
$fwrite(file, "rf[%d] = %08x ", index2, rvvi.x_wdata[0][0][index2]);
$fwrite(file, "rf[%02d] = %08x ", index2, rvvi.x_wdata[0][0][index2]);
end
end
for(index2 = 0; index2 < `NUM_REGS; index2 += 1) begin
if(rvvi.f_wb[0][0][index2]) begin
$fwrite(file, "frf[%d] = %08x ", index2, rvvi.f_wdata[0][0][index2]);
$fwrite(file, "frf[%02d] = %08x ", index2, rvvi.f_wdata[0][0][index2]);
end
end
for(index2 = 0; index2 < `NUM_CSRS; index2 += 1) begin
if(rvvi.csr_wb[0][0][index2]) begin
$fwrite(file, "csr[%d] = %08x ", index2, rvvi.csr[0][0][index2]);
$fwrite(file, "csr[%03x] = %08x ", index2, rvvi.csr[0][0][index2]);
end
end
$fwrite(file, "\n");