Sam Mussmann committed 86d425b

Remove flag variable 'done' from tracker.

Comments (0)

Files changed (1)

   Therefore also knows which instruction(s) are next to issue and when the
   instructions are all done executing.
-  done = False
   class _Instruction:
     """ Internal representation of an instruction.
     for instruction in self.instructions:
     if self.instructions[-1].cur_state == 'CM':
-      self.done = True
+      return True
     if new_cycle > 1000:
       print "failed to stop"
-      self.done = True
+      return True
 class _ReorderBuffer:
   """Mimics a reorder buffer.
   cdb = list()
   functional_units = _FunctionalUnits()
-  while not instruction_tracker.done:
+  while not instruction_tracker.update(cycle):
     # Set up next instruction to issue next time
     cycle += 1
-    instruction_tracker.update(cycle)
 # This is debug stuff to dump the state of various hardware pieces.  I'm
 # leaving it here should you need it to debug stuff.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.