Board logo

标题: 求教VHDL的问题 急 在线等!! [打印本页]

作者: kugaa123    时间: 2006-6-7 11:24     标题: 求教VHDL的问题 急 在线等!!

各位大侠谁帮我看看这个程序哪里出错了 谢谢


library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity xuanze is
port(i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12:in bit;
      M,N : OUT bit);
end xuanze;


architecture xuanze_arc of xuanze is


signal cnt:integer;
--signal u:bit_vector(2 downto 0);
signal I:std_logic_vector(8 DOWNTO 0);
signal U:bit_vector(12 downto 1);
--begin


--process(I)
begin
U<=i1&i2&i3&i4&i5&i6&i7&i8&i9&i10&i11&i12;
I<=to_stdlogicvector(U);
cnt<=conv_integer(I);


M<='0'when (cnt>=0 and cnt<=629)or(cnt>=768 and cnt<=944)or(cnt>=1024 and cnt<=1259)or(cnt>=1536 and cnt<=1574)or(cnt>=1792 and cnt<=1889)or(cnt>=2048 and cnt<=2204);
N<='1'when (cnt>=0 and cnt<=629)or(cnt>=768 and cnt<=944)or(cnt>=1024 and cnt<=1259)or(cnt>=1536 and cnt<=1574)or(cnt>=1792 and cnt<=1889)or(cnt>=2048 and cnt<=2204);
--end if;
M<='1'when (cnt>=630 and cnt<=767)or(cnt>=945 and cnt<=1023)or(cnt>=1260 and cnt<=1535 )or(cnt>=1575 and cnt<=1791)or(cnt>=1890 and cnt<=2047);
N<='0'when (cnt>=630 and cnt<=767)or(cnt>=945 and cnt<=1023)or(cnt>=1260 and cnt<=1535 )or(cnt>=1575 and cnt<=1791)or(cnt>=1890 and cnt<=2047);
--end if;
--end process;
end xuanze_arc;


作者: stone133    时间: 2006-6-7 15:01

错误提示呢?
作者: kugaa123    时间: 2006-6-7 21:03

Unsupported feature error:unresolved signal is multiply driven
作者: stone133    时间: 2006-6-8 08:45

when语句的语法不是你写的那个样子吧?后面需要一个else
作者: sailor2046    时间: 2006-6-9 15:00

帅哥,一个输出要做到只有一个源头!
作者: huahuayu    时间: 2006-6-28 23:31

什么冬冬啊?




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