StateMachine.py (9801:04414c223a6a) StateMachine.py (9819:e4b12145f4eb)
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;
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;
257 const std::string toString() const;
256 const std::string toString() const;
258 const std::string getName() const;
259 void initNetworkPtr(Network* net_ptr) { m_net_ptr = net_ptr; }
260
261 void print(std::ostream& out) const;
262 void wakeup();
263 void printStats(std::ostream& out) const;
264 void clearStats();
265 void regStats();
266 void collateStats();
267
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);
270 void recordCacheTrace(int cntrl, CacheRecorder* tr);
271 Sequencer* getSequencer() const;
272
273 bool functionalReadBuffers(PacketPtr&);
274 uint32_t functionalWriteBuffers(PacketPtr&);
275
276 void countTransition(${ident}_State state, ${ident}_Event event);
277 void possibleTransition(${ident}_State state, ${ident}_Event event);

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

835}
836
837Sequencer*
838$c_ident::getSequencer() const
839{
840 return $seq_ident;
841}
842
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
849const string
850$c_ident::toString() const
851{
852 return "$c_ident";
853}
854
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
861void
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
878$c_ident::print(ostream& out) const
879{
880 out << "[$c_ident " << m_version << "]";
881}
882
883void
884$c_ident::printStats(ostream& out) const
885{

--- 706 unchanged lines hidden ---
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 ---