add lab1 and lab2 exercises
This commit is contained in:
28
lab1/delay_inverter.smv
Normal file
28
lab1/delay_inverter.smv
Normal file
@@ -0,0 +1,28 @@
|
||||
MODULE delay(input)
|
||||
-- Model of the delay component
|
||||
VAR
|
||||
x : boolean;
|
||||
ASSIGN
|
||||
init(x) := FALSE;
|
||||
next(x) := input;
|
||||
DEFINE
|
||||
out := x;
|
||||
|
||||
MODULE relay(input)
|
||||
-- Model of the relay
|
||||
DEFINE
|
||||
out := input;
|
||||
|
||||
MODULE inverter(input)
|
||||
-- Model of the inverter
|
||||
DEFINE
|
||||
out := !input;
|
||||
|
||||
|
||||
MODULE main
|
||||
-- Composition of delay and inverter
|
||||
VAR
|
||||
del : delay(inv.out);
|
||||
inv : inverter(del.out);
|
||||
|
||||
INVARSPEC inv.out = !del.out;
|
||||
Reference in New Issue
Block a user