Tarea 1 Flip Flops Bojorquez 5EB
Tarea 1 Flip Flops Bojorquez 5EB
Tarea 1 Flip Flops Bojorquez 5EB
MERIDA
Matricula E18080939
LE18080939@merida.tecnm.mx
entity ffd is
port (clk, RESET, EN, D: in std_logic;
Q: inout std_logic);
end ffd;
Tenemos 3 entradas que son el enable, data y el reset, sin contar el clk que esta con el
reloj de la placa y nuestra salida Q
Se activa el reset.
Flip Flop SR
El flip-flop tiene dos entradas R (reset) y S (set), se encuentran a la izquierda del
símbolo. Este flip-flop tiene activas las entradas en el nivel BAJO, lo cual se indica
por los circulitos de las entradas R y S. Los flip-flop tienen dos salidas
complementarias, que se denominan Q y 1, la salida Q es la salida normal y 1 = 0.
Código:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library ieee;
use ieee.std_logic_1164.all;
entity ffsr is port (
S, R, clk: in std_logic;
Q, Qn: inout std_logic);
end ffsr;
entity ffjk is
port( J,K: in std_logic;
Reset: in std_logic;
Clock_enable: in std_logic;
Clock: in std_logic;
Output: out std_logic);
end ffjk;
entity fft is
port (T,Reset,CLK,CLK_enable: in std_logic;
Q: out std_logic);
end fft;
architecture a_fft of fft is
begin
process (Reset,CLK)
variable temp: std_logic;
begin
if (rising_edge(CLK)) then
if Reset='1' then
temp := '0';
elsif CLK_enable ='1' then
temp := T xor temp;
end if;
end if;
Q <= temp;
end process;
end a_fft;
Los constraints:
set_property IOSTANDARD LVCMOS33 [get_ports CLK]
set_property IOSTANDARD LVCMOS33 [get_ports Q]
set_property IOSTANDARD LVCMOS33 [get_ports CLK_enable]
set_property IOSTANDARD LVCMOS33 [get_ports Reset]
set_property IOSTANDARD LVCMOS33 [get_ports T]
set_property PACKAGE_PIN E3 [get_ports CLK]
set_property PACKAGE_PIN L16 [get_ports CLK_enable]
set_property PACKAGE_PIN H17 [get_ports Q]
set_property PACKAGE_PIN V10 [get_ports Reset]
set_property PACKAGE_PIN J15 [get_ports T]