aboutsummaryrefslogtreecommitdiff
path: root/design
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-09-02 09:10:01 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-09-02 09:10:01 +0200
commit9ff05a96e5a31df902293c90af2fec2531d8ee36 (patch)
treef08ea926bbeaa4093962ba13aafd3c6e6c192421 /design
parenta0610e8be796b2e8225d2560209940815d1bd722 (diff)
downloadAGH-engineering-thesis-9ff05a96e5a31df902293c90af2fec2531d8ee36.tar.gz
AGH-engineering-thesis-9ff05a96e5a31df902293c90af2fec2531d8ee36.zip
add tee instruction
Diffstat (limited to 'design')
-rw-r--r--design/stack_machine.v3
1 files changed, 3 insertions, 0 deletions
diff --git a/design/stack_machine.v b/design/stack_machine.v
index 1fddb18..d466cc8 100644
--- a/design/stack_machine.v
+++ b/design/stack_machine.v
@@ -127,6 +127,7 @@ module stack_machine
assign extended_instruction_bits = instruction[8:0];
/* extended instructions */
+ parameter INSTR_TEE = 9'd7;
parameter INSTR_MUL = 9'd6;
parameter INSTR_DIV = 9'd5;
parameter INSTR_SUB = 9'd4;
@@ -326,6 +327,8 @@ module stack_machine
end
INSTR_MUL :
r0 <= r0 * r1;
+ INSTR_TEE :
+ r1 <= r0;
default : begin
`ifdef SIMULATION
$display("operation not implemented yet");