Skip to content

Conversation

@SamuelRiedel
Copy link
Contributor

This PR ensures that the trace does not incorrectly report load data during memory store operations. Currently, the tracer uses the rmask and wmask to print information about loads and stores:

ibex/rtl/ibex_tracer.sv

Lines 136 to 145 in 0a13971

if ((data_accessed & MEM) != 0) begin
$fwrite(fh, " PA:0x%08x", rvfi_mem_addr);
if (rvfi_mem_wmask != 4'b0000) begin
$fwrite(fh, " store:0x%08x", rvfi_mem_wdata);
end
if (rvfi_mem_rmask != 4'b0000) begin
$fwrite(fh, " load:0x%08x", rvfi_mem_rdata);
end
end

While the wmask was already gated in the rvfi, the rmask was always enabled, which led to load data being reported even during a store.

@SamuelRiedel
Copy link
Contributor Author

This will also work for #2336 @Timmmm

Copy link

@Timmmm Timmmm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for fixing this!

Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me (and I like the way it's now more symmetrical with the following line too)

@SamuelRiedel SamuelRiedel added this pull request to the merge queue Dec 3, 2025
Merged via the queue into lowRISC:master with commit 2fadd1a Dec 3, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants