能帮我看下 这个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的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
最新试题
热门考点
- () the student ()(call) his parents?Yes,and they will come soon.
- 鲸从鼻孔喷出来的气形成一股水柱,就像花园里的喷泉一样.这句话采用了什么说明方法?
- 设两个变量x与y之间具有现行相关关系,它们的相关系数是r,y关于x的回归直线的斜率是b,纵截距是a,那么必有
- 我偶然读到一篇英文课文,讲的是蚂蚁.②蚂蚁家族和和睦睦,忙忙碌碌,母蚁生儿,公蚁持家.他们在原野
- 三家分晋指的是什么,哪三家
- 已知直线L1经过点A【2.3】和B【-1 .-3】,直线L2和L1相交点于点C【-2 .m】 ,于y 轴的交点的纵坐标为1.
- 九年级上科学
- 书上说 左导数=右导数=函数值 能推出此点可导.但y=|x|中,左导数=右导数=函数值=0,却在零点不可导
- 斯科特是哪个国家的?有几个队员,写出姓名,身份
- 关于而力平衡和摩擦力