Board logo

标题: ISE 7.1i 模擬counter有錯誤 [打印本页]

作者: johny862    时间: 2006-1-13 17:39     标题: ISE 7.1i 模擬counter有錯誤

Dear all:


我在ISE下模擬counter 開一個test bench waveform file


當我按下 behavior simulate model後


卻出現 警告 "warning:there is an 'U'|'x'|'W'|'Z'|'-' is an arithmetic operand, the result will be 'X'(es).


source code:


library ieee;


use ieee.std_logic_1164.all;


use ieee.std_logic_arith.all;


use ieee.std_logic_unsigned.all;


entiey counter is


port( clk:in std_logic;


qut std_logic_vector(3 downto 0) );


end counter;


architecture a of counter is


signal qn:std_logic_vector(3 downto 0);


begin


process(clk)


begin


if(clk'event and clk='1') then


  qn<qn+1;


end if;


q<=qn;


end a;


WHY???


 


 


 


 


 


 


 


 


 


 


作者: brave_d    时间: 2006-1-16 20:07

qn 这句不对吧
作者: johny862    时间: 2006-1-18 16:32

我找到錯誤了 qn要作初始值設定




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0