-
Notifications
You must be signed in to change notification settings - Fork 0
/
ModClassify.v
27 lines (24 loc) · 903 Bytes
/
ModClassify.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Require Import Kami.AllNotations FpuKami.Definitions FpuKami.Classify.
Section ModClassify.
Variable name: string.
Local Notation "^ x" := (name ++ "#" ++ x)%string (at level 100).
Variable expWidthMinus2 sigWidthMinus2: nat.
Variable lenMinus10: nat.
Definition ClassifyImpl :=
MODULE {
(* Register "test": Bool <- false *)
(* with RegisterU "test2": Bool *)
(* with *)
Rule ^"classify" :=
Call fn : FN expWidthMinus2 sigWidthMinus2 <- "classifyInput" ();
Call "classifyOutput" (classify_impl #fn lenMinus10 : Bit (10 + lenMinus10));
Retv
}.
Definition ClassifySpec :=
MODULE {
Rule ^"classify" :=
Call fn : FN expWidthMinus2 sigWidthMinus2 <- "classifyInput" ();
Call "classifyOutput" (classify_spec #fn lenMinus10 : Bit (10 + lenMinus10));
Retv
}.
End ModClassify.