能帮我看下 这个Type integer does not match with a string literal是怎么回事么、谢谢啦
题目
能帮我看下 这个Type integer does not match with a string literal是怎么回事么、谢谢啦
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--USE ieee.numeric_std.ALL;
ENTITY vv IS
END vv;
ARCHITECTURE behavior OF vv IS
-- Component Declaration for the Unit Under Test (UUT)
COMPONENT comp
PORT(
a :IN integer range 0 to 7;
b :IN integer range 0 to 7;
sel :IN std_logic;
x1 :OUT std_logic;
x2 :OUT std_logic;
x3 :OUT std_logic
);
END COMPONENT;
--Inputs
signal a :integer range 0 to 7 :="00000010" ;
signal b :integer range 0 to 7 := "00000100";
signal sel :std_logic := '0';
\x05--Outputs
signal x1 :std_logic;
signal x2 :std_logic;
signal x3 :std_logic;
-- No clocks detected in port list.Replace below with
-- appropriate port name
BEGIN
\x05-- Instantiate the Unit Under Test (UUT)
uut:comp PORT MAP (
a => a,
b => b,
sel => sel,
x1 => x1,
x2 => x2,
x3 => x3
);
END;
答案
signal a :integer range 0 to 7 :="00000010" ;signal b :integer range 0 to 7 := "00000100";上面两句有问题,既然a和b的类型是整型的子类型 integer range 0 to 7,其初值就只能是0~7当中的某个数,例如2或者4等等...
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
最新试题
- 淮河支流南北分布很不对程,北岸的支流主要有七条,南岸的支流主要有三条,这三条支流的名字是?
- museeum,shall,I,to,tomorrow,go.连词成句
- 若抛物线Y平方=4X是上一点M(m,n)到直线X=Y到距离为4倍根号2,求m除以n的值.
- 求海量的二元一次方程组 要纯解二元一次方程组的
- 有一个整数,它除210余56,它除518也余56,它除672还余56,这个数是多少?
- Linda,can you spell________name,piease
- a sports meeting( ) in our school last week?括号填 held?
- 用简易方程解下列应用题
- 鼠妇为什么又叫西瓜虫,种了西瓜土壤里有很多鼠妇,
- 没有能力去做好某事是什么词语
热门考点