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; --- 1023 unchanged lines hidden (view full) --- 1032 while (true) { 1033 // Some cases will put us into an infinite loop without this limit 1034 assert(counter <= m_transitions_per_cycle); 1035 if (counter == m_transitions_per_cycle) { 1036 // Count how often we are fully utilized 1037 g_system_ptr->getProfiler()->controllerBusy(m_machineID); 1038 1039 // Wakeup in another cycle and try again |
1040 scheduleEvent(this, 1); |
1041 break; 1042 } 1043''') 1044 1045 code.indent() 1046 code.indent() 1047 1048 # InPorts --- 10 unchanged lines hidden (view full) --- 1059 1060 code('') 1061 1062 code.dedent() 1063 code.dedent() 1064 code(''' 1065 break; // If we got this far, we have nothing left todo 1066 } |
1067} 1068''') 1069 1070 code.write(path, "%s_Wakeup.cc" % self.ident) 1071 1072 def printCSwitch(self, path): 1073 '''Output switch statement for transition table''' 1074 --- 45 unchanged lines hidden (view full) --- 1120 code('${ident}_State state = getState(m_cache_entry_ptr, addr);') 1121 else: 1122 code('${ident}_State state = getState(addr);') 1123 1124 code(''' 1125 ${ident}_State next_state = state; 1126 1127 DPRINTF(RubyGenerated, "%s, Time: %lld, state: %s, event: %s, addr: %s\\n", |
1128 *this, g_system_ptr->getTime(), ${ident}_State_to_string(state), 1129 ${ident}_Event_to_string(event), addr); |
1130 1131 TransitionResult result = 1132''') 1133 if self.TBEType != None and self.EntryType != None: 1134 code('doTransitionWorker(event, state, next_state, m_tbe_ptr, m_cache_entry_ptr, addr);') 1135 elif self.TBEType != None: 1136 code('doTransitionWorker(event, state, next_state, m_tbe_ptr, addr);') 1137 elif self.EntryType != None: --- 155 unchanged lines hidden (view full) --- 1293 for trans in transitions: 1294 code(' case HASH_FUN($trans):') 1295 code(' $case') 1296 1297 code(''' 1298 default: 1299 fatal("Invalid transition\\n" 1300 "%s time: %d addr: %s event: %s state: %s\\n", |
1301 name(), g_system_ptr->getTime(), addr, event, state); |
1302 } 1303 return TransitionResult_Valid; 1304} 1305''') 1306 code.write(path, "%s_Transitions.cc" % self.ident) 1307 1308 def printProfileDumperHH(self, path): 1309 code = self.symtab.codeFormatter() --- 395 unchanged lines hidden --- |