home *** CD-ROM | disk | FTP | other *** search
- .model Counter_8 d_logic_block file=$$counter_8 user=[10n]
- .file $$counter_8
- PORT (DELAY=1e-12) output out[0:31] ;
- EDGE (CLOCK=in[0], DELAY=USER[0]) count ;
- count = count>=255? 0 : count+1 ;
- output=count ;
- .endf
-
- .model Reg_8 d_logic_block file=$$register_8 user=[5n,20n]
- .file $$register_8
- PORT datain in[0:7] ;
- PORT OE in[9] ;
- PORT (DELAY=1e-12) dataout out[0:7] ;
- COMB (WIDTH=8, DELAY=USER[0]) datain_del ;
- EDGE (WIDTH=8, DELAY=USER[1], HOLD=USER[0], CLOCK=in[8]) Register ;
- datain_del = datain ;
- register = datain_del ;
- dataout = register ;
- dataout.en = OE ? ~0 : 0 ;
- .endf
-