module top;
wire A, SEL, C, D, E ,F ,G;
system_clock #300 clock1(A);
system_clock #150 clock2(SEL);
system_clock #100 clock3(C);
not a0(D,SEL);
and a1(E, A, SEL);
and a2(F, C, D);
or a3(G ,E , F);
endmodule and a1(E, A, SEL);
and a2(F, C, D);
or a3(G ,E , F);
module system_clock(clk);
parameter PERIOD=100;
output clk;
reg clk;
parameter PERIOD=100;
output clk;
reg clk;
initial clk=0;
always
begin
#(PERIOD/2) clk=~clk;
end
always@(posedge clk)begin
#(PERIOD/2) clk=~clk;
end
if($time>1000)$stop;
endmodule

没有评论:
发表评论