File: clock.v

package info (click to toggle)
tkgate 2.1%2Brepack-7
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 28,808 kB
  • sloc: ansic: 62,300; tcl: 20,345; xml: 2,731; yacc: 1,177; lex: 839; sh: 701; makefile: 187; perl: 39
file content (23 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module clock (Z);
   output Z;
   reg 	  Z = ${invZ} 1'b${INITIAL};

   initial #${PHASE}
     if (${INITIAL} == 0)
       forever
	 begin
	    Z = ${invZ} 1'b1;
	    #${ON_TIME};
	    Z = ${invZ} 1'b0;
	    #${OFF_TIME};
	 end
     else
       forever
	 begin
	    Z = ${invZ} 1'b0;
	    #${OFF_TIME};
	    Z = ${invZ} 1'b1;
	    #${ON_TIME};
	 end
   
endmodule // clock