source: caseStudy_Huffmann/huffmann/huff_TMR/huff.ctl @ 105

Last change on this file since 105 was 105, checked in by cecile, 12 years ago

Hufmann case study

File size: 1.8 KB
Line 
1######################################################################
2# Properties of the decoder.
3######################################################################
4
5#PASS: The all-zero state is never re-entered.
6AX AG !decoder.state[9:0]=0;
7
8#PASS: The output is never 255.
9AG !plain[7:0]=255;
10
11#PASS: No two consecutive states have plain != 0.
12AG(plain[7:0]=0 + AX plain[7:0]=0);
13
14#PASS: It is always possible to output a Z and a 0.
15AG EF plain[7:0]=90;
16AG EF plain[7:0]=0;
17
18#PASS: String 010 is decoded as E.
19AG((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.
23AG((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.
27AG((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.
37AG !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.
45EF((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.
48AG(encoder.shiftreg[9:1]=1 -> AX decoder.leaf=1);
49
50#PASS: Characters are successfully transmitted.  (Two equivalent forms.)
51AG(decoder.leaf=1 -> plain[7:0]==ch[7:0]);
52AG(plain[7:0]=0 + plain[7:0]==ch[7:0]);
Note: See TracBrowser for help on using the repository browser.