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,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
-----00111,FPU,OP_FP_MADD,FRA,FRB,FRC,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,ffnmadds,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
------01101,FPU,OP_FPOP,FRA,FRB,NONE,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,ffadds,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
------01111,FPU,OP_FP_MADD,FRA,FRB,FRC,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,fdmadds,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+1000001100,FPU,OP_FPOP,FRA,FRB,NONE,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,ffadds,X,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+-----11011,FPU,OP_FP_MADD,FRA,FRB,FRC,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,fdmadds,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
1000001110,FPU,OP_FPOP,NONE,FRB,NONE,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,fsins,X,,1,unofficial until submitted and approved/renumbered by the opf isa wg
1000101110,FPU,OP_FPOP,NONE,FRB,NONE,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,fcoss,X,,1,unofficial until submitted and approved/renumbered by the opf isa wg
"""
import re
-from nmigen.sim import Settle
+from nmigen.sim import Settle, Delay
from functools import wraps
from copy import copy, deepcopy
from openpower.decoder.orderedset import OrderedSet
it is purely for skipping masked-out bits
"""
# get SVSTATE VL (oh and print out some debug stuff)
+ # yield Delay(1e-10) # make changes visible
vl = self.svstate.vl
subvl = yield self.dec2.rm_dec.rm_in.subvl
srcstep = self.svstate.srcstep
# likely with a sub-decoder.
major = Signal(6)
comb += major.eq(self.dec.opcode_in[26:32])
- xo5 = Signal(1) # 1 bit from Minor 59 XO field == 0b0XXXX
- comb += xo5.eq(self.dec.opcode_in[5])
- xo = Signal(5) # 5 bits from Minor 59 fcfids == 0b01110
- comb += xo.eq(self.dec.opcode_in[1:6])
- comb += self.use_svp64_fft.eq((major == 59) & (xo5 == 0b0) &
- (xo != 0b01110))
+ xo = Signal(10)
+ comb += xo.eq(self.dec.opcode_in[1:11])
+ comb += self.use_svp64_fft.eq((major == 59) & xo.matches(
+ '-----00100', # ffmsubs
+ '-----00101', # ffmadds
+ '-----00110', # ffnmsubs
+ '-----00111', # ffnmadds
+ '1000001100', # ffadds
+ '-----11011', # fdmadds
+ ))
# decoded/selected instruction flags
comb += self.do_copy("data_len", self.op_get("ldst_len"))
opcode |= int(v30b_newfields[1]) << (32-16) # FRA
opcode |= int(v30b_newfields[2]) << (32-21) # FRB
opcode |= int(v30b_newfields[3]) << (32-26) # FRC
- opcode |= 0b01111 << (32-31) # bits 26-30
+ opcode |= 0b11011 << (32-31) # bits 26-30
if rc:
opcode |= 1 # Rc, bit 31.
yield ".long 0x%x" % opcode
opcode |= int(v30b_newfields[0]) << (32-11) # FRT
opcode |= int(v30b_newfields[1]) << (32-16) # FRA
opcode |= int(v30b_newfields[2]) << (32-21) # FRB
- opcode |= 0b01101 << (32-31) # bits 26-30
+ opcode |= 0b1000001100 << (32-31) # bits 21-30
if rc:
opcode |= 1 # Rc, bit 31.
yield ".long 0x%x" % opcode