各位大侠谁帮我看看这个程序哪里出错了 谢谢
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;
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |