1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 239 unchanged lines hidden (view full) ---

248class $c_ident : public AbstractController
249{
250 public:
251 typedef ${c_ident}Params Params;
252 $c_ident(const Params *p);
253 static int getNumControllers();
254 void init();
255 MessageBuffer* getMandatoryQueue() const;
256 const int & getVersion() const;
256 const std::string toString() const;
258 const std::string getName() const;
259 void initNetworkPtr(Network* net_ptr) { m_net_ptr = net_ptr; }
257
258 void print(std::ostream& out) const;
259 void wakeup();
260 void printStats(std::ostream& out) const;
261 void clearStats();
262 void regStats();
263 void collateStats();
264
268 void blockOnQueue(Address addr, MessageBuffer* port);
269 void unblock(Address addr);
265 void recordCacheTrace(int cntrl, CacheRecorder* tr);
266 Sequencer* getSequencer() const;
267
268 bool functionalReadBuffers(PacketPtr&);
269 uint32_t functionalWriteBuffers(PacketPtr&);
270
271 void countTransition(${ident}_State state, ${ident}_Event event);
272 void possibleTransition(${ident}_State state, ${ident}_Event event);

--- 557 unchanged lines hidden (view full) ---

830}
831
832Sequencer*
833$c_ident::getSequencer() const
834{
835 return $seq_ident;
836}
837
843const int &
844$c_ident::getVersion() const
845{
846 return m_version;
847}
848
838const string
839$c_ident::toString() const
840{
841 return "$c_ident";
842}
843
855const string
856$c_ident::getName() const
857{
858 return m_name;
859}
860
844void
862$c_ident::blockOnQueue(Address addr, MessageBuffer* port)
863{
864 m_is_blocking = true;
865 m_block_map[addr] = port;
866}
867
868void
869$c_ident::unblock(Address addr)
870{
871 m_block_map.erase(addr);
872 if (m_block_map.size() == 0) {
873 m_is_blocking = false;
874 }
875}
876
877void
845$c_ident::print(ostream& out) const
846{
847 out << "[$c_ident " << m_version << "]";
848}
849
850void
851$c_ident::printStats(ostream& out) const
852{

--- 706 unchanged lines hidden ---