Conversation
ekiwi
reviewed
Aug 24, 2026
| wave = case.get("wave") | ||
| if wave and ("antmicro" in wave or "fpga-debugging" in wave or "ethmac" in wave): | ||
| if wave and ( | ||
| "antmicro" in wave or "fpga-debugging" in wave or "ethmac" or "apb" in wave |
Collaborator
There was a problem hiding this comment.
I think this is missing one in wave riht after "ethmax"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a
.protfile for the APB protocol + round-trip tests against two Verilog DUTs obtained from GitHub:(This second implementation was found as it is in the artifact for the Stitch paper : https://github.com/Xprotocols-lab/STITCH/blob/b0f5a78ed10d368a3c04baa029318abb8eb6bff6/testsuite/dut/apb_courageheart/patch_file/apb_courageheart.sv)
(Impl 1 passes the round-trip test, Impl 2 appears to have a bug -- discussed below)
Details about how the APB protocol works are in
apb.prot, but at a high-level, it works very similar to the other protocols we've looked at so far (AXI-Stream, Wishbone).To double check that the
.protfile is written correctly, this PR also contains.wavefiles for the example waveforms in the APB spec (https://support.arm.com/documentation/ihi0024/e/), and expect tests for the BI on these.waveforms. (I manually checked the BI output for these.wavefiles to make sure they correspond with what's discussed in the manual.)*Possible bug in Impl 2::
If we supply the following transactions to the interpreter:
The interpreter emits the following error:
This error indicates that during a read transaction, the
PRDATAsignal (the read data) contains 0, instead of the data that was written in the precedingwritetransaction (i.e.0x12345678 = 305419896).The interpreter terminates immediately when it encounters this error, so to diagnose what was happening, I tried adding a "bogus" read transaction where the output read data is
0to diagnose what is happening in the waveform, i.e. we provide the following.txfile:In the waveform, we see that in cycle 5, we have
PSEL,PENABLEandPREADYall being 1, butPRDATAstill contains 0 instead of the data that was previously written305419896. Appendix A.1 of the APB spec says when PSEL, PENABLE and PREADY are all asserted, PRDATA must be valid (contain semantically meaningful data), and section 3.3.1 ("read transfers with no wait states") says "The Completer (subordinate) must provide the (read) data before the end of the read transfer", so this appears to be a violation of the APB spec. The DUT only drives the read data305419896ontoPRDATAone cycle afterwards (in cycle 6), but by then,PENABLEhas become 0, which indicates the end of the data transfer.With the same
.protfile, round-trip tests for Impl 1 succeed with multiple read/write transactions, so the fact that Impl 2 fails on the interpreter leads me to wonder if this is a bug with Impl 2.