StateMachine.py (11116:d6fb95dbf3e2) StateMachine.py (11118:75c1e564a725)
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# Copyright (c) 2013 Advanced Micro Devices, Inc.
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

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

1150 elif self.EntryType != None:
1151 code('${ident}_State state = getState(m_cache_entry_ptr, addr);')
1152 else:
1153 code('${ident}_State state = getState(addr);')
1154
1155 code('''
1156${ident}_State next_state = state;
1157
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# Copyright (c) 2013 Advanced Micro Devices, Inc.
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

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

1150 elif self.EntryType != None:
1151 code('${ident}_State state = getState(m_cache_entry_ptr, addr);')
1152 else:
1153 code('${ident}_State state = getState(addr);')
1154
1155 code('''
1156${ident}_State next_state = state;
1157
1158DPRINTF(RubyGenerated, "%s, Time: %lld, state: %s, event: %s, addr: %s\\n",
1158DPRINTF(RubyGenerated, "%s, Time: %lld, state: %s, event: %s, addr: %#x\\n",
1159 *this, curCycle(), ${ident}_State_to_string(state),
1160 ${ident}_Event_to_string(event), addr);
1161
1162TransitionResult result =
1163''')
1164 if self.TBEType != None and self.EntryType != None:
1165 code('doTransitionWorker(event, state, next_state, m_tbe_ptr, m_cache_entry_ptr, addr);')
1166 elif self.TBEType != None:

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

1179 ${ident}_State_to_string(next_state));
1180 countTransition(state, event);
1181
1182 DPRINTFR(ProtocolTrace, "%15d %3s %10s%20s %6s>%-6s %#x %s\\n",
1183 curTick(), m_version, "${ident}",
1184 ${ident}_Event_to_string(event),
1185 ${ident}_State_to_string(state),
1186 ${ident}_State_to_string(next_state),
1159 *this, curCycle(), ${ident}_State_to_string(state),
1160 ${ident}_Event_to_string(event), addr);
1161
1162TransitionResult result =
1163''')
1164 if self.TBEType != None and self.EntryType != None:
1165 code('doTransitionWorker(event, state, next_state, m_tbe_ptr, m_cache_entry_ptr, addr);')
1166 elif self.TBEType != None:

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

1179 ${ident}_State_to_string(next_state));
1180 countTransition(state, event);
1181
1182 DPRINTFR(ProtocolTrace, "%15d %3s %10s%20s %6s>%-6s %#x %s\\n",
1183 curTick(), m_version, "${ident}",
1184 ${ident}_Event_to_string(event),
1185 ${ident}_State_to_string(state),
1186 ${ident}_State_to_string(next_state),
1187 addr, GET_TRANSITION_COMMENT());
1187 printAddress(addr), GET_TRANSITION_COMMENT());
1188
1189 CLEAR_TRANSITION_COMMENT();
1190''')
1191 if self.TBEType != None and self.EntryType != None:
1192 code('setState(m_tbe_ptr, m_cache_entry_ptr, addr, next_state);')
1193 code('setAccessPermission(m_cache_entry_ptr, addr, next_state);')
1194 elif self.TBEType != None:
1195 code('setState(m_tbe_ptr, addr, next_state);')

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

1203
1204 code('''
1205} else if (result == TransitionResult_ResourceStall) {
1206 DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %#x %s\\n",
1207 curTick(), m_version, "${ident}",
1208 ${ident}_Event_to_string(event),
1209 ${ident}_State_to_string(state),
1210 ${ident}_State_to_string(next_state),
1188
1189 CLEAR_TRANSITION_COMMENT();
1190''')
1191 if self.TBEType != None and self.EntryType != None:
1192 code('setState(m_tbe_ptr, m_cache_entry_ptr, addr, next_state);')
1193 code('setAccessPermission(m_cache_entry_ptr, addr, next_state);')
1194 elif self.TBEType != None:
1195 code('setState(m_tbe_ptr, addr, next_state);')

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

1203
1204 code('''
1205} else if (result == TransitionResult_ResourceStall) {
1206 DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %#x %s\\n",
1207 curTick(), m_version, "${ident}",
1208 ${ident}_Event_to_string(event),
1209 ${ident}_State_to_string(state),
1210 ${ident}_State_to_string(next_state),
1211 addr, "Resource Stall");
1211 printAddress(addr), "Resource Stall");
1212} else if (result == TransitionResult_ProtocolStall) {
1213 DPRINTF(RubyGenerated, "stalling\\n");
1214 DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %#x %s\\n",
1215 curTick(), m_version, "${ident}",
1216 ${ident}_Event_to_string(event),
1217 ${ident}_State_to_string(state),
1218 ${ident}_State_to_string(next_state),
1212} else if (result == TransitionResult_ProtocolStall) {
1213 DPRINTF(RubyGenerated, "stalling\\n");
1214 DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %#x %s\\n",
1215 curTick(), m_version, "${ident}",
1216 ${ident}_Event_to_string(event),
1217 ${ident}_State_to_string(state),
1218 ${ident}_State_to_string(next_state),
1219 addr, "Protocol Stall");
1219 printAddress(addr), "Protocol Stall");
1220}
1221
1222return result;
1223''')
1224 code.dedent()
1225 code('''
1226}
1227

--- 308 unchanged lines hidden ---
1220}
1221
1222return result;
1223''')
1224 code.dedent()
1225 code('''
1226}
1227

--- 308 unchanged lines hidden ---