[Libre-soc-bugs] [Bug 838] sync or at least statically check fields.text, power_decoder, trans/svp64, CSVs between each other

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Aug 4 12:18:04 BST 2022


https://bugs.libre-soc.org/show_bug.cgi?id=838

--- Comment #16 from Dmitry Selyutin <ghostmansd at gmail.com> ---
Here's what we have upon calling this code:
db = Database(get_wiki_dir())
print(db["addi"])

Record(ppc=PPCRecord(opcode=0x0000000e, comment='addi', flags=Flags({'rsrv',
'sgn', 'lk', 'sgn ext', 'sgl pipe', 'cry out', 'inv out', 'inv A', 'BR',
'32b'}), comment2='', unit=<Function.ALU: (1 << 1)>, intop=<MicrOp.ADD: 2>,
in1=<In1Sel.RA_OR_ZERO: 2>, in2=<In2Sel.CONST_SI: 3>, in3=<In3Sel.NONE: 0>,
out=<OutSel.RT: 1>, cr_in=<CRInSel.NONE: 0>, cr_out=<CROutSel.NONE: 0>,
cry_in=<CryIn.ZERO: 0>, ldst_len=<LDSTLen.NONE: 0>, upd=<LDSTMode.NONE: 0>,
rc=<RC.NONE: 0>, form=<Form.D: 4>, conditions='', unofficial=False),
svp64=SVP64Record(identifier='addi', ptype=<SVPtype.P2: 2>,
etype=<SVEtype.EXTRA3: 2>, in1=<In1Sel.RA_OR_ZERO: 2>, in2=<In2Sel.NONE: 0>,
in3=<In3Sel.NONE: 0>, out=<OutSel.RT: 1>, out2=<OutSel.NONE: 0>,
cr_in=<CRInSel.NONE: 0>, cr_out=<CROutSel.NONE: 0>, extra0=(d:RT,),
extra1=(s:RA,), extra2=(), extra3=(), pu=False, conditions='',
mode=<SVMode.NORMAL: 1>))

The PPCRecord and SVP64Record correspond to CSV entries, with all paranoid
checks. All the fields there, except for comment and comment2 fields, even
those shown as strings and integers, are real custom types with paranoid checks
for the input.

Both PPCRecord and SVP64Record are put into the Record class (and SVP64Record
can be optional). The Record class will handle the task of calculating the
whole opcode, decoding extras, etc.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list