欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2260|回復: 0
收起左側

四位全減器VHDL源程序

[復制鏈接]
ID:423659 發表于 2018-11-9 16:32 | 顯示全部樓層 |閱讀模式
library ieee;


use ieee.std_logic_1164.all;


entity quanjian is


port(a,b,c:in std_logic;


sout,jout:out std_logic);


end;


architecture one of quanjian is


signal abc:std_logic_vector(2 downto 0);


begin


abc<=a&b&c;


process(abc)


begin


case abc is


when"000"=> sout<='0';jout<='0';


when"001"=> sout<='1';jout<='1';


when"010"=> sout<='1';jout<='1';


when"011"=> sout<='0';jout<='1';


when"100"=> sout<='1';jout<='0';


when"101"=> sout<='0';jout<='0';


when"110"=> sout<='0';jout<='0';


when"111"=> sout<='1';jout<='1';


when others=>null;


end case;


end process;


end one;


library ieee;


use ieee.std_logic_1164.all;


entity quanjian4 is


port(a11,a12,a13,a14,b11,b12,b13,b14:in std_logic;


s1,s2,s3,s4,j4:out std_logic);


end;


architecture two of quanjian4 is


signal d,e,f:std_logic;


component quanjian


port(a,b,c:in std_logic;


sout,jout:out std_logic);


end component;


begin


u1:quanjian port map(a=>a14,b=>b14,c=>'0',jout=>d,sout=>s4);


u2:quanjian port map(a=>a13,b=>b13,c=>d,jout=>e,sout=>s3);


u3:quanjian port map(a=>a12,b=>b12,c=>e,jout=>f,sout=>s2);


u4:quanjian port map(a=>a11,b=>b11,c=>f,jout=>j4,sout=>s1);


end two;
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表