home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 180 / dpcs0203b.iso / editorial / easypc / Easy-Spice / data1.cab / Examples / Generic_Dig / counter.spi < prev    next >
Encoding:
Text File  |  2002-07-08  |  491 b   |  17 lines

  1. .model Counter_4_Reset d_logic_block file=$$counter_4_Reset user=[10n]
  2. .file $$counter_4_Reset 
  3. PORT (DELAY=1e-12) output out[0:31] ; 
  4. EDGE (CLOCK=in[0], DELAY=USER[0]) count ; 
  5. count := in[1] ? 0 ; 
  6. count = count>=15? 0 : count+1 ; 
  7. output=count ; 
  8. .endf 
  9.  
  10. .model Counter_4 d_logic_block file=$$counter_4 user=[10n]
  11. .file $$counter_4 
  12. PORT (DELAY=1e-12) output out[0:31] ; 
  13. EDGE (CLOCK=in[0], DELAY=USER[0]) count ; 
  14. count = count>=15? 0 : count+1 ; 
  15. output=count ; 
  16. .endf 
  17.