VHDL报错std_logic type does not match integer literal
随风飘扬 学习 2015年12月01日7:07 6515
VHDL报错std_logic type does not match integer literal
library ieee;
虎ttmhb泰b克gayn新xt闻_qmk网ccuko版权所有,请勿未授权转载!!!
use ieee.std_logic_1164.all;
虎hszrh泰mr克awsa新ki闻ys网xi版权所有,请勿未授权转载!!!
entity f_adder2 is
虎am泰_nfem克e新kgdd闻kv网bt_kq版权所有,请勿未授权转载!!!
port(a,b,c : in std_logic; so,co : out std_logic);
虎hww泰ykgc克gy新e闻bfc_m网am版权所有,请勿未授权转载!!!
end entity f_adder2;
虎es泰orfx克_新mws闻j网urtw版权所有,请勿未授权转载!!!
architecture bhv of f_adder2 is
虎_orxe泰j克ld新vhg闻x网zzo版权所有,请勿未授权转载!!!
signal s : std_logic_vector(2 downto 0);
虎us泰ev克f新k闻njin网_wazp版权所有,请勿未授权转载!!!
begin s<=c&b&a;
虎gai泰dqhi克cq新hefya闻jn网fb版权所有,请勿未授权转载!!!
process(c,b,a) begin
虎s泰rfz克m新wvn闻v网kip版权所有,请勿未授权转载!!!
case (s) is
虎n泰ss克ei新yxqw闻o网fwh版权所有,请勿未授权转载!!!
when "000" => so<=0;co<=0;
虎mb泰en克tzd新f闻gncf网ammnn版权所有,请勿未授权转载!!!
when "001" => so<=1;co<=0;
虎pqv泰hua克st新koi闻sgs网viury版权所有,请勿未授权转载!!!
when "010" => so<=1;co<=0;
虎eb泰sze克p新d闻x网t_xt版权所有,请勿未授权转载!!!
when "011" => so<=0;co<=1;
虎yqa泰p克c新rvqag闻j网lcjfj版权所有,请勿未授权转载!!!
when "100" => so<=1;co<=0;
虎thx泰npx克hkfn新_yylc闻rw网rjlj版权所有,请勿未授权转载!!!
when "101" => so<=0;co<=1;
虎cnrs泰kdham克mzo新oc闻nugc网cbcp版权所有,请勿未授权转载!!!
when "110" => so<=0;co<=1;
虎kqbdn泰ai克uez新i闻yx网r版权所有,请勿未授权转载!!!
when "111" => so<=1;co<=1;
虎pq泰kblx克pjz新_r_闻uufnu网uxap版权所有,请勿未授权转载!!!
when others =>NULL;
虎m泰zygtu克pftbt新ubnnf闻qugkg网cn版权所有,请勿未授权转载!!!
end case;
虎kvxki泰asul克xkw新e闻xepn网xwvzn版权所有,请勿未授权转载!!!
end process;
虎kx泰e克_新w闻q网sgfz版权所有,请勿未授权转载!!!
end architecture;
虎ir泰qul_克f新t闻y网qb版权所有,请勿未授权转载!!!
定义的s是std_logic类型,但你赋值的时候由于没加单引号,被认为是integer类型了,所以应加单引号
虎zp_kv泰bbu克id新n闻pe网nd版权所有,请勿未授权转载!!!
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