w11 - vhd
0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
s6_cmt_sfs_unisim.vhd
Go to the documentation of this file.
1
-- $Id: s6_cmt_sfs_unisim.vhd 1181 2019-07-08 17:00:50Z mueller $
2
-- SPDX-License-Identifier: GPL-3.0-or-later
3
-- Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
--
5
------------------------------------------------------------------------------
6
-- Module Name: s6_cmt_sfs - syn
7
-- Description: Spartan-6 CMT for simple frequency synthesis
8
-- Direct instantiation of Xilinx UNISIM primitives
9
--
10
-- Dependencies: -
11
-- Test bench: -
12
-- Target Devices: generic Spartan-6
13
-- Tool versions: xst 14.5-14.7; ghdl 0.29-0.31
14
--
15
-- Revision History:
16
-- Date Rev Version Comment
17
-- 2013-10-05 537 1.0 Initial version (derived from s7_cmt_sfs)
18
------------------------------------------------------------------------------
19
20
library
ieee
;
21
use
ieee.std_logic_1164.
all
;
22
23
library
unisim
;
24
use
unisim.vcomponents.
ALL
;
25
26
use
work.
slvtypes
.
all
;
27
28
entity
s6_cmt_sfs
is
-- Spartan-6 CMT for simple freq. synth.
29
generic
(
30
VCO_DIVIDE
:
positive
:=
1
;
-- vco clock divide
31
VCO_MULTIPLY
:
positive
:=
1
;
-- vco clock multiply
32
OUT_DIVIDE
:
positive
:=
1
;
-- output divide
33
CLKIN_PERIOD
:
real
:=
10
.
0
;
-- CLKIN period (def is 10.0 ns)
34
CLKIN_JITTER
:
real
:=
0
.
01
;
-- CLKIN jitter (def is 10 ps)
35
STARTUP_WAIT
:
boolean
:=
false
;
-- hold FPGA startup till LOCKED
36
GEN_TYPE
:
string
:=
"PLL"
)
;
-- PLL or DCM
37
port
(
38
CLKIN
:
in
slbit
;
-- clock input
39
CLKFX
:
out
slbit
;
-- clock output (synthesized freq.)
40
LOCKED
:
out
slbit
-- pll/dcm locked
41
)
;
42
end
s6_cmt_sfs
;
43
44
45
architecture
syn
of
s6_cmt_sfs
is
46
47
begin
48
49
assert
GEN_TYPE
=
"PLL"
or
GEN_TYPE
=
"DCM"
50
report
"assert(GEN_TYPE='PLL' or GEN_TYPE='DCM')"
51
severity
failure
;
52
53
NOGEN
:
if
VCO_DIVIDE
=
1
and
VCO_MULTIPLY
=
1
and
OUT_DIVIDE
=
1
generate
54
CLKFX
<=
CLKIN
;
55
LOCKED
<=
'
1
'
;
56
end
generate
NOGEN
;
57
58
USEPLL
:
if
GEN_TYPE
=
"PLL"
and
59
not
(
VCO_DIVIDE
=
1
and
VCO_MULTIPLY
=
1
and
OUT_DIVIDE
=
1
)
generate
60
61
signal
CLKFBOUT
:
slbit
;
62
signal
CLKOUT0
:
slbit
;
63
signal
CLKOUT1_UNUSED
:
slbit
;
64
signal
CLKOUT2_UNUSED
:
slbit
;
65
signal
CLKOUT3_UNUSED
:
slbit
;
66
signal
CLKOUT4_UNUSED
:
slbit
;
67
signal
CLKOUT5_UNUSED
:
slbit
;
68
69
begin
70
71
PLL : pll_base
72
generic
map
(
73
BANDWIDTH =>
"OPTIMIZED"
,
74
CLK_FEEDBACK =>
"CLKFBOUT"
,
75
COMPENSATION =>
"INTERNAL"
,
76
DIVCLK_DIVIDE =>
VCO_DIVIDE
,
77
CLKFBOUT_MULT =>
VCO_MULTIPLY
,
78
CLKFBOUT_PHASE =>
0.000
,
79
CLKOUT0_DIVIDE =>
OUT_DIVIDE
,
80
CLKOUT0_PHASE =>
0.000
,
81
CLKOUT0_DUTY_CYCLE =>
0.500
,
82
CLKIN_PERIOD =>
CLKIN_PERIOD
,
83
REF_JITTER =>
CLKIN_JITTER
)
84
port
map
(
85
CLKFBOUT =>
CLKFBOUT
,
86
CLKOUT0 =>
CLKOUT0
,
87
CLKOUT1 =>
CLKOUT1_UNUSED
,
88
CLKOUT2 =>
CLKOUT2_UNUSED
,
89
CLKOUT3 =>
CLKOUT3_UNUSED
,
90
CLKOUT4 =>
CLKOUT4_UNUSED
,
91
CLKOUT5 =>
CLKOUT5_UNUSED
,
92
CLKFBIN =>
CLKFBOUT
,
93
CLKIN =>
CLKIN
,
94
LOCKED =>
LOCKED
,
95
RST => '0'
96
)
;
97
98
BUFG_CLKOUT : bufg
99
port
map
(
100
I =>
CLKOUT0
,
101
O =>
CLKFX
102
)
;
103
104
end
generate
USEPLL;
105
106
USEDCM
:
if
GEN_TYPE
=
"DCM"
and
107
not
(
VCO_DIVIDE
=
1
and
VCO_MULTIPLY
=
1
and
OUT_DIVIDE
=
1
)
generate
108
109
signal
CLKOUT0
:
slbit
;
110
111
begin
112
113
DCM : dcm_sp
114
generic
map
(
115
CLK_FEEDBACK =>
"NONE"
,
116
CLKFX_DIVIDE =>
VCO_DIVIDE
,
117
CLKFX_MULTIPLY =>
VCO_MULTIPLY
,
118
CLKIN_DIVIDE_BY_2 => false,
119
CLKIN_PERIOD =>
CLKIN_PERIOD
,
120
CLKOUT_PHASE_SHIFT =>
"NONE"
,
121
DESKEW_ADJUST =>
"SYSTEM_SYNCHRONOUS"
,
122
DSS_MODE =>
"NONE"
,
123
STARTUP_WAIT =>
STARTUP_WAIT
)
124
port
map
(
125
CLKIN =>
CLKIN
,
126
CLKFX =>
CLKOUT0
,
127
LOCKED =>
LOCKED
128
)
;
129
130
BUFG_CLKOUT : bufg
131
port
map
(
132
I =>
CLKOUT0
,
133
O =>
CLKFX
134
)
;
135
136
end
generate
USEDCM;
137
138
end
syn;
s6_cmt_sfs.syn
Definition:
s6_cmt_sfs_unisim.vhd:45
s6_cmt_sfs.syn.CLKOUT2_UNUSED
slbit CLKOUT2_UNUSED
Definition:
s6_cmt_sfs_unisim.vhd:64
s6_cmt_sfs.syn.CLKOUT4_UNUSED
slbit CLKOUT4_UNUSED
Definition:
s6_cmt_sfs_unisim.vhd:66
s6_cmt_sfs.syn.CLKOUT3_UNUSED
slbit CLKOUT3_UNUSED
Definition:
s6_cmt_sfs_unisim.vhd:65
s6_cmt_sfs.syn.CLKOUT5_UNUSED
slbit CLKOUT5_UNUSED
Definition:
s6_cmt_sfs_unisim.vhd:67
s6_cmt_sfs.syn.CLKOUT0
slbit CLKOUT0
Definition:
s6_cmt_sfs_unisim.vhd:62
s6_cmt_sfs.syn.CLKFBOUT
slbit CLKFBOUT
Definition:
s6_cmt_sfs_unisim.vhd:61
s6_cmt_sfs.syn.CLKOUT1_UNUSED
slbit CLKOUT1_UNUSED
Definition:
s6_cmt_sfs_unisim.vhd:63
s6_cmt_sfs
Definition:
s6_cmt_sfs_gsim.vhd:28
s6_cmt_sfs.VCO_DIVIDE
VCO_DIVIDE positive := 1
Definition:
s6_cmt_sfs_gsim.vhd:30
s6_cmt_sfs.GEN_TYPE
GEN_TYPE string := "PLL"
Definition:
s6_cmt_sfs_gsim.vhd:36
s6_cmt_sfs.CLKIN_PERIOD
CLKIN_PERIOD real := 10.0
Definition:
s6_cmt_sfs_gsim.vhd:33
s6_cmt_sfs.OUT_DIVIDE
OUT_DIVIDE positive := 1
Definition:
s6_cmt_sfs_gsim.vhd:32
s6_cmt_sfs.CLKIN
in CLKIN slbit
Definition:
s6_cmt_sfs_gsim.vhd:38
s6_cmt_sfs.CLKIN_JITTER
CLKIN_JITTER real := 0.01
Definition:
s6_cmt_sfs_gsim.vhd:34
s6_cmt_sfs.STARTUP_WAIT
STARTUP_WAIT boolean := false
Definition:
s6_cmt_sfs_gsim.vhd:35
s6_cmt_sfs.VCO_MULTIPLY
VCO_MULTIPLY positive := 1
Definition:
s6_cmt_sfs_gsim.vhd:31
s6_cmt_sfs.LOCKED
out LOCKED slbit
Definition:
s6_cmt_sfs_gsim.vhd:41
s6_cmt_sfs.CLKFX
out CLKFX slbit
Definition:
s6_cmt_sfs_gsim.vhd:39
slvtypes
Definition:
slvtypes.vhd:28
slvtypes.slbit
std_logic slbit
Definition:
slvtypes.vhd:30
vlib
xlib
s6_cmt_sfs_unisim.vhd
Generated on Thu Feb 9 2023 12:41:06 for w11 - vhd by
1.9.6