Skip to content

Commit 24fc3a7

Browse files
committed
Add Environment
The idea is that the model contains an environment that it is executed in. The environment call will contain the state and can modify it. For now only overloaded elsewhere.
1 parent 2ced272 commit 24fc3a7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

riscvmodel/model.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,14 @@ def commit(self):
9696

9797
self.memory_updates = []
9898

99+
class Environment:
100+
def call(self, state: State):
101+
pass
99102

100103
class Model(object):
101-
def __init__(self, variant: Variant, *, verbose = False):
104+
def __init__(self, variant: Variant, *, environment: Environment = None, verbose = False):
102105
self.state = State(variant)
106+
self.environment = environment if environment is not None else Environment()
103107
self.verbose = verbose
104108

105109
def issue(self, insn):

0 commit comments

Comments
 (0)