[105] | 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. FAIL with the start |
---|
| 19 | AG(((decoder.state[9:0]=0 + decoder.leaf=1) * start = 1) -> |
---|
| 20 | AX(ci=0 -> AX(ci=1 -> AX(ci=0 -> plain[7:0]=69)))); |
---|
| 21 | AF((decoder.state[9:0]=0 + decoder.leaf=1) * start = 1); |
---|
| 22 | #FAIL: in this property, "plain" is strobed one clock cycle too late. |
---|
| 23 | AG(((decoder.state[9:0]=0 + decoder.leaf=1) * start = 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) * start = 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 | |
---|
| 34 | ###################################################################### |
---|
| 35 | # Global properties. |
---|
| 36 | ###################################################################### |
---|
| 37 | |
---|
| 38 | #PASS: The encoder sends an E when the decoder is ready to receive it. |
---|
| 39 | EF((decoder.state[9:0]=0 + decoder.leaf=1) * EX(ci=0 * EX(ci=1 * EX(ci=0)))); |
---|
| 40 | |
---|
| 41 | #PASS: When a new transmission begins, the decoder is ready. |
---|
| 42 | AG(encoder.shiftreg[9:1]=1 -> AX decoder.leaf=1); |
---|
| 43 | |
---|
| 44 | #PASS: Characters are successfully transmitted. (Two equivalent forms.) |
---|
| 45 | AG(decoder.leaf=1 -> plain[7:0]==ch[7:0]); |
---|
| 46 | AG(plain[7:0]=0 + plain[7:0]==ch[7:0]); |
---|