From: Luke Kenneth Casson Leighton Date: Sun, 14 Jun 2020 20:22:04 +0000 (+0100) Subject: add optional LDSTFunctionUnit to compunits X-Git-Tag: div_pipeline~378 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=396a8977217e40bee0eaa90ac4d927f26179835d;p=soc.git add optional LDSTFunctionUnit to compunits --- diff --git a/src/soc/fu/compunits/compunits.py b/src/soc/fu/compunits/compunits.py index 6b082d4e..1ffe7d8d 100644 --- a/src/soc/fu/compunits/compunits.py +++ b/src/soc/fu/compunits/compunits.py @@ -156,16 +156,20 @@ class AllFunctionUnits(Elaboratable): * type of FU required """ - def __init__(self): + def __init__(self, pi=None): self.fus = {} for (name, qty, kls) in (('alu', 1, ALUFunctionUnit), ('cr', 1, CRFunctionUnit), ('branch', 1, BranchFunctionUnit), ('logical', 1, LogicalFunctionUnit), - ('shiftrot', 1, ShiftRotFunctionUnit) + ('shiftrot', 1, ShiftRotFunctionUnit), ): for i in range(qty): self.fus["%s%d" % (name, i)] = kls() + if pi is None: + return + for i in enumerate(pi): + self.fus["ldst%d" % (i)] = LDSTFunctionUnit(pi[i]) def elaborate(self, platform): m = Module()