File: autosense_aas_ifdef.v

package info (click to toggle)
verilog-mode 20161124.fd230e6-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 3,764 kB
  • ctags: 5,143
  • sloc: lisp: 12,430; perl: 293; makefile: 146; sh: 35; fortran: 2
file content (54 lines) | stat: -rw-r--r-- 1,362 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module dummy;
   
   parameter [TSTBITS-1:0] // synopsys enum tstate_info
     TIDLE  = 3'b000,
     TCN1   = 3'b001,
     TCN2   = TCN1+1, // must be numbered consecutively
     TCN3   = TCN2+1,
     TCN4   = TCN3+1,
     TCN5   = TCN4+1,
     IOCLR  = TCN5+1,
     TUNU1  = 3'b111;
   
   // state and output logic
   always @ (`ifdef SIMFSM
             ireset or
`endif
             /*AUTOSENSE*/fooc2_qual or foocr_we or ioclrinst or tstate) begin
      ioclrtmout  = 1'b0;
      case (tstate)
        TIDLE: begin
           if (foocr_we)
             ntstate  = TCN1;
           else
             ntstate  = TIDLE;
        end
        TCN1,TCN2,TCN3,TCN4,TCN5: begin
           if (ioclrinst | fooc2_qual)
             ntstate  = TIDLE;
           else
             ntstate  = tstate + 1;
        end
        IOCLR: begin
           ntstate     = TIDLE;
           ioclrtmout  = 1'b1;
        end
        TUNU1: begin
           ntstate  = TIDLE;
`ifdef SIMFSM
           if (~ireset)
             $display("ERROR: entered unused state at %t",$time);
`endif
        end
        default: begin
           ntstate     = 'bx;
           ioclrtmout  = 1'bx;
`ifdef SIMFSM
           if (~ireset)
             $display("ERROR: entered unknown state at %t",$time);
`endif
        end
      endcase // case(tstate)
   end // always @ (...
   
endmodule // dummy