6、nt1<=1'b0; clkA <=1'b0; end else if(count1<(N-1)) begin count1<=count1+1'b1; if(count1==(N-1)/2) begin clkA<=~clkA; end end else begin
7、 clkA<=~clkA; count1<=1'b0; end always@(posedgeclk_re) if(!rst) begin count2<=1'b0; clkB <=1'b0; end else if(count2<(N-1)) begin count2<=count2+1'b1; if(count2==(N-1)/2) begin
8、 clkB<=~clkB; end end else begin clkB<=~clkB; count2<=1'b0; end endmodule