StateMachine.py (8232:b28d06a175be) | StateMachine.py (8266:66a3187a6714) |
---|---|
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; --- 1090 unchanged lines hidden (view full) --- 1099 else: 1100 code('doTransitionWorker(event, state, next_state, addr);') 1101 1102 code(''' 1103 if (result == TransitionResult_Valid) { 1104 DPRINTF(RubyGenerated, "next_state: %s\\n", 1105 ${ident}_State_to_string(next_state)); 1106 m_profiler.countTransition(state, event); | 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; --- 1090 unchanged lines hidden (view full) --- 1099 else: 1100 code('doTransitionWorker(event, state, next_state, addr);') 1101 1102 code(''' 1103 if (result == TransitionResult_Valid) { 1104 DPRINTF(RubyGenerated, "next_state: %s\\n", 1105 ${ident}_State_to_string(next_state)); 1106 m_profiler.countTransition(state, event); |
1107 DPRINTFR(ProtocolTrace, "%7d %3s %10s%20s %6s>%-6s %s %s\\n", 1108 g_eventQueue_ptr->getTime(), m_version, "${ident}", 1109 ${ident}_Event_to_string(event), 1110 ${ident}_State_to_string(state), 1111 ${ident}_State_to_string(next_state), 1112 addr, GET_TRANSITION_COMMENT()); | 1107 DPRINTFR(ProtocolTrace, "%15d %3s %10s%20s %6s>%-6s %s %s\\n", 1108 curTick(), m_version, "${ident}", 1109 ${ident}_Event_to_string(event), 1110 ${ident}_State_to_string(state), 1111 ${ident}_State_to_string(next_state), 1112 addr, GET_TRANSITION_COMMENT()); |
1113 1114 CLEAR_TRANSITION_COMMENT(); 1115''') 1116 if self.TBEType != None and self.EntryType != None: 1117 code('${ident}_setState(m_tbe_ptr, m_cache_entry_ptr, addr, next_state);') 1118 code('set_permission(m_cache_entry_ptr, ${ident}_State_to_permission(next_state));') 1119 elif self.TBEType != None: 1120 code('${ident}_setState(m_tbe_ptr, addr, next_state);') 1121 elif self.EntryType != None: 1122 code('${ident}_setState(m_cache_entry_ptr, addr, next_state);') 1123 code('set_permission(m_cache_entry_ptr, ${ident}_State_to_permission(next_state));') 1124 else: 1125 code('${ident}_setState(addr, next_state);') 1126 1127 code(''' 1128 } else if (result == TransitionResult_ResourceStall) { | 1113 1114 CLEAR_TRANSITION_COMMENT(); 1115''') 1116 if self.TBEType != None and self.EntryType != None: 1117 code('${ident}_setState(m_tbe_ptr, m_cache_entry_ptr, addr, next_state);') 1118 code('set_permission(m_cache_entry_ptr, ${ident}_State_to_permission(next_state));') 1119 elif self.TBEType != None: 1120 code('${ident}_setState(m_tbe_ptr, addr, next_state);') 1121 elif self.EntryType != None: 1122 code('${ident}_setState(m_cache_entry_ptr, addr, next_state);') 1123 code('set_permission(m_cache_entry_ptr, ${ident}_State_to_permission(next_state));') 1124 else: 1125 code('${ident}_setState(addr, next_state);') 1126 1127 code(''' 1128 } else if (result == TransitionResult_ResourceStall) { |
1129 DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\\n", 1130 g_eventQueue_ptr->getTime(), m_version, "${ident}", 1131 ${ident}_Event_to_string(event), 1132 ${ident}_State_to_string(state), 1133 ${ident}_State_to_string(next_state), 1134 addr, "Resource Stall"); | 1129 DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\\n", 1130 curTick(), m_version, "${ident}", 1131 ${ident}_Event_to_string(event), 1132 ${ident}_State_to_string(state), 1133 ${ident}_State_to_string(next_state), 1134 addr, "Resource Stall"); |
1135 } else if (result == TransitionResult_ProtocolStall) { 1136 DPRINTF(RubyGenerated, "stalling\\n"); | 1135 } else if (result == TransitionResult_ProtocolStall) { 1136 DPRINTF(RubyGenerated, "stalling\\n"); |
1137 DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\\n", 1138 g_eventQueue_ptr->getTime(), m_version, "${ident}", 1139 ${ident}_Event_to_string(event), 1140 ${ident}_State_to_string(state), 1141 ${ident}_State_to_string(next_state), 1142 addr, "Protocol Stall"); | 1137 DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\\n", 1138 curTick(), m_version, "${ident}", 1139 ${ident}_Event_to_string(event), 1140 ${ident}_State_to_string(state), 1141 ${ident}_State_to_string(next_state), 1142 addr, "Protocol Stall"); |
1143 } 1144 1145 return result; 1146} 1147 1148TransitionResult 1149${ident}_Controller::doTransitionWorker(${ident}_Event event, 1150 ${ident}_State state, --- 499 unchanged lines hidden --- | 1143 } 1144 1145 return result; 1146} 1147 1148TransitionResult 1149${ident}_Controller::doTransitionWorker(${ident}_Event event, 1150 ${ident}_State state, --- 499 unchanged lines hidden --- |