Skip to content

Commit 8d2f20b

Browse files
committed
Minor fixes
1 parent f93270c commit 8d2f20b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

riscvmodel/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def reset(self, pc = 0):
3434
self.pc.set(pc)
3535

3636
def __setattr__(self, key, value):
37-
if key is "pc" and "pc_update" in self.__dict__:
37+
if key == "pc" and "pc_update" in self.__dict__:
3838
self.pc_update.set(value)
3939
else:
4040
super().__setattr__(key, value)

riscvmodel/types.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ class InvalidImmediateException(Exception):
77
"""
88
This exception is generated by Immediates for invalid values. It contains the message for the reason.
99
"""
10-
pass
11-
1210

1311
class Immediate(object):
1412
"""
@@ -280,7 +278,7 @@ def __init__(self, pc):
280278
self.pc = pc
281279

282280
def __str__(self):
283-
return "pc = {}".format(self.pc_update)
281+
return "pc = {}".format(self.pc)
284282

285283

286284
class TraceRegister(Trace):

0 commit comments

Comments
 (0)