[Libre-soc-dev] setvl immediate field definition broken
programmerjake at gmail.com
Sat Mar 13 00:11:41 GMT 2021
In the wiki:
> Note that the immediate (SVi) spans 7 bits (16 to 22), and that bit 22 and 23 is
> reserved and must be zero. Setting bit 22 or 23 causes an illegal exception.
keep in mind that bit 0 is the MSB and 31 is the LSB...
Umm, the reserved bits are at the wrong end of the field, they should
be at the MSB end, they are at the LSB end. being at the LSB end
causes the immediate to only be valid for even values, rather than
values < 64 as was intended, keeping in mind that immedate field
values are 1 less than the corresponding MAXVL, since MAXVL==0 makes
I suggest redefining the immediate field to be bits 16:23 inclusive,
and setting bits 16 or 17 causes an illegal exception. fields.text
will need to be modified too.
What do the rest of you think?
More information about the Libre-soc-dev