diff options
author | Wojciech Kosior <kwojtus@protonmail.com> | 2020-09-05 18:32:44 +0200 |
---|---|---|
committer | Wojciech Kosior <kwojtus@protonmail.com> | 2020-09-05 18:38:27 +0200 |
commit | f37a50d6cfe86e6f5ebe368c0868878fd72aa884 (patch) | |
tree | 22c8298f9c20a6817036ecf8f6d905fe5d6fa894 /design | |
parent | 8d92524d4c46493ad83ebd493dabd3f88e11037b (diff) | |
download | AGH-engineering-thesis-f37a50d6cfe86e6f5ebe368c0868878fd72aa884.tar.gz AGH-engineering-thesis-f37a50d6cfe86e6f5ebe368c0868878fd72aa884.zip |
add jump instruction together with bench
Diffstat (limited to 'design')
-rw-r--r-- | design/stack_machine.v | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/design/stack_machine.v b/design/stack_machine.v index a6b2765..150f6c7 100644 --- a/design/stack_machine.v +++ b/design/stack_machine.v @@ -190,6 +190,10 @@ module stack_machine_new assign instr_set_sp = use_im && stack_same_size && instruction[11:7] == 5'd0; + wire instr_jump; + assign instr_jump = use_im && stack_same_size && + instruction[11:7] == 5'd1; + /* Instructions, that grow stack */ wire instr_tee; assign instr_tee = !set_im && !use_im && stack_grows && @@ -493,6 +497,9 @@ module stack_machine_new if (instr_set_sp) `SET_SP(im_effective); + if (instr_jump) + `SET_PC(im_effective); + /* Instructions, that grow stack */ if (instr_tee) r1 <= r1; |