From c720389366c83401c878c36b7b3a917c906d26b9 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Mon, 7 Mar 2005 20:56:02 -0500 Subject: More restructuring on Python config code for auto-generating of Param structs. objects/CoherenceProtocol.mpy: objects/Ide.mpy: Update for new Enum syntax. sim/pyconfig/m5config.py: More modest restructuring heading for auto-generating of param structs. - Revamped Enum handling: Enums are regular classes so they know their names now (makes it easier for generating C++ equivalents). - Created MetaSimObject class and moved some SimObject-specific stuff there (i.e. does not apply to ConfigNodes in general). --HG-- extra : convert_revision : a93b40dda3b038ebe8bffecac97e9079c22af561 --- objects/CoherenceProtocol.mpy | 2 +- objects/Ide.mpy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'objects') diff --git a/objects/CoherenceProtocol.mpy b/objects/CoherenceProtocol.mpy index ae041b638..f3b0026b7 100644 --- a/objects/CoherenceProtocol.mpy +++ b/objects/CoherenceProtocol.mpy @@ -1,4 +1,4 @@ -Coherence = Enum('uni', 'msi', 'mesi', 'mosi', 'moesi') +class Coherence(Enum): vals = ['uni', 'msi', 'mesi', 'mosi', 'moesi'] simobj CoherenceProtocol(SimObject): type = 'CoherenceProtocol' diff --git a/objects/Ide.mpy b/objects/Ide.mpy index c4aa2aca0..ce760ad96 100644 --- a/objects/Ide.mpy +++ b/objects/Ide.mpy @@ -1,6 +1,6 @@ from Pci import PciDevice -IdeID = Enum('master', 'slave') +class IdeID(Enum): vals = ['master', 'slave'] simobj IdeDisk(SimObject): type = 'IdeDisk' -- cgit v1.2.3