Beruflich Dokumente
Kultur Dokumente
X Sistemas Digitales
Realizado por:
(Espacio Reservado)
Fecha de entrega: 2018 / 02 / 09 f. ______________________
año mes día Recibido por:
Sanción: ________________________________________________
0
0 0 1
7
U1:A(CLK) 4 15 9 11 4 15 9 11
S
S
J Q J Q J Q J Q
1 6 1 6
CLK CLK CLK CLK
16 14 12 10 16 14 12 10
K Q K Q K Q K Q
R
R
3
8
74LS76 74LS76 74LS76 74LS76
VHDL
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity contador15 is
port (
clk0,x : in bit;
a0,a1,a2,a3: out bit
);
end contador15;
TEST
library ieee;
use ieee.std_logic_1164.all;
entity contador15_tb is
end contador15_tb;
process
begin
x_0<='1'; clk_0<='0'; wait for 10 fs;
x_0<='1'; clk_0<='1'; wait for 10 fs;
for i in 0 to 15 loop
x_0<='0';
clk_0<='0';
wait for 10 fs;
x_0<='0';
clk_0<='1';
wait for 10 fs;
end loop;
wait;
end process;
end test;
2. Realizar contadores de tipo Ripple-Clock descendente que se presenta en la siguiente tabla,
armarlos en los simuladores Proteus y Logisim además crear el código en VHDL y la
simulación en gtkwave (utilizar solo flip-flops J-K).
MODULO 15
7
BAT1 9 11 4 15 4 15 9 11
S
J Q e3 J Q e2 J Q e1 J Q e0
10 U2:B(CLK)
6 1 1 6
CLK CLK CLK CLK
12 10 16 14 16 14 12 10
K Q q3 K Q q2 K Q q1 K Q q0
R
U5
8
7476 7476 7476 7476
e3
e2
e1
e0
NAND_4
U4 R7
10 9
q0
8
A1 S1
6
d0 U6 330 R8
q1 A2 S2 d1 U1
3 2 10 9
q2 A3 S3 d2 d0 A1 S1 330
1 15 8 6 7 13
q3 A4 S4 d3 d1
3
A2 S2
2 1
A QA
12
R9
d2 A3 S3 B QB
11 1 15 2 11
B1 d3 A4 S4 C QC 330
7 6 10 R10
B2 D QD
4 11 4 9
B3 B1 BI/RBO QE
16 7 5 15 330
B4 B2 RBI QF
4 3 14 R11
B3 LT QG
13 14 16
C0 C4 B4
74LS48 330
74LS83 13 14 R12
C0 C4
U4(C0) 74LS83 330
U7 R13
U14 d2 330
U11 R14
d1 U8
U15 AND_2 7 13 R15
330
NOT U9 A QA
1 12
U12 B QB
2 11 R16
330
d2 C QC
OR 6 10
D QD
4 9 R17
330
NOT d1 BI/RBO QE
5 15
RBI QF
AND_2 3 14 R18
330
U10 LT QG
OR
U16 74LS48 R19
330
d1 U13
d0 R20
330
AND_2 330
NOT d3
AND_2
VHDL
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity cont15des is
port (
clk0,x : in bit;
a0,a1,a2,a3: out bit
);
end cont15des;
a0<=a_0;
a1<=a_1;
a2<=a_2;
a3<=a_3;
end behavior;
TEST
library ieee;
use ieee.std_logic_1164.all;
entity cont15des_tb is
end cont15des_tb;
process
begin
x_0<='1'; clk_0<='0'; wait for 10 fs;
x_0<='1'; clk_0<='1'; wait for 10 fs;
for i in 0 to 15 loop
x_0<='0';
clk_0<='0';
wait for 10 fs;
x_0<='0';
clk_0<='1';
wait for 10 fs;
end loop;
wait;
end process;
end test;
3. Realizar el código en VHDL como las pruebas en gtkwave de las siguientes compuertas
lógicas 7490, 7492 y 7496.
VHDL 7490
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL;
ENTITY c7490 IS
PORT ( Qa,Qb,Qc,Qd: OUT STD_LOGIC;
R01,R02,R91,R92: IN STD_LOGIC;
Clk: IN STD_LOGIC);
END c7490;
BEGIN
Qa<=count(0);
Qb<=count(1);
Qc<=count(2);
Qd<=count(3);
PROCESS(Clk)
BEGIN
IF(rising_edge(Clk)) THEN
IF( c < 125000000) THEN
c<=c+1;
Clk_new<='0';
ELSIF( c < 25000000) THEN
c<=c+1;
Clk_new<='1';
ELSE
c<=0;
END IF;
END IF;
END PROCESS;
PROCESS(Clk_new,R01,R02,R91,R92)
BEGIN
IF(R01='1' AND R02='1' AND R91='0') THEN
count<="0000";
ELSIF(R01='1' AND R02='1' AND R91='0') THEN
count<="0000";
ELSIF(R92='1' AND R91='1') THEN
count<="1001";
ELSIF(rising_edge(Clk_new)) THEN
count<=count+1;
IF(count="1001") THEN
count<="0000";
END IF;
END IF;
END PROCESS;
END behavior;
TEST
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY c7490_tb IS
END c7490_tb;
BEGIN
uut: c7490 PORT MAP(
Qa=>Qa,
Qb=>Qb,
Qc=>Qc,
Qd=>Qd,
R01=>R01,
R02=>R02,
R91=>R91,
R92=>R92,
Clk=>Clk);
END behavioral;
entity fpd is
Port ( d:in std_logic;
clk: in std_logic;
pr: in std_logic;
cl: in std_logic;
q0: out std_logic;
q1: out std_logic
);
end fpd;
ENTITY fpd_tb IS
END fpd_tb;
BEGIN
uut: fpd PORT MAP(
d=>d,
clk=>clk,
pr=>pr,
cl=>cl,
q0=>q0,
q1=>q1);
PROCESS
BEGIN
d<='0'; clk<='0'; pr<= '1'; cl<='0'; wait for 10 fs;
d<='1'; clk<='1'; pr<= '1'; cl<='1'; wait for 10 fs;
d<='1'; clk<='0'; pr<= '1'; cl<='1'; wait for 10 fs;
d<='0'; clk<='1'; pr<= '1'; cl<='1'; wait for 10 fs;
d<='0'; clk<='0'; pr<= '1'; cl<='1'; wait for 10 fs;
d<='1'; clk<='1'; pr<= '1'; cl<='1'; wait for 10 fs;
d<='1'; clk<='0'; pr<= '1'; cl<='1'; wait for 10 fs;
d<='0'; clk<='1'; pr<= '1'; cl<='1'; wait for 10 fs;
d<='0'; clk<='0'; pr<= '1'; cl<='1'; wait for 10 fs;
wait;
END PROCESS;
END behavior;
TIPO T
VHDL
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity fpt is
Port ( t:in std_logic;
clk: in std_logic;
pr: in std_logic;
cl: in std_logic;
q0: out std_logic;
q1: out std_logic
);
end fpt;
entity fpt_tb is
end fpt_tb;
BEGIN
uut: fpt PORT MAP (
clk=> clk,
cl=>cl,
pr=>pr,
t => t,
q0 => q0,
q1 =>q1
);
process
begin
cl<='1';pr<='1';t <= '0'; clk <= '0'; wait for 10 Fs;
cl<='1';pr<='1';t <= '0'; clk <= '1'; wait for 10 Fs;
cl<='1';pr<='1';t <= '1'; clk <= '0'; wait for 10 Fs;
cl<='1';pr<='1';t <= '1'; clk <= '1'; wait for 10 Fs;
cl<='1';pr<='1';t <= '1'; clk <= '0'; wait for 10 Fs;
cl<='1';pr<='1';t <= '1'; clk <= '1'; wait for 10 Fs;
cl<='1';pr<='0';t <= '0'; clk <= '0'; wait for 10 Fs;
cl<='1';pr<='0';t <= '0'; clk <= '1'; wait for 10 Fs;
cl<='0';pr<='1';t <= '0'; clk <= '0'; wait for 10 Fs;
cl<='0';pr<='1';t <= '0'; clk <= '1'; wait for 10 Fs;
cl<='1';pr<='1';t <= '0'; clk <= '0'; wait;
end process;
END behavioral;
5. Realizar el código VHDL (con base de flip-flops J-K) necesario para implementar un
contador ascendente del módulo indicado en la siguiente tabla.
CÓDIGO VHDL
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity cont512 is
port (
clk0 : in bit;
q0,q1,q2,q3,q4,q5,q6,q7,q8,q9: out bit
);
end cont512;
q0<=q_0;
q1<=q_1;
q2<=q_2;
q3<=q_3;
q4<=q_4;
q5<=q_5;
q6<=q_6;
q7<=q_7;
q8<=q_8;
q9<=q_9;
end behavior;
PRUEBA VHDL
entity cont512_tb is
end cont512_tb;
clk0=>clk_0,
q0=>q_0,
q1=>q_1,
q2=>q_2,
q3=>q_3,
q4=>q_4,
q5=>q_5,
q6=>q_6,
q7=>q_7,
q8=>q_8,
q9=>q_9);
process
begin
wait;
end process;
end test;
6. Realizar el código VHDL (con base de flip-flops J-K) necesario para implementar un
contador descendente del módulo indicado en la siguiente tabla.
CODIGO VHDL
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity cont612 is
port (
clk0,x : in bit;
a0,a1,a2,a3,a4,a5,a6,a7,a8,a9: out bit
);
end cont612;
a0<=a_0;
a1<=a_1;
a2<=a_2;
a3<=a_3;
a4<=a_4;
a5<=a_5;
a6<=a_6;
a7<=a_7;
a8<=a_8;
a9<=a_9;
end behavior;
PRUEBA
entity cont612_tb is
end cont612_tb;
BIBLIOGRAFÍA