From 9b72a0f627bb9d9f3028e1ad7bf65976863db099 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Tue, 11 Dec 2012 10:05:55 -0600 Subject: 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. --- src/mem/ruby/slicc_interface/AbstractController.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mem/ruby/slicc_interface/AbstractController.cc') 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); } -- cgit v1.2.3