From b5f03cdde2873cfe09235c37e018fbfc4962973a Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 4 Jun 2020 12:54:09 +0100 Subject: [PATCH] docstring for AllFunctionUnits --- src/soc/fu/compunits/compunits.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/soc/fu/compunits/compunits.py b/src/soc/fu/compunits/compunits.py index abca7a00..c8bf762e 100644 --- a/src/soc/fu/compunits/compunits.py +++ b/src/soc/fu/compunits/compunits.py @@ -134,13 +134,24 @@ class ShiftRotFunctionUnit(FunctionUnitBaseSingle): # simple one-only function unit class, for test purposes class AllFunctionUnits(Elaboratable): + """AllFunctionUnits + + creates a dictionary of Function Units according to required spec. + tuple is of: + + * name of ALU, + * quantity of FUs required + * type of FU required + + """ def __init__(self): self.fus = {} for (name, qty, kls) in (('alu', 1, ALUFunctionUnit), - ('cr', 1, CRFunctionUnit), - ('branch', 1, BranchFunctionUnit), - ('logical', 1, LogicalFunctionUnit), - ('shiftrot', 1, ShiftRotFunctionUnit)): + ('cr', 1, CRFunctionUnit), + ('branch', 1, BranchFunctionUnit), + ('logical', 1, LogicalFunctionUnit), + ('shiftrot', 1, ShiftRotFunctionUnit) + ): for i in range(qty): self.fus["%s%d" % (name, i)] = kls() -- 2.30.2