【发布时间】:2018-12-07 16:57:27
【问题描述】:
我在 verilog (xilix 14.2) 中编写了一个简单的计数器代码。该代码在 isim 中正常工作,但我无法将其转储到 spartan6 上。当我尝试转储代码时,spartan 6 上的红灯亮起,并且代码未转储。请让我知道我需要做的改变。
module clk(int_clk,ext_pulse,reset,pos_count,neg_count);
input int_clk;
input ext_pulse;
input reset;
output reg [7:0] pos_count;
output reg [7:0] neg_count;
reg [7:0] count;
always@(posedge int_clk)
if(reset)
begin
pos_count<=0;
neg_count<=0;
end
else if(ext_pulse)
begin
neg_count<=neg_count+1;
pos_count<=0;
end
else
begin
pos_count<=pos_count+1;
neg_count<=0;
end
endmodule
【问题讨论】:
标签: verilog fpga xilinx-ise spartan