OpenCores
URL https://opencores.org/ocsvn/funbase_ip_library/funbase_ip_library/trunk

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.hwp.accelerator/] [dctqidct/] [1.0/] [hdl/] [common_da/] [FlipFlop.vhd] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
------------------------------------------------------------------------------
2
-- Author               : Timo Alho
3
-- e-mail               : timo.a.alho@tut.fi
4
-- Date                 : 22.07.2004 10:00:00
5
-- File                 : FlipFlop.vhd
6
-- Design               : VHDL Entity common_da.FlipFlop.rtl
7
------------------------------------------------------------------------------
8
-- Description  : Generic Flipflop
9
------------------------------------------------------------------------------
10
LIBRARY ieee;
11
USE ieee.std_logic_1164.all;
12
USE ieee.std_logic_arith.all;
13
 
14
ENTITY FlipFlop IS
15
   GENERIC(
16
      dataw_g : INTEGER := 16
17
   );
18
   PORT(
19
      clk   : IN     std_logic;
20
      d_in  : IN     std_logic_vector (dataw_g-1 DOWNTO 0);
21
      rst_n : IN     std_logic;
22
      d_out : OUT    std_logic_vector (dataw_g-1 DOWNTO 0)
23
   );
24
 
25
-- Declarations
26
 
27
END FlipFlop ;
28
 
29
--
30
ARCHITECTURE rtl OF FlipFlop IS
31
  SIGNAL data_r : std_logic_vector(dataw_g-1 DOWNTO 0);
32
BEGIN
33
 
34
  clocked       : PROCESS (clk, rst_n)
35
  BEGIN  -- PROCESS clocked
36
    IF rst_n = '0' THEN                 -- asynchronous reset (active low)
37
      data_r <= (OTHERS => '0');
38
    ELSIF clk'event AND clk = '1' THEN  -- rising clock edge
39
      data_r <= d_in;
40
    END IF;
41
  END PROCESS clocked;
42
 
43
  d_out <= data_r;
44
END rtl;
45
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.