|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我现在用 ep1c20 fbga400 -8 的芯片,jtag and as model下载每问题了,
下面是我的测试程序。
我系统时钟是由外部clk3提供(80M晶振)
经过加数器后,来驱动LED灯亮暗。
时间是12.5s
clk3 是有时钟的。
但led是不动的,不知道什么原因,大虾指教!!
(modelsim 是通过得)。
//`include "timescale.v"
module count(clkin,cout_o);
input clkin;
output cout_o;
reg cout;
assign cout_o=cout;
integer i;
integer j;
//initial i=0;
//initial j=0;
always @(posedge clkin )
begin
if(i ==100)
begin
if(j==100)
begin
i=0;
j=0;
end
else
begin
cout = 1'b1;
j=j+1;
end
end
else
begin
cout = 1'b0;
i = i + 1;
end
end
endmodule
|
|