From: Luke Kenneth Casson Leighton Date: Thu, 4 Jun 2020 11:54:09 +0000 (+0100) Subject: docstring for AllFunctionUnits X-Git-Tag: div_pipeline~610 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5f03cdde2873cfe09235c37e018fbfc4962973a;p=soc.git docstring for AllFunctionUnits --- 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()