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

Subversion Repositories mod_sim_exp

[/] [mod_sim_exp/] [trunk/] [rtl/] [vhdl/] [core/] [d_flip_flop.vhd] - Blame information for rev 3

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 JonasDC
----------------------------------------------------------------------  
2
----  d_flip_flop                                                 ---- 
3
----                                                              ---- 
4
----  This file is part of the                                    ----
5
----    Modular Simultaneous Exponentiation Core project          ---- 
6
----    http://www.opencores.org/cores/mod_sim_exp/               ---- 
7
----                                                              ---- 
8
----  Description                                                 ---- 
9
----    1 bit D flip-flop currently still uses primitives         ----
10
----                                                              ---- 
11
----  Dependencies: none                                          ---- 
12
----                                                              ---- 
13
----  Authors:                                                    ----
14
----      - Geoffrey Ottoy, DraMCo research group                 ----
15
----      - Jonas De Craene, JonasDC@opencores.org                ---- 
16
----                                                              ---- 
17
---------------------------------------------------------------------- 
18
----                                                              ---- 
19
---- Copyright (C) 2011 DraMCo research group and OPENCORES.ORG   ---- 
20
----                                                              ---- 
21
---- This source file may be used and distributed without         ---- 
22
---- restriction provided that this copyright statement is not    ---- 
23
---- removed from the file and that any derivative work contains  ---- 
24
---- the original copyright notice and the associated disclaimer. ---- 
25
----                                                              ---- 
26
---- This source file is free software; you can redistribute it   ---- 
27
---- and/or modify it under the terms of the GNU Lesser General   ---- 
28
---- Public License as published by the Free Software Foundation; ---- 
29
---- either version 2.1 of the License, or (at your option) any   ---- 
30
---- later version.                                               ---- 
31
----                                                              ---- 
32
---- This source is distributed in the hope that it will be       ---- 
33
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ---- 
34
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ---- 
35
---- PURPOSE.  See the GNU Lesser General Public License for more ---- 
36
---- details.                                                     ---- 
37
----                                                              ---- 
38
---- You should have received a copy of the GNU Lesser General    ---- 
39
---- Public License along with this source; if not, download it   ---- 
40
---- from http://www.opencores.org/lgpl.shtml                     ---- 
41
----                                                              ---- 
42
----------------------------------------------------------------------
43 2 JonasDC
 
44 3 JonasDC
library ieee;
45
use ieee.std_logic_1164.all;
46
use ieee.std_logic_arith.all;
47
use ieee.std_logic_unsigned.all;
48
-- Xilinx primitives used
49
library unisim;
50
use unisim.vcomponents.all;
51 2 JonasDC
 
52 3 JonasDC
 
53 2 JonasDC
entity d_flip_flop is
54 3 JonasDC
  port(
55
    core_clk : in  std_logic;
56
    reset    : in  std_logic;
57
    din      : in  std_logic;
58
    dout     : out std_logic
59
  );
60 2 JonasDC
end d_flip_flop;
61
 
62 3 JonasDC
 
63 2 JonasDC
architecture Structural of d_flip_flop is
64 3 JonasDC
  signal dout_i : std_logic;
65 2 JonasDC
begin
66 3 JonasDC
 
67
  dout <= dout_i;
68
 
69
  FDCE_inst : FDCE
70
  generic map (
71
    INIT => '0')     -- Initial value of latch ('0' or '1')
72
  port map (
73
    Q   => dout_i,   -- Data output
74
    CLR => reset,    -- Asynchronous clear/reset input
75
    D   => din,      -- Data input
76
    C   => core_clk, -- Gate input
77
    CE  => '1'       -- Gate enable input
78
  );
79
 
80
end Structural;

powered by: WebSVN 2.1.0

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