- CR: not so many needed (perhaps)
- Branch: one or two of these (depending on speculation run-ahead)
- Trap: yeah really only one of these
+ - SPR: again, only one.
- ShiftRot (perhaps not too many of these)
* Multi-cycle (and FSM) Function Units. these are FUs that can only
from soc.fu.shift_rot.pipeline import ShiftRotBasePipe
from soc.fu.shift_rot.pipe_data import ShiftRotPipeSpec
+from soc.fu.spr.pipeline import SPRBasePipe
+from soc.fu.spr.pipe_data import SPRPipeSpec
+
from soc.fu.trap.pipeline import TrapBasePipe
from soc.fu.trap.pipe_data import TrapPipeSpec
def __init__(self, idx):
super().__init__(TrapPipeSpec, TrapBasePipe, idx)
+class SPRFunctionUnit(FunctionUnitBaseSingle):
+ fnunit = Function.SPR
+ def __init__(self, idx):
+ super().__init__(SPRPipeSpec, SPRBasePipe, idx)
+
# special-case
class LDSTFunctionUnit(LDSTCompUnit):
fnunit = Function.LDST
addrwid = pspec.addr_wid
units = pspec.units
if not isinstance(units, dict):
- units = {'alu': 1, 'cr': 1, 'branch': 1, 'trap': 1, 'logical': 1,
+ units = {'alu': 1, 'cr': 1, 'branch': 1, 'trap': 1,
+ 'spr': 1, 'logical': 1,
'div': 1, 'shiftrot': 1}
alus = {'alu': ALUFunctionUnit,
'cr': CRFunctionUnit,
'branch': BranchFunctionUnit,
'trap': TrapFunctionUnit,
+ 'spr': SPRFunctionUnit,
'div': DIVFunctionUnit,
'logical': LogicalFunctionUnit,
'shiftrot': ShiftRotFunctionUnit,
('cr', CRFunctionUnit),
('branch', BranchFunctionUnit),
('trap', TrapFunctionUnit),
+ ('spr', SprFunctionUnit),
('logical', LogicalFunctionUnit),
('shiftrot', ShiftRotFunctionUnit)):
fu = kls(0)