StateMachine.py (9465:4ae4f3f4b870) | StateMachine.py (9496:28d88a0fda74) |
---|---|
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; --- 649 unchanged lines hidden (view full) --- 658 659 # Only possible if it is not a 'z' case 660 if not stall: 661 state = "%s_State_%s" % (self.ident, trans.state.ident) 662 event = "%s_Event_%s" % (self.ident, trans.event.ident) 663 code('m_profiler.possibleTransition($state, $event);') 664 665 code.dedent() | 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; --- 649 unchanged lines hidden (view full) --- 658 659 # Only possible if it is not a 'z' case 660 if not stall: 661 state = "%s_State_%s" % (self.ident, trans.state.ident) 662 event = "%s_Event_%s" % (self.ident, trans.event.ident) 663 code('m_profiler.possibleTransition($state, $event);') 664 665 code.dedent() |
666 code('}') | 666 code(''' 667 AbstractController::init(); 668 clearStats(); 669} 670''') |
667 668 has_mandatory_q = False 669 for port in self.in_ports: 670 if port.code.find("mandatoryQueue_ptr") >= 0: 671 has_mandatory_q = True 672 673 if has_mandatory_q: 674 mq_ident = "m_%s_mandatoryQueue_ptr" % self.ident --- 159 unchanged lines hidden (view full) --- 834 for param in self.config_parameters: 835 if param.type_ast.type.ident == "CacheMemory" or \ 836 param.type_ast.type.ident == "MemoryControl": 837 assert(param.pointer) 838 code(' m_${{param.ident}}_ptr->clearStats();') 839 840 code(''' 841 m_profiler.clearStats(); | 671 672 has_mandatory_q = False 673 for port in self.in_ports: 674 if port.code.find("mandatoryQueue_ptr") >= 0: 675 has_mandatory_q = True 676 677 if has_mandatory_q: 678 mq_ident = "m_%s_mandatoryQueue_ptr" % self.ident --- 159 unchanged lines hidden (view full) --- 838 for param in self.config_parameters: 839 if param.type_ast.type.ident == "CacheMemory" or \ 840 param.type_ast.type.ident == "MemoryControl": 841 assert(param.pointer) 842 code(' m_${{param.ident}}_ptr->clearStats();') 843 844 code(''' 845 m_profiler.clearStats(); |
846 AbstractController::clearStats(); |
|
842} 843''') 844 845 if self.EntryType != None: 846 code(''' 847 848// Set and Reset for cache_entry variable 849void --- 192 unchanged lines hidden (view full) --- 1042${ident}_Controller::wakeup() 1043{ 1044 int counter = 0; 1045 while (true) { 1046 // Some cases will put us into an infinite loop without this limit 1047 assert(counter <= m_transitions_per_cycle); 1048 if (counter == m_transitions_per_cycle) { 1049 // Count how often we are fully utilized | 847} 848''') 849 850 if self.EntryType != None: 851 code(''' 852 853// Set and Reset for cache_entry variable 854void --- 192 unchanged lines hidden (view full) --- 1047${ident}_Controller::wakeup() 1048{ 1049 int counter = 0; 1050 while (true) { 1051 // Some cases will put us into an infinite loop without this limit 1052 assert(counter <= m_transitions_per_cycle); 1053 if (counter == m_transitions_per_cycle) { 1054 // Count how often we are fully utilized |
1050 g_system_ptr->getProfiler()->controllerBusy(m_machineID); | 1055 m_fully_busy_cycles++; |
1051 1052 // Wakeup in another cycle and try again 1053 scheduleEvent(1); 1054 break; 1055 } 1056''') 1057 1058 code.indent() --- 659 unchanged lines hidden --- | 1056 1057 // Wakeup in another cycle and try again 1058 scheduleEvent(1); 1059 break; 1060 } 1061''') 1062 1063 code.indent() --- 659 unchanged lines hidden --- |