0
lab7tb()에서 생성 된 50Mhz 클럭을 6 마이크로 초 또는 그 근사치로 변환하려고합니다. 파형 클럭 아웃을 실행하면 빨간색이며 이유를 알 수 없습니다.Verilog Base 2 클럭 분배기
`timescale 1 ns/1 ns //time scale for the test bench
module p2divider(clockin, clockout);
input clockin;
output wire clockout;
parameter n = 9;
reg [n:0] count;
[email protected](posedge clockin)
begin
count <= count + 1;
end
assign clockout = count[n];
endmodule
module lab7tb(); // the test bench module
reg clock_sig;
wire clock_out;
// Instantiate the Unit Under Test (UUT)
p2divider a (clock_sig, clock_out);
integer i;
initial begin
for(i=0; i<100; i=i+1)
begin
clock_sig <=1;
#10;
clock_sig <=0;
#10;
end
end
endmodule