作者Darrens (小胖子)
看板Electronics
標題Re: [請益] verilog如何在一個always判斷觸發源?
時間Wed Nov 4 22:49:36 2009
謝謝各位的回答
我是使用Quartus II還有Max plus II兩個軟體來模擬
程式如下
module counter(CLK, reset, count);
input CLK, reset;
output [6:0] count;
reg [6:0] count;
always@(reset or CLK)
begin
if(reset==1)
begin
count=0;
end
else if(CLK==0)
begin
count=count+1;
end
end
endmodule
但跑出來count的值卻不正確
不會像一般那樣,一直加1
我有用另一套軟體模擬卻是正確的
但我程式最後還是要燒到fpga裡
卻連maxplus2的模擬都過不了
想請問一下
這到底是什麼問題啊??
我實在是找不到問題所在= =
有沒有人可以好心幫幫我…
非常感謝~~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.137.64.183
1F:→ colinshih: level/edge 傻傻分不清, 請畫電路, beginner 11/05 05:29