|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
用ISE布线,出现一个warning:
WARNING:NgdBuild:477 - clock net 'rst_ibuf_iso' has non-clock connections
我的程序在功能仿真可以,但是后仿真的时候就和功能仿真不一样了:(
用的是xcv300-bg352-6,程序如下:是一个任意分频的可控分频器。
记得以前告诉过我这个程序会把rst综合成时钟,现在是不是这个问题呀?
module freqdiv(clock,rst,num,divout);
input clock,rst;
input [0:7]num;
output divout;
reg [0:7]count_p,count_n,half,all;
reg freq_p,freq_n;
assign divout=freq_p&freq_n;
always@(negedge rst)
begin
all=num;
half=all>>1;
end
always
@(posedge clock)
begin
if (rst)
begin
count_p=8'b00000000;
end
else
begin
if(count_p==num-1)
begin
count_p=8'b00000000;
freq_p=(count_p<=half)?1:0;
end
else
begin
count_p=count_p+1;
freq_p=(count_p<=half)?1:0;
end
end
end
always
@(negedge clock)
begin
if (rst)
begin
count_n=8'b00000000;
end
else
begin
if(count_n==num-1)
begin
count_n=8'b00000000;
freq_n=(count_n<=half)?1:0;
end
else
begin
count_n=count_n+1;
freq_n=(count_n<=half)?1:0;
end
end
end
endmodule |
|