StateMachine.py (8308:79cf09f5a234) StateMachine.py (8337:b9ba22cb23f2)
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;

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

1066 code('''
1067 ${{self.TBEType.c_ident}}* m_tbe_ptr,
1068''')
1069 code('''
1070 const Address &addr)
1071{
1072''')
1073 if self.TBEType != None and self.EntryType != None:
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;

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

1066 code('''
1067 ${{self.TBEType.c_ident}}* m_tbe_ptr,
1068''')
1069 code('''
1070 const Address &addr)
1071{
1072''')
1073 if self.TBEType != None and self.EntryType != None:
1074 code('${ident}_State state = ${ident}_getState(m_tbe_ptr, m_cache_entry_ptr, addr);')
1074 code('${ident}_State state = getState(m_tbe_ptr, m_cache_entry_ptr, addr);')
1075 elif self.TBEType != None:
1075 elif self.TBEType != None:
1076 code('${ident}_State state = ${ident}_getState(m_tbe_ptr, addr);')
1076 code('${ident}_State state = getState(m_tbe_ptr, addr);')
1077 elif self.EntryType != None:
1077 elif self.EntryType != None:
1078 code('${ident}_State state = ${ident}_getState(m_cache_entry_ptr, addr);')
1078 code('${ident}_State state = getState(m_cache_entry_ptr, addr);')
1079 else:
1079 else:
1080 code('${ident}_State state = ${ident}_getState(addr);')
1080 code('${ident}_State state = getState(addr);')
1081
1082 code('''
1083 ${ident}_State next_state = state;
1084
1085 DPRINTF(RubyGenerated, "%s, Time: %lld, state: %s, event: %s, addr: %s\\n",
1086 *this,
1087 g_eventQueue_ptr->getTime(),
1088 ${ident}_State_to_string(state),

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

1110 ${ident}_Event_to_string(event),
1111 ${ident}_State_to_string(state),
1112 ${ident}_State_to_string(next_state),
1113 addr, GET_TRANSITION_COMMENT());
1114
1115 CLEAR_TRANSITION_COMMENT();
1116''')
1117 if self.TBEType != None and self.EntryType != None:
1081
1082 code('''
1083 ${ident}_State next_state = state;
1084
1085 DPRINTF(RubyGenerated, "%s, Time: %lld, state: %s, event: %s, addr: %s\\n",
1086 *this,
1087 g_eventQueue_ptr->getTime(),
1088 ${ident}_State_to_string(state),

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

1110 ${ident}_Event_to_string(event),
1111 ${ident}_State_to_string(state),
1112 ${ident}_State_to_string(next_state),
1113 addr, GET_TRANSITION_COMMENT());
1114
1115 CLEAR_TRANSITION_COMMENT();
1116''')
1117 if self.TBEType != None and self.EntryType != None:
1118 code('${ident}_setState(m_tbe_ptr, m_cache_entry_ptr, addr, next_state);')
1118 code('setState(m_tbe_ptr, m_cache_entry_ptr, addr, next_state);')
1119 code('set_permission(m_cache_entry_ptr, ${ident}_State_to_permission(next_state));')
1120 elif self.TBEType != None:
1119 code('set_permission(m_cache_entry_ptr, ${ident}_State_to_permission(next_state));')
1120 elif self.TBEType != None:
1121 code('${ident}_setState(m_tbe_ptr, addr, next_state);')
1121 code('setState(m_tbe_ptr, addr, next_state);')
1122 elif self.EntryType != None:
1122 elif self.EntryType != None:
1123 code('${ident}_setState(m_cache_entry_ptr, addr, next_state);')
1123 code('setState(m_cache_entry_ptr, addr, next_state);')
1124 code('set_permission(m_cache_entry_ptr, ${ident}_State_to_permission(next_state));')
1125 else:
1124 code('set_permission(m_cache_entry_ptr, ${ident}_State_to_permission(next_state));')
1125 else:
1126 code('${ident}_setState(addr, next_state);')
1126 code('setState(addr, next_state);')
1127
1128 code('''
1129 } else if (result == TransitionResult_ResourceStall) {
1130 DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\\n",
1131 curTick(), m_version, "${ident}",
1132 ${ident}_Event_to_string(event),
1133 ${ident}_State_to_string(state),
1134 ${ident}_State_to_string(next_state),

--- 516 unchanged lines hidden ---
1127
1128 code('''
1129 } else if (result == TransitionResult_ResourceStall) {
1130 DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\\n",
1131 curTick(), m_version, "${ident}",
1132 ${ident}_Event_to_string(event),
1133 ${ident}_State_to_string(state),
1134 ${ident}_State_to_string(next_state),

--- 516 unchanged lines hidden ---