From 06b6b55ce7a6460100d2780794d45755a87b8774 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 1 Dec 2021 13:00:41 +0000 Subject: [PATCH] use m.submodules[name] instead of getattr --- src/soc/fu/compunits/compunits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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): -- 2.30.2