[Libre-soc-bugs] [Bug 325] create POWER9 TRAP pipeline

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Jul 22 18:58:44 BST 2020


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

--- Comment #115 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Samuel A. Falvo II from comment #114)
> (In reply to Luke Kenneth Casson Leighton from comment #111)
> > this is why we set up the Decode Fields - and use them.  self.fields.FormNNNN
> 
> But, do we have anything similar for registers?  There's a metric ton of
> decoders for instruction formats, which I get; but I'm talking also about
> arbitrary fields of *registers*.

right.  ok so here - for accessing registers (self.i.a, self.i.msr) - we have
followed the convention of manually translating the hectares-per-potato
conbention into "normal" industry-standard LSB is bit 0" convention.

in the nmimgen HDL.

in the ISACaller *simulator* we have **NOT** done that because we have actually
made the pseudocode executable.
> 
> Per your own advice, I was to translate the pseudocode found in the specs
> into formal properties.  The pseudocode itself refers to raw bit fields of
> registers by number.

ah yes i see.  ok

>  If that is an error, then maybe I should invest some
> time writing translation/mapping functions for IBM_regs to
> EveryoneElse_Regs, assuming these don't already exist somewhere.

that has already been done.  i have mentioned it three times: the Field
Decoders.

these are self.fields.FormSC for example and self.fields.FormSC contains for
example an LEV member.

> 
> But, looking throughout the code (not just trap, but everywhere), I
> routinely see bit-fields referenced using direct mathematical mapping (63-x).

oh ok you are referring to those.

sigh, yes.

because the same constants (e.g MSR.HV) are used in *both* the unit tests for
the ISACaller *and* in the HDL, and because the simulator does bit reversing
but the HDL does not require it, we have to satisfy both.

i have considered auto creating soc.consts.MSRr which is bitreversed from
soc.consts.MSR

one of those can be used in the simulator and in unit tests.

the other can be used in the HDL code.

honestly it is pretty irritating to have this stuff inverted from the industry
stsndard convention for bitfields.  it took 3 months to even notice that we had
the meaning of LE/BE self-consistently inverted throughout the entire codebase.

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


More information about the libre-soc-bugs mailing list