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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Jul 22 14:48:47 BST 2020


Luke Kenneth Casson Leighton <lkcl at lkcl.net> changed:

           What    |Removed                     |Added
           Assignee|colepoirier at gmail.com       |kc5tja at arrl.net

--- Comment #104 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---

 266                 # if the opcode's LEV sub-field is equal to 1.
 267                 trap_to_hv = Signal(reset_less=True)
 268                 lev = Signal(6, reset_less=True)
 269                 comb += lev.eq(op[31-26:32-20])
 270                 comb += trap_to_hv.eq(lev == Const(1, 6))

samuel: two things.

1. we are following microwatt, which has not implemented hypervisor.  therefore
if doing LEV at all this should be an illegal instruction (which is tested and
raised in PwerDecode2, not here) however this needs checking as there is
something odd about SC LEV !=0

2. direct field bit accessing of op.insn is a "no-no".  it is impossible to
understand and read.  using fields.FormSC.LEV is the "correct" convention. 
only code from microwatt that has not been decoded yet has "direct" bit access
(bit 20 of insn for example)

3. the bit fields are in *PowerISA* order and need reversing: this is why we
use DecodeFields, why FieldSelectableInt exists.

4. the only reason the trap formal proof assertion is correct against this
newly-added code is because *both are the wrong bit order*

i will update code-comments to reference here.

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

More information about the libre-soc-bugs mailing list