martes, 20 de marzo de 2018




Resettable Registers in VHDL






library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity flopr is
port( clk, reset: in std_logic;
d: in std_logic_vector(3 downto 0);
q: out std_logic_vector(3 downto 0));
end flopr;
architecture Behavioral of flopr is
begin
  process (clk, reset) begin
  if reset = '1' then
  q <= "0000";
  elsif clk' event and clk = '1' then
  q <= d;
  end if;
  end process;
end Behavioral;

No hay comentarios.:

Publicar un comentario

BTFSS INSTRUCTION  IN ASSEMBLER FOR PIC18F In this sample, we show that how to use a switch input to make an action. Remember that I...