home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 180 / dpcs0203b.iso / editorial / easypc / Easy-Spice / data1.cab / Examples / Digital_Devices / state_updown.spi < prev    next >
Encoding:
Text File  |  2002-07-08  |  1.2 KB  |  31 lines

  1. .model state d_state state_file = state_updown.txt reset_state=0
  2.  
  3. .file state_updown.txt
  4. * This is a simple example of a state machine state file
  5. * It is a 2 bit up down counter with synchronous reset
  6.  
  7. *Present    Outputs     Inputs              State destination
  8. *State      for state   (reset, up/down)
  9.  
  10. 0           0S  0S      0       0           ->  3
  11.                         0       1           ->  1
  12.                         1       0           ->  0
  13.                         1       1           ->  0
  14.  
  15. 1           0S  1S      0       0           ->  0
  16.                         0       1           ->  2
  17.                         1       0           ->  0
  18.                         1       1           ->  0
  19.  
  20. 2           1S  0S      0       0           ->  1
  21.                         0       1           ->  3
  22.                         1       0           ->  0
  23.                         1       1           ->  0
  24.                                     
  25. 3           1S  1S      0       0           ->  2
  26.                         0       1           ->  0
  27.                         1       0           ->  0
  28.                         1       1           ->  0
  29.  
  30. .endf
  31.