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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [rtl/] [vlib/] [xlib/] [dcm_sfs_unisim_s3e.vhd] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 wfjm
-- $Id: dcm_sfs_unisim_s3e.vhd 534 2013-09-22 21:37:24Z mueller $
2 8 wfjm
--
3 13 wfjm
-- Copyright 2010-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 8 wfjm
--
5
-- This program is free software; you may redistribute and/or modify it under
6
-- the terms of the GNU General Public License as published by the Free
7
-- Software Foundation, either version 2, or at your option any later version.
8
--
9
-- This program is distributed in the hope that it will be useful, but
10
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
-- for complete details.
13
--
14
------------------------------------------------------------------------------
15 13 wfjm
-- Module Name:    dcm_sfs - syn
16
-- Description:    DCM for simple frequency synthesis; SPARTAN-3E version
17 8 wfjm
--                 Direct instantiation of Xilinx UNISIM primitives
18
--
19
-- Dependencies:   -
20
-- Test bench:     -
21 22 wfjm
-- Target Devices: generic Spartan-3A,-3E; Spartan-6
22 8 wfjm
-- Tool versions:  xst 12.1; ghdl 0.29
23
--
24
-- Revision History: 
25
-- Date         Rev Version  Comment
26 13 wfjm
-- 2011-11-17   426   1.0.3  rename dcm_sp_sfs -> dcm_sfs, SPARTAN-3E version
27
-- 2011-11-10   423   1.0.2  add FAMILY generic, SPARTAN-3 support
28 8 wfjm
-- 2010-11-12   338   1.0.1  drop SB_CLK generic; allow DIV=1,MUL=1 without DCM
29
-- 2010-11-07   337   1.0    Initial version 
30
------------------------------------------------------------------------------
31
 
32
library ieee;
33
use ieee.std_logic_1164.all;
34
 
35
library unisim;
36
use unisim.vcomponents.ALL;
37
 
38
use work.slvtypes.all;
39
 
40 13 wfjm
entity dcm_sfs is                       -- DCM for simple frequency synthesis
41 8 wfjm
  generic (
42
    CLKFX_DIVIDE : positive := 1;       -- FX clock divide   (1-32)
43
    CLKFX_MULTIPLY : positive := 1;     -- FX clock multiply (2-32) (1->no DCM)
44
    CLKIN_PERIOD : real := 20.0);       -- CLKIN period (def is 20.0 ns)
45
  port (
46
    CLKIN : in slbit;                   -- clock input
47
    CLKFX : out slbit;                  -- clock output (synthesized freq.) 
48
    LOCKED : out slbit                  -- dcm locked
49
  );
50 13 wfjm
end dcm_sfs;
51 8 wfjm
 
52
 
53 13 wfjm
architecture syn of dcm_sfs is
54 8 wfjm
 
55
begin
56
 
57
  assert (CLKFX_DIVIDE=1 and CLKFX_MULTIPLY=1) or CLKFX_MULTIPLY>=2
58
  report "assert((FX_DIV=1 and FX_MULT)=1 or FX_MULT>=2"
59
  severity failure;
60
 
61
  DCM0: if CLKFX_DIVIDE=1 and CLKFX_MULTIPLY=1 generate
62
    CLKFX  <= CLKIN;
63
    LOCKED <= '1';
64
  end generate DCM0;
65 13 wfjm
 
66
  DCM1: if CLKFX_MULTIPLY>=2 generate
67 8 wfjm
 
68
    DCM : dcm_sp
69
      generic map (
70
        CLK_FEEDBACK       => "NONE",
71
        CLKFX_DIVIDE       => CLKFX_DIVIDE,
72
        CLKFX_MULTIPLY     => CLKFX_MULTIPLY,
73
        CLKIN_DIVIDE_BY_2  => false,
74
        CLKIN_PERIOD       => CLKIN_PERIOD,
75
        CLKOUT_PHASE_SHIFT => "NONE",
76
        DESKEW_ADJUST      => "SYSTEM_SYNCHRONOUS",
77
        DSS_MODE           => "NONE")
78
      port map (
79
        CLKIN   => CLKIN,
80
        CLKFX   => CLKFX,
81
        LOCKED  => LOCKED
82
      );
83
 
84
  end generate DCM1;
85
 
86
end syn;

powered by: WebSVN 2.1.0

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