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
This commit is contained in:
Steve Reinhardt
2005-03-07 20:56:02 -05:00
parent e5f945967b
commit c720389366
3 changed files with 214 additions and 176 deletions

View File

@@ -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'

View File

@@ -1,6 +1,6 @@
from Pci import PciDevice
IdeID = Enum('master', 'slave')
class IdeID(Enum): vals = ['master', 'slave']
simobj IdeDisk(SimObject):
type = 'IdeDisk'