Thursday, 2021-07-29

lkclSelectableInt 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 hand11:39
lkclthis is so insane that we created python helper classes for certain constants which do that automatically11:39
lkclhttps://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/consts.py;h=5c60bd972bfbf0e67967ada8fcf4b768e02049f8;hb=09ddf103542595c2ca63cd54c9070ef2a9370356#l811:40
lkclclass MSRb for example, has all the bits listed of the MSR (Machine Status Register),11:42
lkcllisted in *spec* order (MSB0)11:42
lkclthe "botchify" function takes all non-hidden attributes of that class and subtracts their value from 63, adding them to the *other* class11:43
lkclso where MSBb.RI = 62, MSB.RI ends up with a value 63-62=111:45
lkclyou use the MSB class in the HDL, and use MSBb in the Simulator11:45
lkclbut11:45
lkclno need to have *two* separate classes, with copies of values where you could get them wrong.11:45
lkcltoshywoshy: hooray, bots back :)12:14

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!