VHDL报错std_logic type does not match integer literal
随风飘扬 学习 2015年12月01日7:07 7364
VHDL报错std_logic type does not match integer literal
library ieee;
虎_hz泰_db克m新m闻g网lf版权所有,请勿未授权转载!!!
use ieee.std_logic_1164.all;
虎e泰fbu克lwyie新j闻tutui网c版权所有,请勿未授权转载!!!
entity f_adder2 is
虎a泰hmrx克qil新wfx闻ah_网zhg版权所有,请勿未授权转载!!!
port(a,b,c : in std_logic; so,co : out std_logic);
虎g泰rgrcl克um新gangj闻yiqp网o版权所有,请勿未授权转载!!!
end entity f_adder2;
虎usi泰cg克uhr新zo闻_ewub网nzw版权所有,请勿未授权转载!!!
architecture bhv of f_adder2 is
虎r泰dm克erubz新cmjqg闻ev网_hoc版权所有,请勿未授权转载!!!
signal s : std_logic_vector(2 downto 0);
虎ch泰sochk克z新ta闻b_nhi网bw版权所有,请勿未授权转载!!!
begin s<=c&b&a;
虎fitao泰pjf克h新hee闻qivb网rx版权所有,请勿未授权转载!!!
process(c,b,a) begin
虎zy泰q克zai_l新ud闻oeg网jpcwe版权所有,请勿未授权转载!!!
case (s) is
虎bmu泰w_gk克ypv_新vjz闻t网_u版权所有,请勿未授权转载!!!
when "000" => so<=0;co<=0;
虎_mkmb泰p_p克yrmdl新icqm闻at网ws版权所有,请勿未授权转载!!!
when "001" => so<=1;co<=0;
虎rqn泰hz克yv__i新i闻rmxuk网im版权所有,请勿未授权转载!!!
when "010" => so<=1;co<=0;
虎ahayn泰gpnb克hm新vikl闻jucq网itbfo版权所有,请勿未授权转载!!!
when "011" => so<=0;co<=1;
虎dc泰qxgs_克z新o闻iqvm网ownv版权所有,请勿未授权转载!!!
when "100" => so<=1;co<=0;
虎rdc泰iv克ek新kgi闻ymdiy网_j版权所有,请勿未授权转载!!!
when "101" => so<=0;co<=1;
虎iecbo泰smbsu克gi新n闻uj_网y版权所有,请勿未授权转载!!!
when "110" => so<=0;co<=1;
虎ladoz泰fshll克mrcuo新sdjd闻b_rtc网rkfux版权所有,请勿未授权转载!!!
when "111" => so<=1;co<=1;
虎klt泰gzhn克eloii新dkh闻wh网isibn版权所有,请勿未授权转载!!!
when others =>NULL;
虎hxjz泰sjs克wbyap新yte闻wcq网vu版权所有,请勿未授权转载!!!
end case;
虎uwntc泰k克rn新rloe闻ml网ydo版权所有,请勿未授权转载!!!
end process;
虎haip泰zikn克wzjl新qysam闻xj网po_am版权所有,请勿未授权转载!!!
end architecture;
虎udym泰myo克wc新pqg闻b_zp网eo版权所有,请勿未授权转载!!!
定义的s是std_logic类型,但你赋值的时候由于没加单引号,被认为是integer类型了,所以应加单引号
虎p_m泰mok克bsqeu新vcp闻krug网tad版权所有,请勿未授权转载!!!
Declaración: los textos que se reproducen en la red, como textos / gráficos, tienen por objeto transmitir más información y facilitar las deliberaciones, y no implican que el sitio y los patrocinadores o patrocinadores compartan sus opiniones o confirmen la autenticidad de su contenido, que sólo es de carácter informativo y que si se violan los derechos de los autores originales, por favor se pongan en contacto con el Administrador del sitio web.
Lista de comentarios
-
Datos no disponibles