You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
565 B
17 lines
565 B
from run import Runner
|
|
from util import Instruction
|
|
|
|
program = []
|
|
program.append(Instruction('load', 0, True, 6, False, 0, True, 2))
|
|
program.append(Instruction('load', 0, True, 2, False, 0, True, 3))
|
|
program.append(Instruction('mult', 1, True, 0, True, 2, True, 4))
|
|
program.append(Instruction('sub', 2, True, 8, True, 6, True, 2))
|
|
program.append(Instruction('div', 3, True, 10, True, 0, True, 6))
|
|
program.append(Instruction('add', 2, True, 6, True, 8, True, 2))
|
|
|
|
runner = Runner(program)
|
|
runner.run(70)
|
|
runner.dump()
|
|
print('')
|
|
print('clk: {}'.format(runner.clock))
|