From 70ce83dfdf10c94d09051fa4ef249a6dc6af1e56 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 2 Jul 2020 19:28:10 +0100 Subject: [PATCH] add DIV function unit to compunits --- src/soc/fu/compunits/compunits.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/soc/fu/compunits/compunits.py b/src/soc/fu/compunits/compunits.py index 2fadd8c5..98520022 100644 --- a/src/soc/fu/compunits/compunits.py +++ b/src/soc/fu/compunits/compunits.py @@ -67,6 +67,9 @@ from soc.fu.shift_rot.pipe_data import ShiftRotPipeSpec from soc.fu.trap.pipeline import TrapBasePipe from soc.fu.trap.pipe_data import TrapPipeSpec +from soc.fu.div.pipeline import DIVBasePipe +from soc.fu.div.pipe_data import DIVPipeSpec + from soc.fu.ldst.pipe_data import LDSTPipeSpec from soc.experiment.compldst_multi import LDSTCompUnit # special-case @@ -131,6 +134,10 @@ class ShiftRotFunctionUnit(FunctionUnitBaseSingle): fnunit = Function.SHIFT_ROT def __init__(self): super().__init__(ShiftRotPipeSpec, ShiftRotBasePipe) +class DIVFunctionUnit(FunctionUnitBaseSingle): + fnunit = Function.DIV + def __init__(self): super().__init__(DIVPipeSpec, DIVBasePipe) + class TrapFunctionUnit(FunctionUnitBaseSingle): fnunit = Function.TRAP def __init__(self): super().__init__(TrapPipeSpec, TrapBasePipe) @@ -169,6 +176,7 @@ class AllFunctionUnits(Elaboratable): ('cr', 1, CRFunctionUnit), ('branch', 1, BranchFunctionUnit), ('trap', 1, TrapFunctionUnit), + ('div', 1, DIVFunctionUnit), ('logical', 1, LogicalFunctionUnit), ('shiftrot', 1, ShiftRotFunctionUnit), ): -- 2.30.2