1 | ###################################################################### |
---|
2 | # Properties of the decoder. |
---|
3 | ###################################################################### |
---|
4 | |
---|
5 | #PASS: The all-zero state is never re-entered. |
---|
6 | AX AG !decoder.state[9:0]=0; |
---|
7 | |
---|
8 | #PASS: The output is never 255. |
---|
9 | AG !plain[7:0]=255; |
---|
10 | |
---|
11 | #PASS: No two consecutive states have plain != 0. |
---|
12 | AG(plain[7:0]=0 + AX plain[7:0]=0); |
---|
13 | |
---|
14 | #PASS: It is always possible to output a Z and a 0. |
---|
15 | AG EF plain[7:0]=90; |
---|
16 | AG EF plain[7:0]=0; |
---|
17 | |
---|
18 | #PASS: String 010 is decoded as E. |
---|
19 | AG((decoder.state[9:0]=0 + decoder.leaf=1) -> |
---|
20 | AX(ci=0 -> AX(ci=1 -> AX(ci=0 -> plain[7:0]=69)))); |
---|
21 | |
---|
22 | #FAIL: in this property, "plain" is strobed one clock cycle too late. |
---|
23 | AG((decoder.state[9:0]=0 + decoder.leaf=1) -> |
---|
24 | AX(ci=0 -> AX(ci=1 -> AX(ci=0 -> AX plain[7:0]=69)))); |
---|
25 | |
---|
26 | #PASS: String 00000 is decoded as U. |
---|
27 | AG((decoder.state[9:0]=0 + decoder.leaf=1) -> |
---|
28 | AX(ci=0 -> AX(ci=0 -> AX(ci=0 -> AX(ci=0 -> AX(ci=0 -> |
---|
29 | plain[7:0]=85)))))); |
---|
30 | |
---|
31 | |
---|
32 | ###################################################################### |
---|
33 | # Properties of the encoder. |
---|
34 | ###################################################################### |
---|
35 | |
---|
36 | #PASS: The encoder shift register is never 0. |
---|
37 | AG !encoder.shiftreg[9:0]=0; |
---|
38 | |
---|
39 | |
---|
40 | ###################################################################### |
---|
41 | # Global properties. |
---|
42 | ###################################################################### |
---|
43 | |
---|
44 | #PASS: The encoder sends an E when the decoder is ready to receive it. |
---|
45 | EF((decoder.state[9:0]=0 + decoder.leaf=1) * EX(ci=0 * EX(ci=1 * EX(ci=0)))); |
---|
46 | |
---|
47 | #PASS: When a new transmission begins, the decoder is ready. |
---|
48 | AG(encoder.shiftreg[9:1]=1 -> AX decoder.leaf=1); |
---|
49 | |
---|
50 | #PASS: Characters are successfully transmitted. (Two equivalent forms.) |
---|
51 | AG(decoder.leaf=1 -> plain[7:0]==ch[7:0]); |
---|
52 | AG(plain[7:0]=0 + plain[7:0]==ch[7:0]); |
---|