Skip to content

Fix APU tracer clock and reset connections - #1087

Merged
MikeOpenHWGroup merged 1 commit into
openhwfoundation:devfrom
jinchuntan:fix/apu-tracer-clock-reset
Oct 29, 2026
Merged

MikeOpenHWGroup merged 1 commit into
openhwfoundation:devfrom
jinchuntan:fix/apu-tracer-clock-reset

Conversation

@jinchuntan

Copy link
Copy Markdown

The APU tracer has its clock and reset connections swapped in cv32e40p_tb_wrapper. It opens its log on a clock edge and then waits for reset transitions to sample results. A normal FPU program therefore completes with no APU trace entries.

Connect the tracer to the core clock and active-low reset, matching the execution tracer.

Tested on the actual core and FPU with F latencies 0 and 2 and Zfinx latency 1. The final memory result is correct in all three runs and every trace destination and value matches. Unmodified dev produces only the trace header. FPU-disabled elaboration, the repository formatter and git diff --check also pass. The simulation retains baseline nonfatal warnings and the existing CSR array waiver.

Reproduction and before/after logs are attached below.
cv32e40p-apu-tracer-validation.zip

@MPEZZIN
MPEZZIN self-requested a review October 29, 2026 06:46

@MPEZZIN MPEZZIN left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

looks good to me.
OK for merge to dev branch

@MikeOpenHWGroup

Copy link
Copy Markdown
Contributor

Good catch @jinchuntan. The reason this latent bug was never caught is that nobody uses the APU tracer! The verification environment is managed in the cv32e40p/dev branch of core-v-verif which uses the RVFI tracer. AFAIK, few (if any!) people use the example_tb in this repo.

This is yet another example of why ifdefs should be avoided. You can find a discussion of that in one of the CVA6 wikis.

In the meantime, I'll merge this in.

@MikeOpenHWGroup
MikeOpenHWGroup merged commit eea8fdd into openhwfoundation:dev Oct 29, 2026
3 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