summaryrefslogtreecommitdiff
path: root/src/mem/slicc
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:19 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:19 -0800
commit2a0555470cfc66ab70544e97578c048822ec9282 (patch)
tree6f96f3fb5bf9f27b0c2c9032715907fa7939bc49 /src/mem/slicc
parent3b290a35aca3f6aba8226dde8387f38a9de39093 (diff)
downloadgem5-2a0555470cfc66ab70544e97578c048822ec9282.tar.xz
ruby: Converted MOESI_hammer dma cntrl to new config system
Diffstat (limited to 'src/mem/slicc')
-rw-r--r--src/mem/slicc/symbols/StateMachine.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index 867886436..4f25f68e9 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -38,6 +38,7 @@ python_class_map = {"int": "Int",
"Sequencer": "RubySequencer",
"DirectoryMemory": "RubyDirectoryMemory",
"MemoryControl": "RubyMemoryControl",
+ "DMASequencer": "DMASequencer"
}
class StateMachine(Symbol):
@@ -359,7 +360,7 @@ $c_ident::$c_ident(const Params *p)
#
contains_sequencer = False
for param in self.config_parameters:
- if param.name == "sequencer":
+ if param.name == "sequencer" or param.name == "dma_sequencer":
contains_sequencer = True
if param.pointer:
code('m_${{param.name}}_ptr = p->${{param.name}};')
@@ -378,7 +379,19 @@ $c_ident::$c_ident(const Params *p)
code('''
m_sequencer_ptr->setController(this);
''')
+ #
+ # For the DMA controller, pass the sequencer a pointer to the
+ # controller.
+ #
+ if self.ident == "DMA":
+ if not contains_sequencer:
+ self.error("The DMA controller must include the sequencer " \
+ "configuration parameter")
+ code('''
+m_dma_sequencer_ptr->setController(this);
+''')
+
code('m_num_controllers++;')
for var in self.objects:
if var.ident.find("mandatoryQueue") >= 0: