VHDL报错std_logic type does not match integer literal
随风飘扬 学习 2015年12月01日7:07 3866
VHDL报错std_logic type does not match integer literal
library ieee;
虎vqgve泰ooypa克vzbt新qgl闻sn网uzwa版权所有,请勿未授权转载!!!
use ieee.std_logic_1164.all;
虎lg泰xvxx克simsw新vdlc闻ky网h_p版权所有,请勿未授权转载!!!
entity f_adder2 is
虎xb泰hlamj克tw新iu闻gbpoj网t版权所有,请勿未授权转载!!!
port(a,b,c : in std_logic; so,co : out std_logic);
虎gs泰az克pej新gbkq闻drjf网o版权所有,请勿未授权转载!!!
end entity f_adder2;
虎dqq泰yonhh克vx新h_xa闻eln网onf版权所有,请勿未授权转载!!!
architecture bhv of f_adder2 is
虎tt泰civy克gfvv新h_c闻slpyj网mpp版权所有,请勿未授权转载!!!
signal s : std_logic_vector(2 downto 0);
虎vajk泰zopfw克z新if闻amrje网uzpes版权所有,请勿未授权转载!!!
begin s<=c&b&a;
虎lftkg泰v克lhado新qbqqx闻ihk网r版权所有,请勿未授权转载!!!
process(c,b,a) begin
虎ajf泰q克id新f闻vs网sjz版权所有,请勿未授权转载!!!
case (s) is
虎z泰ci克_ky新bo_闻jnh网yv版权所有,请勿未授权转载!!!
when "000" => so<=0;co<=0;
虎p泰o克kj新hq闻wd网tdtx版权所有,请勿未授权转载!!!
when "001" => so<=1;co<=0;
虎vtr泰ircis克hnwgr新s闻boxv网c版权所有,请勿未授权转载!!!
when "010" => so<=1;co<=0;
虎p泰wlenb克zqmt新gl闻gt网__版权所有,请勿未授权转载!!!
when "011" => so<=0;co<=1;
虎kajf泰ian克za新ps闻fbmb网_ah版权所有,请勿未授权转载!!!
when "100" => so<=1;co<=0;
虎anp泰cwsci克a新gps闻nmk网j版权所有,请勿未授权转载!!!
when "101" => so<=0;co<=1;
虎jr泰pnzs克j新mn_s闻_网eatb版权所有,请勿未授权转载!!!
when "110" => so<=0;co<=1;
虎b泰gepox克_j_新s闻aiodu网snit版权所有,请勿未授权转载!!!
when "111" => so<=1;co<=1;
虎sq泰mfdc克pqvi新_闻cdwpw网ckvy版权所有,请勿未授权转载!!!
when others =>NULL;
虎esygs泰o克suscs新v闻okj网mygx版权所有,请勿未授权转载!!!
end case;
虎a_spj泰_克azl新ri闻spqh网c版权所有,请勿未授权转载!!!
end process;
虎wz泰jllqc克r新x闻dyf网ft版权所有,请勿未授权转载!!!
end architecture;
虎ka泰earj克vva新uz闻m网hmfbc版权所有,请勿未授权转载!!!
定义的s是std_logic类型,但你赋值的时候由于没加单引号,被认为是integer类型了,所以应加单引号
虎gyu泰csby克yw新gu闻zw网xb版权所有,请勿未授权转载!!!
ถ้าคุณมีข้อมูลอื่นๆใดๆเกี่ยวกับเรื่องนี้กรุณาเพิ่มฟรี
แสดงความคิดเห็น
-
ไม่มีข้อมูล