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.hh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/mem/ruby/slicc_interface/AbstractController.hh') diff --git a/src/mem/ruby/slicc_interface/AbstractController.hh b/src/mem/ruby/slicc_interface/AbstractController.hh index 9ab924608..16b881b1f 100644 --- a/src/mem/ruby/slicc_interface/AbstractController.hh +++ b/src/mem/ruby/slicc_interface/AbstractController.hh @@ -32,13 +32,14 @@ #include #include -#include "mem/packet.hh" #include "mem/protocol/AccessPermission.hh" #include "mem/ruby/common/Address.hh" #include "mem/ruby/common/Consumer.hh" #include "mem/ruby/common/DataBlock.hh" #include "mem/ruby/network/Network.hh" #include "mem/ruby/recorder/CacheRecorder.hh" +#include "mem/ruby/system/MachineID.hh" +#include "mem/packet.hh" #include "params/RubyController.hh" #include "sim/sim_object.hh" @@ -82,6 +83,24 @@ class AbstractController : public SimObject, public Consumer //! Function for enqueuing a prefetch request virtual void enqueuePrefetch(const Address&, const RubyRequestType&) { fatal("Prefetches not implemented!");} + + protected: + int m_transitions_per_cycle; + int m_buffer_size; + int m_recycle_latency; + std::string m_name; + std::map m_cfg; + NodeID m_version; + Network* m_net_ptr; + MachineID m_machineID; + bool m_is_blocking; + std::map m_block_map; + typedef std::vector MsgVecType; + typedef std::map< Address, MsgVecType* > WaitingBufType; + WaitingBufType m_waiting_buffers; + int m_max_in_port_rank; + int m_cur_in_port_rank; + int m_number_of_TBEs; }; #endif // __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCONTROLLER_HH__ -- cgit v1.2.3