StateMachine.py (9819:e4b12145f4eb) StateMachine.py (9856:69bb50791e25)
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;

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

252 $c_ident(const Params *p);
253 static int getNumControllers();
254 void init();
255 MessageBuffer* getMandatoryQueue() const;
256 const std::string toString() const;
257
258 void print(std::ostream& out) const;
259 void wakeup();
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;

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

252 $c_ident(const Params *p);
253 static int getNumControllers();
254 void init();
255 MessageBuffer* getMandatoryQueue() const;
256 const std::string toString() const;
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
265 void recordCacheTrace(int cntrl, CacheRecorder* tr);
266 Sequencer* getSequencer() const;
267
268 bool functionalReadBuffers(PacketPtr&);

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

842}
843
844void
845$c_ident::print(ostream& out) const
846{
847 out << "[$c_ident " << m_version << "]";
848}
849
260 void clearStats();
261 void regStats();
262 void collateStats();
263
264 void recordCacheTrace(int cntrl, CacheRecorder* tr);
265 Sequencer* getSequencer() const;
266
267 bool functionalReadBuffers(PacketPtr&);

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

841}
842
843void
844$c_ident::print(ostream& out) const
845{
846 out << "[$c_ident " << m_version << "]";
847}
848
850void
851$c_ident::printStats(ostream& out) const
852{
853''')
854 #
855 # Cache and Memory Controllers have specific profilers associated with
856 # them. Print out these stats before dumping state transition stats.
857 #
858 for param in self.config_parameters:
859 if param.type_ast.type.ident == "DirectoryMemory":
860 assert(param.pointer)
861 code(' m_${{param.ident}}_ptr->printStats(out);')
862
863 code('''
864}
865
866void $c_ident::clearStats()
867{
868 for (int state = 0; state < ${ident}_State_NUM; state++) {
869 for (int event = 0; event < ${ident}_Event_NUM; event++) {
870 m_counters[state][event] = 0;
871 }
872 }
873

--- 685 unchanged lines hidden ---
849void $c_ident::clearStats()
850{
851 for (int state = 0; state < ${ident}_State_NUM; state++) {
852 for (int event = 0; event < ${ident}_Event_NUM; event++) {
853 m_counters[state][event] = 0;
854 }
855 }
856

--- 685 unchanged lines hidden ---