Skip to content

Instantly share code, notes, and snippets.

@davilamds
Last active January 28, 2018 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davilamds/8fd315f1d478540b286492631aeba4f0 to your computer and use it in GitHub Desktop.
Save davilamds/8fd315f1d478540b286492631aeba4f0 to your computer and use it in GitHub Desktop.
Flip Flop tipo D VHDL
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity d_ff is
port(
clk: in std_logic; --declaración de señal de reloj
d: in std_logic;
q: out std_logic
);
end d_ff;
architecture arch_dff of d_ff is
begin
process(clk)--proceso toma en cuenta únicamente la señal clk
begin
if (clk'event and clk='1') then --se ejecuta en un cambio de la señal clk, cuando =1
q<=d;
end if;
end process;
end arch_dff;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment