lkcl | SelectableInt only does swapping in the ISACaller simulator. the HDL is written manually and the programmer writing the HDL has to swap the MSB0 order to LSB0 order by hand | 11:39 |
---|---|---|
lkcl | this is so insane that we created python helper classes for certain constants which do that automatically | 11:39 |
lkcl | https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/consts.py;h=5c60bd972bfbf0e67967ada8fcf4b768e02049f8;hb=09ddf103542595c2ca63cd54c9070ef2a9370356#l8 | 11:40 |
lkcl | class MSRb for example, has all the bits listed of the MSR (Machine Status Register), | 11:42 |
lkcl | listed in *spec* order (MSB0) | 11:42 |
lkcl | the "botchify" function takes all non-hidden attributes of that class and subtracts their value from 63, adding them to the *other* class | 11:43 |
lkcl | so where MSBb.RI = 62, MSB.RI ends up with a value 63-62=1 | 11:45 |
lkcl | you use the MSB class in the HDL, and use MSBb in the Simulator | 11:45 |
lkcl | but | 11:45 |
lkcl | no need to have *two* separate classes, with copies of values where you could get them wrong. | 11:45 |
lkcl | toshywoshy: hooray, bots back :) | 12:14 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!