Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is an address mcontrol/mcontrol6 trigger valid to compare subset of the other addesses? #877

Closed
YenHaoChen opened this issue Sep 18, 2023 · 4 comments

Comments

@YenHaoChen
Copy link
Contributor

YenHaoChen commented Sep 18, 2023

Hello,

The specification requires an address mcontrol/mcontrol6 trigger to compare the lowest address and recommends comparing other accessed addresses. For example, consider a 4-byte memory access with the lowest address 0x4000. An address trigger is required to compare address={0x4000} and recommanended to compared address={0x4000, 0x4001, 0x4002, 0x4003}.

Is it valid to compare an arbitrary subset of the other addresses? For the above case, is comparing address={0x4000, 0x4002} only valid? (Although this does not make sense from a user perspective, I cannot find a solid answer from the text of the specification.)

image

Update 2023.09.19:
A follow-up question. Consider misaligned 4-byte access at address 0x3fff on the following designs:

  • Design A) Match address trigger with tdata2={0x3fff} (required)
  • Design B) Match address trigger with tdata2={0x3fff, 0x4000, 0x4001, 0x4002} (recommended)
  • Design C) Match address trigger with tdata2={0x3fff, 0x4000}

Are all of the above designs valid?

@timsifive
Copy link
Contributor

My reading is that they are all valid. However, if you want to make a product that is useful to people then design C would be very confusing. The spec is intentionally a bit vague here because implementing triggers can be expensive, because comparators are sizable and might be on the critical path. It's better to implement something suboptimal than to implement nothing at all.

@YenHaoChen
Copy link
Contributor Author

Thank you

@pranjal20498
Copy link

if my tdata2 is the same as any load address value then it would take trigger for match=0?

@rtwfroody
Copy link
Collaborator

@pranjal20498, yes, that is the preferred behavior.

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

No branches or pull requests

4 participants