12334456
-
Upload
sandra-lucia -
Category
Documents
-
view
221 -
download
0
Transcript of 12334456
-
8/8/2019 12334456
1/16
--Medio y sumador completo----------------------------------------------------------------------------------------------------------------library ieee;use ieee.std_logic_1164.all;entity sumcom is port(Cin, b, a: in std_logic;Cmed,Ccom,Smed,Scom: out std_logic);end sumcom;architecture fun_sumcom of sumcom isBeginCcom
-
8/8/2019 12334456
2/16
X: in std_logic_vector(2 downto 0);F: out std_logic_vector(4 downto 0));end xcuad;architecture fun_xcuad of xcuad isBeginwith X select --CondicionesF
-
8/8/2019 12334456
3/16
beginif(A>=B)thenR
-
8/8/2019 12334456
4/16
FFFFFFFFFFFFFFFFFF display
-
8/8/2019 12334456
5/16
-
8/8/2019 12334456
6/16
--MULTIPLEXOR 4-1-----------------------------------library ieee;use ieee.std_logic_1164.all;entity multiplex is port(a: in std_logic_vector(3 downto 0);s: in std_logic_vector(1 downto 0);y: out std_logic);end multiplex;architecture mult of multiplex isbeginprocess(A,S)begin
case S iswhen "00"=>YYYYY
-
8/8/2019 12334456
7/16
y(2)
-
8/8/2019 12334456
8/16
end if;end process;end funcont;
fallo
--CONTADOR DE 15-0--------------------------------------------------------library ieee;use ieee.std_logic_1164.all;use work.std_arith.all;
entity contad is port(clk,reset: in std_logic;Q: inout std_logic_vector(3 downto 0));end contad;architecture funcontad of contad isbeginprocess(clk,reset)variable aux: std_logic_vector(3 downto 0);beginif(reset='1')thenQ
-
8/8/2019 12334456
9/16
beginif(reset='1')thenQ
-
8/8/2019 12334456
10/16
if(reset='1')thenQ
-
8/8/2019 12334456
11/16
if(reset='1')thenQQQQQQQQ
-
8/8/2019 12334456
12/16
clk,rest:in std_logic;s:in std_logic_vector(1 downto 0);q: out std_logic_vector(3 downto 0));end conta4;architecture funconta4 of conta4 isbeginprocess(clk,s,rest)variable aux:std_logic_vector(2 downto 0);beginif(rest='1')thenaux:="000";elsif(clk'event and clk='1')thenaux:=aux+1;end if;if(S="00")then --Primer conteo (0,3,12,15,9,13,7,2)case aux iswhen "000"=>qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
-
8/8/2019 12334456
13/16
when others=>q
-
8/8/2019 12334456
14/16
----------------------------------library ieee;use ieee.std_logic_1164.all;use work.std_arith.all;entity segmas is port(clk,reset: in std_logic;disp: inout std_logic_vector (7 downto 0));end segmas;architecture funsegmas of segmas isbeginprocess(clk,reset)beginif(reset='1') thendisp
-
8/8/2019 12334456
15/16
-
8/8/2019 12334456
16/16
architecture funhoramas of horamas isbeginprocess(clk,reset)beginif(reset='1') thendisp