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 8

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

Line No. Rev Author Line
1 8 wfjm
-- $Id: dcm_sp_sfs_unisim.vhd 338 2010-11-13 22:19:25Z mueller $
2
--
3
-- Copyright 2010- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
--
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
-- Module Name:    dcm_sp_sfs - syn
16
-- Description:    DCM_SP as 'simple freq. synthesis'
17
--                 Direct instantiation of Xilinx UNISIM primitives
18
--
19
-- Dependencies:   -
20
-- Test bench:     -
21
-- Target Devices: generic Spartan-3A,-3E
22
-- Tool versions:  xst 12.1; ghdl 0.29
23
--
24
-- Revision History: 
25
-- Date         Rev Version  Comment
26
-- 2010-11-12   338   1.0.1  drop SB_CLK generic; allow DIV=1,MUL=1 without DCM
27
-- 2010-11-07   337   1.0    Initial version 
28
------------------------------------------------------------------------------
29
 
30
library ieee;
31
use ieee.std_logic_1164.all;
32
 
33
library unisim;
34
use unisim.vcomponents.ALL;
35
 
36
use work.slvtypes.all;
37
 
38
entity dcm_sp_sfs is                    -- DCM_SP as 'simple freq. synthesis'
39
  generic (
40
    CLKFX_DIVIDE : positive := 1;       -- FX clock divide   (1-32)
41
    CLKFX_MULTIPLY : positive := 1;     -- FX clock multiply (2-32) (1->no DCM)
42
    CLKIN_PERIOD : real := 20.0);       -- CLKIN period (def is 20.0 ns)
43
  port (
44
    CLKIN : in slbit;                   -- clock input
45
    CLKFX : out slbit;                  -- clock output (synthesized freq.) 
46
    LOCKED : out slbit                  -- dcm locked
47
  );
48
end dcm_sp_sfs;
49
 
50
 
51
architecture syn of dcm_sp_sfs is
52
 
53
begin
54
 
55
  assert (CLKFX_DIVIDE=1 and CLKFX_MULTIPLY=1) or CLKFX_MULTIPLY>=2
56
  report "assert((FX_DIV=1 and FX_MULT)=1 or FX_MULT>=2"
57
  severity failure;
58
 
59
  DCM0: if CLKFX_DIVIDE=1 and CLKFX_MULTIPLY=1 generate
60
    CLKFX  <= CLKIN;
61
    LOCKED <= '1';
62
  end generate DCM0;
63
 
64
  DCM1: if CLKFX_MULTIPLY >= 2 generate
65
 
66
    DCM : dcm_sp
67
      generic map (
68
        CLK_FEEDBACK       => "NONE",
69
        CLKFX_DIVIDE       => CLKFX_DIVIDE,
70
        CLKFX_MULTIPLY     => CLKFX_MULTIPLY,
71
        CLKIN_DIVIDE_BY_2  => false,
72
        CLKIN_PERIOD       => CLKIN_PERIOD,
73
        CLKOUT_PHASE_SHIFT => "NONE",
74
        DESKEW_ADJUST      => "SYSTEM_SYNCHRONOUS",
75
        DSS_MODE           => "NONE")
76
      port map (
77
        CLKIN   => CLKIN,
78
        CLKFX   => CLKFX,
79
        LOCKED  => LOCKED
80
      );
81
 
82
  end generate DCM1;
83
 
84
end syn;

powered by: WebSVN 2.1.0

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