summaryrefslogtreecommitdiff
path: root/src/mem/ruby/slicc_interface/AbstractController.cc
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-12-11 10:05:55 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2012-12-11 10:05:55 -0600
commit9b72a0f627bb9d9f3028e1ad7bf65976863db099 (patch)
treebf5532471cff6bba7f790461e148da7904425a78 /src/mem/ruby/slicc_interface/AbstractController.cc
parent93e283abb348b81d086225f7861d94901c9b0888 (diff)
downloadgem5-9b72a0f627bb9d9f3028e1ad7bf65976863db099.tar.xz
ruby: change slicc to allow for constructor args
The patch adds support to slicc for recognizing arguments that should be passed to the constructor of a class. I did not like the fact that an explicit check was being carried on the type 'TBETable' to figure out the arguments to be passed to the constructor. The patch also moves some of the member variables that are declared for all the controllers to the base class AbstractController.
Diffstat (limited to 'src/mem/ruby/slicc_interface/AbstractController.cc')
-rw-r--r--src/mem/ruby/slicc_interface/AbstractController.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mem/ruby/slicc_interface/AbstractController.cc b/src/mem/ruby/slicc_interface/AbstractController.cc
index eca68ad05..ac48db0c7 100644
--- a/src/mem/ruby/slicc_interface/AbstractController.cc
+++ b/src/mem/ruby/slicc_interface/AbstractController.cc
@@ -32,5 +32,11 @@
AbstractController::AbstractController(const Params *p)
: SimObject(p), Consumer(this)
{
- p->ruby_system->registerAbstractController(this);
+ m_version = p->version;
+ m_transitions_per_cycle = p->transitions_per_cycle;
+ m_buffer_size = p->buffer_size;
+ m_recycle_latency = p->recycle_latency;
+ m_number_of_TBEs = p->number_of_TBEs;
+ m_is_blocking = false;
+ p->ruby_system->registerAbstractController(this);
}