You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With regards to NAPOT match trigger, if an implementation chooses to support maskmax6 an N.
We would expect tdata2[N-1] to be set to zero to comply with 5.7.12.
e.g:
In a system with XLEN=64.
We setup maxmask6 to be 63 (tdata2[62] will be set to zero) and configure tdata1 to setup a NAPOT trigger.
What is the expected behaviour of tdata2 when we attempt to write tdata2[61:0] with all ones?
Are we expected to read back 0x3fff...ffff [the same value we attempt to write]
or
are we expected to read back 0xbfff...ffff since we are anyway limiting the NAPOT range to 2^63?
The text was updated successfully, but these errors were encountered:
ThimayaPR
changed the title
Does setting mcontrol6 trigger to NAPOT limit the size of tdata2 due to maskmax restriction.
Does setting mcontrol6 trigger to NAPOT limit the size of tdata2 due to maskmax restriction?
Oct 8, 2024
AFAIU, from [5.7.12. Match Control Type 6 (mcontrol6, at 0x7a1), match field description ]:
1 (napot): Matches when the top M bits of any compare
value match the top M bits of tdata2. M is XLEN-1 minus the
index of the least-significant bit containing 0 in tdata2.
tdata2 is WARL and if bits maskmax6-1:0 are written with
all ones then bit maskmax6-1 will be set to 0 while the
values of bits maskmax6-2:0 are UNSPECIFIED. Legal
values for tdata2 require M + maskmax6 ≥ XLEN and M > 0.
See above for how to determine maskmax6.
In your example:
M == 63 - 62 == 1
Bit maskmax6 - 1 == 62 is written with zero.
So my understanding is tdata2 will be read back as 0x3fff...ffff since it's a valid value.
With regards to NAPOT match trigger, if an implementation chooses to support maskmax6 an N.
We would expect tdata2[N-1] to be set to zero to comply with 5.7.12.
e.g:
In a system with XLEN=64.
We setup maxmask6 to be 63 (tdata2[62] will be set to zero) and configure tdata1 to setup a NAPOT trigger.
What is the expected behaviour of tdata2 when we attempt to write tdata2[61:0] with all ones?
Are we expected to read back 0x3fff...ffff [the same value we attempt to write]
or
are we expected to read back 0xbfff...ffff since we are anyway limiting the NAPOT range to 2^63?
The text was updated successfully, but these errors were encountered: