aboutsummaryrefslogtreecommitdiffstats
path: root/src/verilog
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-06-14 14:12:38 +0100
committerYann Herklotz <git@yannherklotz.com>2020-06-14 14:12:38 +0100
commita23cc48f449ffbfd347f833965c1e04b88e0009a (patch)
treea2f052d935a9db4fe34ca518a4bc81ad0ae6fd30 /src/verilog
parent8e3c89bad3a20c0bb9c88b83d966565d79822ff1 (diff)
downloadvericert-a23cc48f449ffbfd347f833965c1e04b88e0009a.tar.gz
vericert-a23cc48f449ffbfd347f833965c1e04b88e0009a.zip
Add more unproven instructions, Admitted equiv to spec
Diffstat (limited to 'src/verilog')
-rw-r--r--src/verilog/PrintVerilog.ml3
-rw-r--r--src/verilog/Verilog.v4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/verilog/PrintVerilog.ml b/src/verilog/PrintVerilog.ml
index 700b8e3..a0f3ab3 100644
--- a/src/verilog/PrintVerilog.ml
+++ b/src/verilog/PrintVerilog.ml
@@ -58,7 +58,8 @@ let pprint_binop l r =
| Vor -> unsigned "|"
| Vxor -> unsigned "^"
| Vshl -> unsigned "<<"
- | Vshr -> unsigned ">>"
+ | Vshr -> signed ">>>"
+ | Vshru -> unsigned ">>"
let unop = function
| Vneg -> " ~ "
diff --git a/src/verilog/Verilog.v b/src/verilog/Verilog.v
index b4b2f00..b80678e 100644
--- a/src/verilog/Verilog.v
+++ b/src/verilog/Verilog.v
@@ -130,7 +130,8 @@ Inductive binop : Type :=
| Vor : binop (** or (binary [|]) *)
| Vxor : binop (** xor (binary [^|]) *)
| Vshl : binop (** shift left ([<<]) *)
-| Vshr : binop. (** shift right ([>>]) *)
+| Vshr : binop (** shift right ([>>>]) *)
+| Vshru : binop. (** shift right unsigned ([>>]) *)
(** ** Unary Operators *)
@@ -305,6 +306,7 @@ Definition binop_run (op : binop) : forall v1 v2 : value, vsize v1 = vsize v2 ->
| Vxor => vxor
| Vshl => vshl
| Vshr => vshr
+ | Vshru => vshr (* FIXME: should not be the same operation. *)
end.
Definition unop_run (op : unop) : value -> value :=