module top;
wire x1;
system_clock #50 clock1(x1);
inverter f1(y1,x1);
endmodule module inverter(y1,x1);
input x1;
output y1;
not(y1,x1);
specify
specparam
Tpd_0_1=2:2:2;
(x1=>y1)=(Tpd_0_1,Tpd_0_1);
endspecify
endmodule
module system_clock(clk);
parameter PERIOD=100;
output clk;
reg clk;
initial
clk=0;
always
begin
#(PERIOD/10)clk=~clk;
#(PERIOD-PERIOD/10)clk=~clk;
end
always@(posedge clk)if($time>1000)#(PERIOD-1)$stop;
endmodule
沒有留言:
張貼留言