------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------
|
--
|
--
|
-- Geoffrey Ottoy - DraMCo research group
|
-- Geoffrey Ottoy - DraMCo research group
|
--
|
--
|
-- Module Name: d_flip_flop.vhd / entity d_flip_flop
|
-- Module Name: d_flip_flop.vhd / entity d_flip_flop
|
--
|
--
|
-- Last Modified: 24/11/2011
|
-- Last Modified: 24/11/2011
|
--
|
--
|
-- Description: 1 bit D flip-flop
|
-- Description: 1 bit D flip-flop
|
--
|
--
|
--
|
--
|
-- Dependencies: LDCE
|
-- Dependencies: LDCE
|
--
|
--
|
-- Revision:
|
-- Revision:
|
-- Revision 1.00 - Architecture
|
-- Revision 1.00 - Architecture
|
-- Revision 0.01 - File Created
|
-- Revision 0.01 - File Created
|
--
|
--
|
--
|
--
|
------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------
|
--
|
--
|
-- NOTICE:
|
-- NOTICE:
|
--
|
--
|
-- Copyright DraMCo research group. 2011. This code may be contain portions patented
|
-- Copyright DraMCo research group. 2011. This code may be contain portions patented
|
-- by other third parties!
|
-- by other third parties!
|
--
|
--
|
------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------
|
library IEEE;
|
library IEEE;
|
use IEEE.STD_LOGIC_1164.ALL;
|
use IEEE.STD_LOGIC_1164.ALL;
|
use IEEE.STD_LOGIC_ARITH.ALL;
|
use IEEE.STD_LOGIC_ARITH.ALL;
|
use IEEE.STD_LOGIC_UNSIGNED.ALL;
|
use IEEE.STD_LOGIC_UNSIGNED.ALL;
|
|
|
---- Uncomment the following library declaration if instantiating
|
---- Uncomment the following library declaration if instantiating
|
---- any Xilinx primitives in this code.
|
---- any Xilinx primitives in this code.
|
library UNISIM;
|
library UNISIM;
|
use UNISIM.VComponents.all;
|
use UNISIM.VComponents.all;
|
|
|
entity d_flip_flop is
|
entity d_flip_flop is
|
port(core_clk : in STD_LOGIC;
|
port(core_clk : in STD_LOGIC;
|
reset : in STD_LOGIC;
|
reset : in STD_LOGIC;
|
din : in STD_LOGIC;
|
din : in STD_LOGIC;
|
dout : out STD_LOGIC
|
dout : out STD_LOGIC
|
);
|
);
|
end d_flip_flop;
|
end d_flip_flop;
|
|
|
architecture Structural of d_flip_flop is
|
architecture Structural of d_flip_flop is
|
signal dout_i : std_logic;
|
signal dout_i : std_logic;
|
begin
|
begin
|
|
|
dout <= dout_i;
|
dout <= dout_i;
|
|
|
FDCE_inst : FDCE
|
FDCE_inst : FDCE
|
generic map (
|
generic map (
|
INIT => '0') -- Initial value of latch ('0' or '1')
|
INIT => '0') -- Initial value of latch ('0' or '1')
|
port map (
|
port map (
|
Q => dout_i, -- Data output
|
Q => dout_i, -- Data output
|
CLR => reset, -- Asynchronous clear/reset input
|
CLR => reset, -- Asynchronous clear/reset input
|
D => din, -- Data input
|
D => din, -- Data input
|
C => core_clk, -- Gate input
|
C => core_clk, -- Gate input
|
CE => '1' -- Gate enable input
|
CE => '1' -- Gate enable input
|
);
|
);
|
|
|
|
|