Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wallento committed Jul 10, 2020
1 parent f93270c commit 8d2f20b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion riscvmodel/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def reset(self, pc = 0):
self.pc.set(pc)

def __setattr__(self, key, value):
if key is "pc" and "pc_update" in self.__dict__:
if key == "pc" and "pc_update" in self.__dict__:
self.pc_update.set(value)
else:
super().__setattr__(key, value)
Expand Down
4 changes: 1 addition & 3 deletions riscvmodel/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ class InvalidImmediateException(Exception):
"""
This exception is generated by Immediates for invalid values. It contains the message for the reason.
"""
pass


class Immediate(object):
"""
Expand Down Expand Up @@ -280,7 +278,7 @@ def __init__(self, pc):
self.pc = pc

def __str__(self):
return "pc = {}".format(self.pc_update)
return "pc = {}".format(self.pc)


class TraceRegister(Trace):
Expand Down

0 comments on commit 8d2f20b

Please sign in to comment.