Skip to content

[Testing] Add spec compliant randomization for random manager#43

Open
LucaRufer wants to merge 5 commits into
pulp-platform:mainfrom
mosaic-soc:pr/obi-test-fixes4
Open

[Testing] Add spec compliant randomization for random manager#43
LucaRufer wants to merge 5 commits into
pulp-platform:mainfrom
mosaic-soc:pr/obi-test-fixes4

Conversation

@LucaRufer

Copy link
Copy Markdown

This PR depends on #39, #40, #41 and #42.

Summary

This PR adds proper randomization of address phase signals for the rand manager provided by obi_test according to OBI Specification v1.6.0. Specifically, Requirements R-7, R-8, R-9, R-11 and R-12 are implemented for the random manager by this PR.

Changes introduced

The changes introduces are based on the axi_test implementation for consistency. The changes implemented for the rand_manager class include:

  • Replace the $urandom calls with proper std::randomize calls, that can randomize beyond 32 bits.
  • Respect the FULL_BE OBI option when randomizing be to satisfy R-7.
  • Add additional constraints to the address randomization to satisfy R-9.
  • Introduce proper a_optional randomization, especially so only valid a_optional.atop values are generated (R-11.1 and R-11.2).
  • be and addr signals may be re-randomized or altered after a_optional.atop to comply with R-11.4 and R-11.5 (size and alignment requirements).
  • The a_optional signals memtype, prot, dbg, mid, auser, wuser and achk are still just randomized without additional constraints as before. However, with this change only the signals that are actually enabled by the OBIConfig are randomized. The signals introduced by options disabled in the OBIOptionalConfig are assigned x.
  • Added a legalize_id task to generate the legal aid as per R-12. This task will delay issuing a new request if no suitable aid is available, similar to the axi-test behaviour if any of the limits are reached.
  • Added an id scoreboard for correct id tracking, as per R-12. Ids are tracked when an id is issued for an address phase and released when the response arrives.

In summary, Requirements:

  • ✅ R-1 to R-6 are already implemented, with the exception of R-3.2.2 (retraction of gnt at any time) and R-4.2.2 (retraction of rready at any time).
  • ✅ R-10 is already implemented by the rand subordinate.
  • 🕐 R-7, R-8, R-9, R-11 and R-12 are implemented by this PR.
  • 🕐 R-13 is implemented by [Testing] Properly randomize exokay for random subordinate #42.
  • ✅ R-14 to R-17 are implemented by the driver and checked by the interface.
  • ❌ R-18 to R-20 are platform dependent (achk/rchk implementation) and not implemented by obi_test. This PR will just randomize the signals.
  • The remaining Requirements R-21 to R-28 specify dependencies and tie-offs, which are not relevant for the random subordinate and manager.

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.

1 participant