Está en la página 1de 5

FLIP-FLOP D

Cuando el valor de la entrada D es igual a 1, figura 4.3b), la salida Q t + i adopta el


valor de 1: Qt+i = 1 siempre y cuando se genere un pulso de reloj. Es importante
resaltar que el valor actual en la entrada D es transferido a la salida Q t + sin
importar cul sea el valor previo que haya tenido la salida Q en el estado presente.

library IEEE;
use IEEE.std_logic_1164.ALL;
use IEEE.std_logic_arith.ALL;
use IEEE.std_logic_unsigned.ALL;

entity FD is
port(D,CLK: in std_logic;
Q: out std_logic);
end FD;

architecture funcional of FD is
begin
process (D,CLK)
begin
if(CLK='1')
then
Q<=D;
end if;
end process;
end funcional;
FLIP FLOP SR
La tabla de verdad del flip-flop SR muestra que cuando la entrada S es igual a 1 y
la entrada R es igual a 0, la salida Qt+i toma valores lgicos de 1. Por otro lado,
cuando S = 0 y R=l , la salida Qt+i = 0; en el caso de que S y R sean ambas igual
a 1 lgico, la salida Qt+j queda indeterminada; es decir, no es posible precisar su
valor y ste puede adoptar el 0 o 1 lgico. Por ltimo, cuando no existe cambio en
las entradas S y R es decir, son igual a 0, el valor de Qt+i mantiene su estado
actual Q.

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity flipflopsr is
port(S,R,clk: in std_logic;
Q,Qn: inout std_logic);
end flipflopsr;

architecture funcional of flipflopsr is


begin
process(clk,S,R)
begin
if (clk'event and clk='1') then
if (S='0' and R='1') then
Q<='0';
Qn<='1';
elsif (S='1' and R='0') then
Q<='1';
Qn<='0';
elsif (S='0' and R='0') then
Q<=Q;
Qn<=Qn;
else
Q<='-';
Qn<='-';
end if;
end if;
end process;
end funcional;

FLIP- FLOP JK
Este dispositivo de almacenamiento es temporal que se encuentra dos estados
(alto y bajo), cuyas entradas principales, J y K, a las que debe el nombre, permiten
al ser activadas:
J: El grabado (set en ingls), puesta a 1 nivel alto de la salida.
K: El borrado (reset en ingls), puesta a 0 nivel bajo de la salida.
Si no se activa ninguna de las entradas, el biestable permanece en el estado que
posea tras la ltima operacin de borrado o grabado.

library IEEE;
use IEEE.std_logic_1164.ALL;
use IEEE.std_logic_arith.ALL;
use IEEE.std_logic_unsigned.ALL;

entity JK is
Port ( clk,j,k,prn,clrn: in bit;
q: out bit);
end JK;

architecture Funcional of JK is
signal qestado: bit;
begin
process (clk,prn,clrn)
begin
if prn = '1' then QESTADO <= '1';
elsif clrn = '1' then QESTADO <= '0';
elsif CLK = '0' AND CLK'event then
if J = '1' AND K = '1' then QESTADO <= NOT QESTADO;
elsif J = '1' AND K = '0' then QESTADO <= '1';
elsif J = '0' AND K = '1' then QESTADO <= '0';
elsif J = '0' AND K = '0' then QESTADO <= QESTADO;
end if;
end if;
end process;
Q <= QESTADO;
end Funcional;

FLIP FLOP T

Dispositivo de almacenamiento temporal de 2 estados (alto y bajo). El biestable T


cambia de estado ("toggle" en ingls) cada vez que la entrada de sincronismo o de
reloj se dispara mientras la entrada T est a nivel alto. Si la entrada T est a nivel
bajo, el biestable retiene el nivel previo.
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity flipflopT is
port(T: in std_logic;
clock: in std_logic;
Q: out std_logic);
end flipflopT;

architecture funcional of flipflopT is


signal tmp: std_logic;
begin
process(clock)
begin
if (clock'event and clock='1') then
if T='0' then
tmp<=tmp;
elsif T='1' then
tmp<=not (tmp);
end if;
end if;
end process;
Q<=tmp;
end funcional;

También podría gustarte