VHDL报错std_logic type does not match integer literal
随风飘扬 学习 2015年12月01日7:07 3871
VHDL报错std_logic type does not match integer literal
library ieee;
虎dhl泰denhe克biwmd新xqm闻a网sawc版权所有,请勿未授权转载!!!
use ieee.std_logic_1164.all;
虎afxg泰ksa克gyx新kpvs闻zqr网acxy版权所有,请勿未授权转载!!!
entity f_adder2 is
虎xabwz泰x克zxh新uqjtw闻uogns网bpvq版权所有,请勿未授权转载!!!
port(a,b,c : in std_logic; so,co : out std_logic);
虎q泰_cgo克lyofc新fe闻ysgmv网d版权所有,请勿未授权转载!!!
end entity f_adder2;
虎zan泰huyt克i新fpfdx闻wniuk网_tlh版权所有,请勿未授权转载!!!
architecture bhv of f_adder2 is
虎tixlj泰xzln克oer新ont闻t网_版权所有,请勿未授权转载!!!
signal s : std_logic_vector(2 downto 0);
虎ix泰bn克qzjs新jr闻jvaev网rvu版权所有,请勿未授权转载!!!
begin s<=c&b&a;
虎k泰ulj克oej新qslal闻foo网hetrw版权所有,请勿未授权转载!!!
process(c,b,a) begin
虎c_i泰tw克nufau新bhoin闻oqrod网fgf版权所有,请勿未授权转载!!!
case (s) is
虎zqn泰yrv_克uyqy新fkb闻f_z网_xsg版权所有,请勿未授权转载!!!
when "000" => so<=0;co<=0;
虎xc泰zee克_jdp新hex闻pahk网ll版权所有,请勿未授权转载!!!
when "001" => so<=1;co<=0;
虎pc泰ys克kgpho新qqhgo闻otei网__zzf版权所有,请勿未授权转载!!!
when "010" => so<=1;co<=0;
虎hgs泰avavo克mqp新bqg_e闻i网gyzbx版权所有,请勿未授权转载!!!
when "011" => so<=0;co<=1;
虎ku泰me克q新jwoyr闻k网alhc版权所有,请勿未授权转载!!!
when "100" => so<=1;co<=0;
虎brlr泰epyr克ann新vtvgm闻yhkh网n版权所有,请勿未授权转载!!!
when "101" => so<=0;co<=1;
虎nbyzu泰jl克axeu新ejp闻nbcdu网prbrm版权所有,请勿未授权转载!!!
when "110" => so<=0;co<=1;
虎m泰op克_zsy新sd闻zdoam网iwuox版权所有,请勿未授权转载!!!
when "111" => so<=1;co<=1;
虎wx泰dnl_c克nfw新mqbq闻bkxyf网kw版权所有,请勿未授权转载!!!
when others =>NULL;
虎ol泰xavf克aq新atnty闻iwr网gh版权所有,请勿未授权转载!!!
end case;
虎fbkdp泰a_gqw克_v新srmdy闻pstx网mg版权所有,请勿未授权转载!!!
end process;
虎qv泰oo克t新c闻xf网fnisj版权所有,请勿未授权转载!!!
end architecture;
虎f_泰ynv克lsah新_grbe闻bs_t网dv版权所有,请勿未授权转载!!!
定义的s是std_logic类型,但你赋值的时候由于没加单引号,被认为是integer类型了,所以应加单引号
虎au泰irci克kwrw新af闻z网hha版权所有,请勿未授权转载!!!
Statement: all articles / drawings reproduced on this website are for the purpose of transmitting more information and facilitating discussion, which does not mean that the website, the host and the organizer agree with their opinions or confirm the authenticity of their contents. The contents of the articles are for reference only. If the rights of the original author are violated, please contact the website administrator.
Comment list
-
No data