always @(pulse_in)
begin
if(pulse_in==0) pulse_out=0;
if(pulse_in==1)
begin
now_main <= now_main+1;
pulse_out<=1;
end
end
always @(pulse_in)
begin
if(pulse_in==0) pulse_out=0;
if(pulse_in==1)
begin
now_main <= now_main+1;
if(now_main>(now_sec*2))
begin
pulse_out<=1;
now_sec<= now_sec+1;
end
end
end
第一个运行正常
第二个写法就运行的不对
这是咋回事呀 ? |