VHDL报错std_logic type does not match integer literal
随风飘扬 学习 2015年12月01日7:07 6794
VHDL报错std_logic type does not match integer literal
library ieee;
虎mqsfx泰lcif克cmc新dy闻oma网dxxlu版权所有,请勿未授权转载!!!
use ieee.std_logic_1164.all;
虎xdf泰p克bv_v新ztey闻f网dq版权所有,请勿未授权转载!!!
entity f_adder2 is
虎ksy泰fao克uojmv新mf闻w网bh版权所有,请勿未授权转载!!!
port(a,b,c : in std_logic; so,co : out std_logic);
虎lpifs泰qt克lki新oh闻x网prxe版权所有,请勿未授权转载!!!
end entity f_adder2;
虎cfl泰yc克cd_qy新t闻ou网fse版权所有,请勿未授权转载!!!
architecture bhv of f_adder2 is
虎esqw泰guoo克jnd新nzd闻xnyfl网zpjky版权所有,请勿未授权转载!!!
signal s : std_logic_vector(2 downto 0);
虎ntv泰yo克her新h闻f网yvv版权所有,请勿未授权转载!!!
begin s<=c&b&a;
虎zzg泰kfj克zmdj新_闻dsgq网fi版权所有,请勿未授权转载!!!
process(c,b,a) begin
虎k_泰navbm克xpc新ln闻lwbts网tsf版权所有,请勿未授权转载!!!
case (s) is
虎plx泰flvcm克cwiv新kmb闻mm网lzc版权所有,请勿未授权转载!!!
when "000" => so<=0;co<=0;
虎hkni泰ivn克gjm新mfar闻daa网marh版权所有,请勿未授权转载!!!
when "001" => so<=1;co<=0;
虎_泰travj克qglso新xk闻_hg网re版权所有,请勿未授权转载!!!
when "010" => so<=1;co<=0;
虎ddrf泰t克qvnsw新rpo闻d网rbdh版权所有,请勿未授权转载!!!
when "011" => so<=0;co<=1;
虎a__泰vn克y新obo闻cn网shihd版权所有,请勿未授权转载!!!
when "100" => so<=1;co<=0;
虎jfpk泰df克ndh新wz_r闻jjt网tmwq版权所有,请勿未授权转载!!!
when "101" => so<=0;co<=1;
虎hanis泰m克acu新lzvr_闻gdei网rk版权所有,请勿未授权转载!!!
when "110" => so<=0;co<=1;
虎dah泰s克fl新v闻s网drps版权所有,请勿未授权转载!!!
when "111" => so<=1;co<=1;
虎a泰zyvq克cme新f闻xhj网v版权所有,请勿未授权转载!!!
when others =>NULL;
虎b泰hoch克hanj新cie闻jq网uzsys版权所有,请勿未授权转载!!!
end case;
虎htasw泰at克zsnn新ccix闻weypo网tqiny版权所有,请勿未授权转载!!!
end process;
虎_gxe泰u克yhzd新tw闻gszyg网hlbhh版权所有,请勿未授权转载!!!
end architecture;
虎muv泰bkn克a新rm_闻xe网wtv版权所有,请勿未授权转载!!!
定义的s是std_logic类型,但你赋值的时候由于没加单引号,被认为是integer类型了,所以应加单引号
虎xem泰mnen克ml新ni闻_ewq网sitz版权所有,请勿未授权转载!!!
Dichiarazione: tutti gli articoli / disegni riprodotti su questo sito web hanno lo scopo di trasmettere più informazioni e facilitare la discussione, il che non significa che il sito web, l'host e l'organizzatore siano d'accordo con le loro opinioni o confermino l'autenticità dei loro contenuti. I contenuti degli articoli sono di riferimento. Se i diritti dell'autore originale sono violati, si prega di contattare l'amministratore del sito web.
Commento elenco
-
Nessun dato