ROD firmware  1.0.5
ATLAS l1-calo - ROD_eFEX and ROD_jFEX firmware for the L1Calo ROD board

Back to ROD documentation
ff.vhd
1 ----------------------------------------------------------------------------------
2 -- Company:
3 -- Engineer:
4 --
5 -- Create Date: 15.02.2017 17:59:11
6 -- Design Name:
7 -- Module Name: ff - Behavioral
8 -- Project Name:
9 -- Target Devices:
10 -- Tool Versions:
11 -- Description:
12 --
13 -- Dependencies:
14 --
15 -- Revision:
16 -- Revision 0.01 - File Created
17 -- Additional Comments:
18 --
19 ----------------------------------------------------------------------------------
20 
21 
22 library IEEE;
23 
24 
25 -- Uncomment the following library declaration if using
26 -- arithmetic functions with Signed or Unsigned values
27 --use IEEE.NUMERIC_STD.ALL;
28 
29 -- Uncomment the following library declaration if instantiating
30 -- any Xilinx leaf cells in this code.
31 --library UNISIM;
32 --use UNISIM.VComponents.all;
33 
34 package ff is
35 use IEEE.STD_LOGIC_1164.ALL;
36 
37  component vDFF is --multibit D flip-flop
38  generic (n : integer := 1); --width
39  port (clk : in std_logic;
40  D : in std_logic_vector (n-1 downto 0);
41  Q : out std_logic_vector (n-1 downto 0) );
42  end component;
43 
44  component sDFF is --single bit D flip-flop
45  port (clk : in std_logic;
46  D : in std_logic;
47  Q : out std_logic );
48  end component;
49 
50 end package;
51 
52 library IEEE;
53 use IEEE.STD_LOGIC_1164.ALL;
54 
55 
56 
57 entity vDFF is
58  generic (n : integer := 1); --width
59  port (clk : in std_logic;
60  D : in std_logic_vector (n-1 downto 0);
61  Q : out std_logic_vector (n-1 downto 0) );
62  end vDFF;
63 
64  architecture impl of vDFF is
65  begin
66  process (clk) begin
67  if rising_edge (clk) then
68  Q <= D;
69  end if;
70  end process;
71  end impl;
72 
73 
74 
75 
76 library IEEE;
77 use IEEE.STD_LOGIC_1164.ALL;
78 
79  entity sDFF is --single bit D flip-flop
80  port (clk : in std_logic;
81  D : in std_logic;
82  Q : out std_logic );
83  end sDFF;
84 
85  architecture impl of sDFF is
86  begin
87  process (clk) begin
88  if rising_edge (clk) then
89  Q <= D;
90  end if;
91  end process;
92  end impl;
93 
Definition: ff.vhd:34
Definition: ff.vhd:85
Definition: ff.vhd:79
Definition: ff.vhd:64
Definition: ff.vhd:57