能幫我看下 這個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;
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;
其他人氣:808 ℃時間:2020-07-03 12:47:34
優(yōu)質(zhì)解答
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當(dāng)中的某個數(shù),例如2或者4等等...
我來回答
類似推薦
- does not match with the checksum in data
- ______the boys enjoy______the football match?A.Do,match,does B.Does,watching,does C.Do,watching,do
- 求解一道很簡單的一元二次方程
- 散步 的閱讀答案
- 若函數(shù)f(x)=log a(2-x)在(1,2)上的值恒為負(fù)數(shù),則a的取值范圍是?
- Betty would buy a coat online_buy it in a shop.
- 小學(xué)六年級 數(shù)學(xué) 簡便運(yùn)算 請詳細(xì)解答,謝謝!(2 16:44:0)
- 下面大家和我一起用英語怎么寫
- 像哭笑不得這樣的詞有哪些
- 光明小學(xué)六1班有學(xué)生48人,其中女生比男生的5分之3多8人,六1班男、女生各多少人?
- 我們是屬鼠班讀后感
- 修路隊修一段路,第一天修了全長的42%,第二天比第一天少修80米,這時還剩下400米還沒修.這條路全長多少?
猜你喜歡
- 1籠子里有免子和雞.共有108條腿,算免子多少?雞多少?
- 2零度經(jīng)線和緯線如何確定?
- 3若知B(-4.0)C(4.0)是三角形AB的兩個端點,三角形ABC周長18.求頂點.A的軌跡方程
- 4《齊王筑城》全文的翻譯,急
- 5Commission Decision官方翻譯是個什么組織
- 6I am poor in english.I can hardly make myself understood. 這個understood為啥不用原型?
- 730噸比[]噸少二分之一噸
- 8王先生月收入2500元,如果按國家規(guī)定超過1600圓的部分按5%要上交個人所得稅,王先生每個月的實際收入是多
- 9一個長方形周長68米,長比寬的3倍少2米,長和寬各是多少?
- 1016乘(16乘8分之7)=幾要過程
- 11幽的筆順
- 12文帝之后六年..文言文中周亞夫是一個什么樣的人