docstring for AllFunctionUnits
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 4 Jun 2020 11:54:09 +0000 (12:54 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 4 Jun 2020 11:54:09 +0000 (12:54 +0100)
src/soc/fu/compunits/compunits.py

index abca7a00d55fcb9720fef47c4d965e5872af06c7..c8bf762e3f8985b3336bf1df4b76253671a1d924 100644 (file)
@@ -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()