polozpt发表于 前天 23:06 | 只看该作者
综合时出现了锁存器!!!!
module tr(ina,clk,outb);
input ina,clk;
output outb;
reg outb;
reg [31:0] count;//clk
reg [31:0] count1;//ina
reg q1;
always@(clk)begin
count<=count+1;
if(ina==1)
begin
count1<=count1+1;
q1<=ina;
end
else
begin
outb<=clk;
end
if((count==count1)&&(count1>11))
begin
outb<=q1;
end
else
begin
outb<=clk;
end
end
endmodule