题目
能帮我看下 这个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;
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;
提问时间:2021-03-06
答案
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的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
- 1Make any other necessary changes 不是说any other后跟单数名词吗?为什么这个.!?
- 2the footbaii under the table is___(he)怎么填
- 3请教英语单词earthquake发音口语问题
- 41】.5√1/5+3/2√20-15/4√1/5 2】.√12+6√3/2-【√(3-9/4)-√24】 3】.4√1/2÷(-√6)×1/3√12
- 5怎么教好孩子10以内的加减法
- 6词语金字塔 成语的4字到8字 12月15日18点半交 急
- 7异分母分式加减后,分母能算出来吗
- 8Get ready for翻译成“准备”可否
- 9在数轴上,老师不小心把一滴墨水滴在画好的数轴上,如图所示,试根据图中标出的数值判断被墨水盖住的整数,并把它写出来.
- 10设A,B,A+B,A-1+B-1均为n阶可逆矩阵,则(A-1+B-1)-1等于( ) A.A-1+B-1 B.A+B C.A(A+B)-1B D.(A+B)-1
热门考点
- 1Please keep quite in the library,_____ ______?
- 2people to come find to many cities work 怎么连词成句?
- 3英语翻译
- 4你心目中未来的海洋是什么样子的结合课文内容搜集相关资料写一篇短文
- 5甲、乙两粮仓大米的质量的比是5:3,如果从甲仓库运出90吨放进乙库,则此时甲、乙两库大米质量的比是2:3,求现在甲、乙两库各有大米多少吨?
- 6水晶是分子晶体还是原子晶体、
- 7水果店进了某种水果1t,进价是7元/kg.售价定为10元/kg,销售一半以后,为了尽快售完,准备打折出售.如果要使总利润不低于2000元,那么余下的水果可以按原定价的几折出售?
- 8如图所示为某校校园艺术节时气球悬挂一幅竖标的情景.已知气球的体积为8m3,气球(含内部所充气体)、标语及细绳的总质量为9kg,空气的密度为1.29kg/m3.g取10N/kg,则系于地面拉住标语的细
- 9将卡片上的数字任选4个,用加,减,乘,除法计算,算出24.你能列出几种?3.2.6.9.8.5.7
- 10有什么快速牢记英语单词的方法么(明天就要默写)