报错信息:Multiple non-tristate drivers for net count_int(7) in aa4
Multiple non-tristate drivers for net count_int(6) in aa4
................
八个输出端都不对
--8位UP/DOWN计数器
LIBRARY ieee;
USE ieee.Std_logic_1164.ALL;
USE ieee.Std_logic_unsigned.ALL;
ENTITY aa4 IS
GENERIC(n : Positive := 8);
PORT(s1,s2,en,reset: IN Std_logic;
count : OUT Std_logic_vector((n-1) DOWNTO 0));
END aa4;
ARCHITECTURE v1 OF aa4 IS
SIGNAL count_int : Std_logic_vector((n-1) DOWNTO 0);
-- count_int <= (OTHERS => '0');
BEGIN
count_int <= (OTHERS => '0');
PROCESS
BEGIN
wait until (en='1'); --使能
if (reset='1') then
count_int <= (OTHERS => '0'); --清零
elsif(s1'EVENT AND s1 = '1' and s2='1') then
count_int<=count_int+1; --s1上升沿且s2为高时加记数
elsif(s1'EVENT AND s1 = '0' and s2='1') then
count_int<=count_int-1; --s1下降沿且s2为高时减记数
ELSE
NULL;
END IF;
END PROCESS;
count <= count_int;
END v1;
PROCESS后面没有敏感信号表?
另:WAIT在max+plusII中不被支持,无法使用
[此贴子已经被stone133于2006-4-14 13:39:14编辑过]
process的敏感信号表和wait until不能同时使用,建议不要使用wait,因为很多软件不支持它;
处理方法:
1.去掉wait,用if代替这个判断
2.process的敏感信号表加入敏感信号
3.不要用双沿处理,这样直接用会出问题
[此贴子已经被stone133于2006-4-14 15:35:02编辑过]
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |