虎泰克博客

VHDL报错std_logic type does not match integer literal


VHDL报错std_logic type does not match integer literal

library ieee;

虎ext泰xqg_克ttrw新y闻an网gwkbn版权所有,请勿未授权转载!!!

use ieee.std_logic_1164.all;

虎cwv泰hbvp克wqy新cmi闻jy网k版权所有,请勿未授权转载!!!

entity f_adder2 is

虎ymz泰bx克fbjh新nul闻g网ipulo版权所有,请勿未授权转载!!!

port(a,b,c : in std_logic; so,co : out std_logic);

虎ap_o泰ydj克ajehy新nju闻cdxm网alicd版权所有,请勿未授权转载!!!

end entity f_adder2;

虎t泰v克a新pi闻nygw网z版权所有,请勿未授权转载!!!

architecture bhv of f_adder2 is

虎cqod泰v克epx新meqlp闻fkcsn网yqdck版权所有,请勿未授权转载!!!

signal s : std_logic_vector(2 downto 0);

虎ksikj泰c克oht新z闻rp网zf_w版权所有,请勿未授权转载!!!

begin s<=c&b&a;

虎dodol泰yv克km新hptk闻pvnfj网kcj版权所有,请勿未授权转载!!!

process(c,b,a) begin

虎euui泰qo克tsmc新ltqzi闻d网_fm版权所有,请勿未授权转载!!!

case (s) is

虎y泰bmxh克_weq新fcckk闻komd网yhq版权所有,请勿未授权转载!!!

when "000" => so<=0;co<=0;

虎cxh泰uz克nreq新xl闻wverm网ktdnd版权所有,请勿未授权转载!!!

when "001" => so<=1;co<=0;

虎jw泰amt克ehb新u闻e网wpwq版权所有,请勿未授权转载!!!

when "010" => so<=1;co<=0;

虎ldpow泰nwatn克z新jwxjb闻ol网__hac版权所有,请勿未授权转载!!!

when "011" => so<=0;co<=1;

虎lqa泰hyyx克on新wui闻t_y网uex版权所有,请勿未授权转载!!!

when "100" => so<=1;co<=0;

虎vl泰mqqv克oqiif新bak闻bvn网ifjq版权所有,请勿未授权转载!!!

when "101" => so<=0;co<=1;

虎j泰x克_新waj闻omj_网l版权所有,请勿未授权转载!!!

when "110" => so<=0;co<=1;

虎gc泰m克hp新fcls闻u网swml版权所有,请勿未授权转载!!!

when "111" => so<=1;co<=1;

虎aou泰rhhdi克lz新dio闻cjvq网qhq版权所有,请勿未授权转载!!!

when others =>NULL;

虎bla泰bf克bf新qtwcm闻h网faemn版权所有,请勿未授权转载!!!

end case;

虎pb泰rivo克_c_x新rjo闻nuhu网cwpu_版权所有,请勿未授权转载!!!

end process;

虎et泰dlzn克v新mku闻f网nd版权所有,请勿未授权转载!!!

end architecture;

虎w泰wyy克ffz新_uf闻akrgb网n版权所有,请勿未授权转载!!!

定义的s是std_logic类型,但你赋值的时候由于没加单引号,被认为是integer类型了,所以应加单引号

虎zyep泰or克yq新ecnc闻nfcus网zcvs版权所有,请勿未授权转载!!!




Déclaration: le fait que des articles tels que les textes et les graphiques reproduits sur le site Web ne signifie pas que la station et les organisateurs partagent leur point de vue ou confirment l 'authenticité de leur contenu ne signifie pas qu' ils ont pour objet de communiquer des informations supplémentaires et de faciliter la discussion.

Se connecter pour commenter

Liste des commentaires

    Données non disponibles