diff options
Diffstat (limited to 'pyscv/main.py')
-rw-r--r-- | pyscv/main.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pyscv/main.py b/pyscv/main.py new file mode 100644 index 0000000..8cdc08f --- /dev/null +++ b/pyscv/main.py @@ -0,0 +1,8 @@ +# Use a generator for the execution flow +# -> PC has to be a global variable, updated by each instruction to the next val +# So user can set the PC by hand and call next(run) and make the code jump! + +pc = 0 +while True: + inst = fetch_instruction(pc) + pc = inst.execute() |