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.
This commit is contained in:
committed by
Bobby R. Bruce
parent
e146f1b2bc
commit
b5e27f5ed8
@@ -601,7 +601,7 @@ class CHI_RNF(CHI_Node):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def generate(cls, options, ruby_system, cpus):
|
def generate(cls, options, ruby_system, cpus):
|
||||||
rnfs = [
|
rnfs = [
|
||||||
CHI_RNF(
|
cls(
|
||||||
[cpu],
|
[cpu],
|
||||||
ruby_system,
|
ruby_system,
|
||||||
L1ICache(size=options.l1i_size, assoc=options.l1i_assoc),
|
L1ICache(size=options.l1i_size, assoc=options.l1i_assoc),
|
||||||
@@ -724,7 +724,7 @@ class CHI_MN(CHI_Node):
|
|||||||
"""
|
"""
|
||||||
Creates one Misc 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):
|
class CHI_SNF_Base(CHI_Node):
|
||||||
|
|||||||
Reference in New Issue
Block a user