From b5e27f5ed873c9fec53afa8925c7d578f77deaa3 Mon Sep 17 00:00:00 2001 From: Tommaso Marinelli Date: Thu, 12 Dec 2024 10:55:23 +0100 Subject: [PATCH] configs: Generalize class types in CHI RNF/MN generators (#1851) Classes CHI_RNF and CHI_MN can be specialized to override base class/subclass attributes, like it happens in CustomMesh with router_list (see configs/example/noc_config/2x4.py). To avoid missing these attributes, it is needed to generalize the class types when instantiating the objects in the recently added generators. --- configs/ruby/CHI_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/ruby/CHI_config.py b/configs/ruby/CHI_config.py index a205db17d6..aeac35ebf8 100644 --- a/configs/ruby/CHI_config.py +++ b/configs/ruby/CHI_config.py @@ -601,7 +601,7 @@ class CHI_RNF(CHI_Node): @classmethod def generate(cls, options, ruby_system, cpus): rnfs = [ - CHI_RNF( + cls( [cpu], ruby_system, L1ICache(size=options.l1i_size, assoc=options.l1i_assoc), @@ -724,7 +724,7 @@ class CHI_MN(CHI_Node): """ Creates one Misc Node """ - return [CHI_MN(ruby_system, [cpu.l1d for cpu in cpus])] + return [cls(ruby_system, [cpu.l1d for cpu in cpus])] class CHI_SNF_Base(CHI_Node):