From: Luke Kenneth Casson Leighton Date: Wed, 1 Dec 2021 13:00:41 +0000 (+0000) Subject: use m.submodules[name] instead of getattr X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06b6b55ce7a6460100d2780794d45755a87b8774;p=soc.git use m.submodules[name] instead of getattr --- diff --git a/src/soc/fu/compunits/compunits.py b/src/soc/fu/compunits/compunits.py index 6c6866cf..8c48a13d 100644 --- a/src/soc/fu/compunits/compunits.py +++ b/src/soc/fu/compunits/compunits.py @@ -361,10 +361,10 @@ class AllFunctionUnits(Elaboratable): m = Module() # add MultiCompUnit modules (Single CompUnits add their own ALU) for (name, fu) in self.fus.items(): - setattr(m.submodules, name, fu) + m.submodules[name] = fu # if any ReservationStations, there is only one ALU per RS so add that for (name, alu) in self.actual_alus.items(): - setattr(m.submodules, name, alu) + m.submodules[name] = alu return m def __iter__(self):