Skip to content

Commit

Permalink
Memory-mapped program counter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah Mount committed Jun 26, 2016
1 parent 827dbdf commit 364956c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion revelation/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,17 @@ def EXCAUSE(self, value):
self._set_nth_bit_of_register('STATUS', 18, (value >> 2) & 0x1)
self._set_nth_bit_of_register('STATUS', 19, (value >> 3) & 0x1)

@property
def pc(self):
return self.rf[reg_map['pc']]

@pc.setter
def pc(self, value):
self.rf[reg_map['pc']] = value

def fetch_pc(self):
# Override method from base class. Needed by Pydgin.
return self.pc
return self.rf[reg_map['pc']]

def debug_flags(self):
if self.debug.enabled('flags'):
Expand Down

0 comments on commit 364956c

Please sign in to comment.