VHDL报错std_logic type does not match integer literal
随风飘扬 学习 2015年12月01日7:07 6433
VHDL报错std_logic type does not match integer literal
library ieee;
虎w泰elfl克c新yky_q闻ixj网o版权所有,请勿未授权转载!!!
use ieee.std_logic_1164.all;
虎s泰xc克gz新lngcl闻bz网izty版权所有,请勿未授权转载!!!
entity f_adder2 is
虎_nv泰g_克r新wsqpg闻m网w版权所有,请勿未授权转载!!!
port(a,b,c : in std_logic; so,co : out std_logic);
虎alzy泰leifc克aekr新bp闻plcnq网rvksw版权所有,请勿未授权转载!!!
end entity f_adder2;
虎pvscj泰o克icyjw新sw闻lfu网rxci版权所有,请勿未授权转载!!!
architecture bhv of f_adder2 is
虎o_泰h克gxvi新_mvj闻y_vk网bg版权所有,请勿未授权转载!!!
signal s : std_logic_vector(2 downto 0);
虎dlqg泰te克hmmh新a闻y网lciym版权所有,请勿未授权转载!!!
begin s<=c&b&a;
虎sz泰snyn克_b新qo闻a网s版权所有,请勿未授权转载!!!
process(c,b,a) begin
虎su泰nox克b新zg闻fkaw网djj版权所有,请勿未授权转载!!!
case (s) is
虎_h泰ynxng克u新kbzpd闻r网uixlt版权所有,请勿未授权转载!!!
when "000" => so<=0;co<=0;
虎d泰k克ct新wd闻w网mwbl版权所有,请勿未授权转载!!!
when "001" => so<=1;co<=0;
虎wgddk泰cg克ks新mz闻_u_nm网u版权所有,请勿未授权转载!!!
when "010" => so<=1;co<=0;
虎byagg泰x克teedg新x闻imdp网uc版权所有,请勿未授权转载!!!
when "011" => so<=0;co<=1;
虎riut泰p克xo新wcndm闻twlq网eyqt版权所有,请勿未授权转载!!!
when "100" => so<=1;co<=0;
虎vctz泰enf克citmo新zpj闻kqdvc网qfvtx版权所有,请勿未授权转载!!!
when "101" => so<=0;co<=1;
虎kiyak泰x克ntjob新kbt闻lnce网msy_版权所有,请勿未授权转载!!!
when "110" => so<=0;co<=1;
虎yjda泰hvv克f新q闻zsug网pvkc版权所有,请勿未授权转载!!!
when "111" => so<=1;co<=1;
虎qurcr泰ot_k克dpdej新xa闻hi网dq版权所有,请勿未授权转载!!!
when others =>NULL;
虎xbf泰mkdw克yc新q闻ggorh网r版权所有,请勿未授权转载!!!
end case;
虎ptnx_泰ra克rrrr新kh闻xuics网o版权所有,请勿未授权转载!!!
end process;
虎ldga泰s克ntbj新w闻mt网v_r版权所有,请勿未授权转载!!!
end architecture;
虎n泰_nyx_克g新fswk闻jpj网bkjp版权所有,请勿未授权转载!!!
定义的s是std_logic类型,但你赋值的时候由于没加单引号,被认为是integer类型了,所以应加单引号
虎aktfs泰tgns克xyyy新b闻_网c版权所有,请勿未授权转载!!!
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