VHDL报错std_logic type does not match integer literal
随风飘扬 学习 2015年12月01日7:07 6154
VHDL报错std_logic type does not match integer literal
library ieee;
虎b泰tpyk克v_d新n闻naxs网nv版权所有,请勿未授权转载!!!
use ieee.std_logic_1164.all;
虎nn泰iwh克qlz新p闻fad_k网rwnq_版权所有,请勿未授权转载!!!
entity f_adder2 is
虎mwv泰_克nor新acz闻fl网gspzb版权所有,请勿未授权转载!!!
port(a,b,c : in std_logic; so,co : out std_logic);
虎lxtg泰fj克de新akqkw闻yf网bykns版权所有,请勿未授权转载!!!
end entity f_adder2;
虎f_泰pe克jp新pbfb闻ygso网fih版权所有,请勿未授权转载!!!
architecture bhv of f_adder2 is
虎qk泰y_克ipsp新moify闻g_rm网e版权所有,请勿未授权转载!!!
signal s : std_logic_vector(2 downto 0);
虎pqx泰uerzm克zujat新vyf闻skxcq网jwkk版权所有,请勿未授权转载!!!
begin s<=c&b&a;
虎eut泰c克sfcpp新erc闻fktg网cxd版权所有,请勿未授权转载!!!
process(c,b,a) begin
虎yzygw泰xnmrv克ww新u闻j网ofq版权所有,请勿未授权转载!!!
case (s) is
虎a泰ibs克oal新fijjx闻wgoiv网yv版权所有,请勿未授权转载!!!
when "000" => so<=0;co<=0;
虎_aub泰zbh克jvmgg新i闻ctvbv网anf版权所有,请勿未授权转载!!!
when "001" => so<=1;co<=0;
虎syljd泰l克rrhjj新hr闻xge网ns版权所有,请勿未授权转载!!!
when "010" => so<=1;co<=0;
虎lbj泰vzfg克st新oxff闻shka网l版权所有,请勿未授权转载!!!
when "011" => so<=0;co<=1;
虎ll泰lynro克kblvf新mrlu闻sct网gqd版权所有,请勿未授权转载!!!
when "100" => so<=1;co<=0;
虎xw泰d_urv克eqc新sb闻bgypw网cgt版权所有,请勿未授权转载!!!
when "101" => so<=0;co<=1;
虎yjp泰wcf克pcgij新b闻_cne网niik版权所有,请勿未授权转载!!!
when "110" => so<=0;co<=1;
虎lfwp泰a克l新nwiwm闻zir网igmnx版权所有,请勿未授权转载!!!
when "111" => so<=1;co<=1;
虎rva泰wymx克pwx新rcxzt闻bo网h版权所有,请勿未授权转载!!!
when others =>NULL;
虎cb泰is克x_mrz新vvk闻qij网vahmx版权所有,请勿未授权转载!!!
end case;
虎kuvbm泰ntk克z_新klxgt闻nl网hg版权所有,请勿未授权转载!!!
end process;
虎cv泰gyupe克jpc新sxkq闻r网yuzh版权所有,请勿未授权转载!!!
end architecture;
虎d泰pwgy克fqa新w闻ce网gkz_版权所有,请勿未授权转载!!!
定义的s是std_logic类型,但你赋值的时候由于没加单引号,被认为是integer类型了,所以应加单引号
虎ia泰w克jga新jd闻a网g版权所有,请勿未授权转载!!!
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