from soc.fu.div.pipeline import DIVBasePipe
from soc.fu.div.pipe_data import DIVPipeSpec
+from soc.fu.mul.pipeline import MulBasePipe
+from soc.fu.mul.pipe_data import MulPipeSpec
+
from soc.fu.ldst.pipe_data import LDSTPipeSpec
from soc.experiment.compldst_multi import LDSTCompUnit # special-case
def __init__(self, idx):
super().__init__(DIVPipeSpec, DIVBasePipe, idx)
+class MulFunctionUnit(FunctionUnitBaseSingle):
+ fnunit = Function.MUL
+ def __init__(self, idx):
+ super().__init__(MulPipeSpec, MulBasePipe, idx)
+
class TrapFunctionUnit(FunctionUnitBaseSingle):
fnunit = Function.TRAP
def __init__(self, idx):
units = {'alu': 1, 'cr': 1, 'branch': 1, 'trap': 1,
#'spr': 1, TODO: spr regfile
'logical': 1,
+ 'mul': 1,
'div': 1, 'shiftrot': 1}
alus = {'alu': ALUFunctionUnit,
'cr': CRFunctionUnit,
'trap': TrapFunctionUnit,
'spr': SPRFunctionUnit,
'div': DIVFunctionUnit,
+ 'mul': MulFunctionUnit,
'logical': LogicalFunctionUnit,
'shiftrot': ShiftRotFunctionUnit,
}
('cr', CRFunctionUnit),
('branch', BranchFunctionUnit),
('trap', TrapFunctionUnit),
- ('spr', SprFunctionUnit),
+ ('spr', SPRFunctionUnit),
+ ('mul', MulFunctionUnit),
('logical', LogicalFunctionUnit),
('shiftrot', ShiftRotFunctionUnit)):
fu = kls(0)