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

Subversion Repositories versatile_mem_ctrl

[/] [versatile_mem_ctrl/] [trunk/] [syn/] [altera/] [bin/] [versatile_memory_controller.sdc] - Blame information for rev 81

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

Line No. Rev Author Line
1 15 mikaeljf
#**************************************************************
2 22 mikaeljf
# Timimg Information for DDR2 SDRAM
3 15 mikaeljf
#**************************************************************
4 21 mikaeljf
# Timing specifications from Micron Data Sheet (DDR2 SDRAM MT47H32M16-5E)
5 15 mikaeljf
 
6 20 mikaeljf
# Clock cycle time: min=5.00ns, max=8.00ns
7 81 mikaeljf
set tCK 8.000
8 15 mikaeljf
 
9 22 mikaeljf
# Data Strobe Out
10 20 mikaeljf
# DQS output access time from CK/CK#
11
set tDQSCKmin -0.500
12
set tDQSCKmax  0.500
13
 
14 22 mikaeljf
# Data Strobe In
15
# DQS rising edge to CK rising edge
16
set tDQSSmin [expr -0.25 * $tCK]
17
set tDQSSmax [expr 0.25 * $tCK]
18
# DQS falling to CK rising: setup time
19
set tDSSmin [expr 0.2 * $tCK]
20
# DQS falling from CK rising: hold time
21
set tDSHmin [expr 0.2 * $tCK]
22
 
23
# Data Out
24 20 mikaeljf
# DQ output access time from CK/CK#
25
set tACmin -0.600
26
set tACmax  0.600
27
 
28 22 mikaeljf
# Data In
29
# DQ and DM input setup time to DQS
30
set tDSb 0.150
31
# DQ and DM input hold time to DQS
32
set tDHb 0.275
33
# DQ and DM input setup time to DQS
34
set tDSa 0.400
35
# DQ and DM input hold time to DQS
36
set tDHa 0.400
37 20 mikaeljf
 
38 22 mikaeljf
# Command and Address
39
# Input setup time
40
set tISb 0.350
41
set tISa 0.600
42
# Input hold time
43
set tIHb 0.470
44
set tIHa 0.600
45
 
46
 
47 15 mikaeljf
#**************************************************************
48 22 mikaeljf
# Timimg Information
49
#**************************************************************
50
 
51
# Trace delay for data
52
set tTDDmin 0.100
53
set tTDDmax 0.200
54
 
55
# Trace delay for clock
56
set tTDCmin  0.100
57
set tTDCmax  0.200
58
 
59
 
60
#**************************************************************
61 15 mikaeljf
# Create Clock
62
#**************************************************************
63
 
64
# Clock frequency
65
set wb_clk_period 20.000
66 20 mikaeljf
set sdram_clk_period $tCK
67 15 mikaeljf
 
68
# Clocks
69 81 mikaeljf
create_clock -name {wb_clk[*]} -period $wb_clk_period    [get_ports {wb_clk[*]}]
70 20 mikaeljf
create_clock -name {sdram_clk} -period $sdram_clk_period [get_ports {sdram_clk}]
71 15 mikaeljf
 
72
# Virtual clocks
73 22 mikaeljf
#create_clock -name {v_wb_clk_in}     -period $wb_clk_period
74
#create_clock -name {v_wb_clk_out}    -period $wb_clk_period
75
#create_clock -name {v_sdram_clk_in}  -period $sdram_clk_period
76
#create_clock -name {v_sdram_clk_out} -period $sdram_clk_period
77 15 mikaeljf
 
78 21 mikaeljf
 
79 15 mikaeljf
#**************************************************************
80
# Create Generated Clock
81
#**************************************************************
82
 
83 20 mikaeljf
create_generated_clock -name sdram_clk_0 -phase 0 -source [get_ports {sdram_clk}] [get_pins {dcm_pll_0|altpll_internal|auto_generated|pll1|clk[0]}]
84
create_generated_clock -name sdram_clk_180 -phase 180 -source [get_ports {sdram_clk}] [get_pins {dcm_pll_0|altpll_internal|auto_generated|pll1|clk[2]}]
85
create_generated_clock -name sdram_clk_270 -phase 270 -source [get_ports {sdram_clk}] [get_pins {dcm_pll_0|altpll_internal|auto_generated|pll1|clk[3]}]
86 30 mikaeljf
create_generated_clock -name ck_pad_o -phase 0 -source [get_pins {versatile_mem_ctrl_ddr_0|ddr_ff_out_ck|altddio_out_inst|auto_generated|ddio_outa[0]|clkhi}] [get_ports {ck_pad_o}]
87 15 mikaeljf
 
88
#**************************************************************
89
# Set Clock Latency
90
#**************************************************************
91
 
92
 
93
 
94
#**************************************************************
95
# Set Clock Uncertainty
96
#**************************************************************
97
 
98
derive_clock_uncertainty
99
 
100
 
101
#**************************************************************
102
# Set Input Delay
103
#**************************************************************
104 22 mikaeljf
# Double Data Rate requires constraints for both rising and falling clock edge
105
# Input max delay value = max trace delay for data + tCO of external device – min trace delay for clock
106
# Input min delay value = min trace delay for data + tCOmin of external device – max trace delay for clock
107
# Assume (for now): max trace delay for data = min trace delay for clock
108
#                   min trace delay for data = max trace delay for clock
109
# Data
110 21 mikaeljf
set_input_delay -clock {ck_pad_o} -max $tACmax             [get_ports {dq_pad_io[*]}] -add_delay
111
set_input_delay -clock {ck_pad_o} -max $tACmax -clock_fall [get_ports {dq_pad_io[*]}] -add_delay
112
set_input_delay -clock {ck_pad_o} -min $tACmin             [get_ports {dq_pad_io[*]}] -add_delay
113
set_input_delay -clock {ck_pad_o} -min $tACmin -clock_fall [get_ports {dq_pad_io[*]}] -add_delay
114 22 mikaeljf
# Data Strobe
115
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax             [get_ports {dqs_pad_io[*]}] -add_delay
116
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax -clock_fall [get_ports {dqs_pad_io[*]}] -add_delay
117
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin             [get_ports {dqs_pad_io[*]}] -add_delay
118
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin -clock_fall [get_ports {dqs_pad_io[*]}] -add_delay
119
# Data Strobe
120
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax             [get_ports {dqs_n_pad_io[*]}] -add_delay
121
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax -clock_fall [get_ports {dqs_n_pad_io[*]}] -add_delay
122
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin             [get_ports {dqs_n_pad_io[*]}] -add_delay
123
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin -clock_fall [get_ports {dqs_n_pad_io[*]}] -add_delay
124
# Data Mask
125
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax             [get_ports {dm_rdqs_pad_io[*]}] -add_delay
126
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax -clock_fall [get_ports {dm_rdqs_pad_io[*]}] -add_delay
127
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin             [get_ports {dm_rdqs_pad_io[*]}] -add_delay
128
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin -clock_fall [get_ports {dm_rdqs_pad_io[*]}] -add_delay
129 15 mikaeljf
 
130 22 mikaeljf
# Single Data Rate requires constraints for rising clock edge only
131 15 mikaeljf
 
132
 
133
#**************************************************************
134
# Set Output Delay
135
#**************************************************************
136 22 mikaeljf
# Double Data Rate requires constraints for both rising and falling clock edge
137
# Output max delay = max trace delay for data + tSU of external register – min trace delay for clock
138
# Output min delay = min trace delay for data – tH of external register – max trace delay for clock
139
# Assume (for now): max trace delay for data = min trace delay for clock
140
#                   min trace delay for data = max trace delay for clock
141
# Data
142
set_output_delay -clock {ck_pad_o} -max $tISa              [get_ports {dq_pad_io[*]}] -add_delay
143
set_output_delay -clock {ck_pad_o} -max $tISa  -clock_fall [get_ports {dq_pad_io[*]}] -add_delay
144
set_output_delay -clock {ck_pad_o} -min -$tIHa             [get_ports {dq_pad_io[*]}] -add_delay
145
set_output_delay -clock {ck_pad_o} -min -$tIHa -clock_fall [get_ports {dq_pad_io[*]}] -add_delay
146
# Data Strobe
147
set_output_delay -clock {ck_pad_o} -max $tISa              [get_ports {dqs_pad_io[*]}] -add_delay
148
set_output_delay -clock {ck_pad_o} -max $tISa  -clock_fall [get_ports {dqs_pad_io[*]}] -add_delay
149
set_output_delay -clock {ck_pad_o} -min -$tIHa             [get_ports {dqs_pad_io[*]}] -add_delay
150
set_output_delay -clock {ck_pad_o} -min -$tIHa -clock_fall [get_ports {dqs_pad_io[*]}] -add_delay
151
# Data Strobe
152
set_output_delay -clock {ck_pad_o} -max $tISa              [get_ports {dqs_n_pad_io[*]}] -add_delay
153
set_output_delay -clock {ck_pad_o} -max $tISa  -clock_fall [get_ports {dqs_n_pad_io[*]}] -add_delay
154
set_output_delay -clock {ck_pad_o} -min -$tIHa             [get_ports {dqs_n_pad_io[*]}] -add_delay
155
set_output_delay -clock {ck_pad_o} -min -$tIHa -clock_fall [get_ports {dqs_n_pad_io[*]}] -add_delay
156
# Data Mask
157
set_output_delay -clock {ck_pad_o} -max $tISa              [get_ports {dm_rdqs_pad_io[*]}] -add_delay
158
set_output_delay -clock {ck_pad_o} -max $tISa  -clock_fall [get_ports {dm_rdqs_pad_io[*]}] -add_delay
159
set_output_delay -clock {ck_pad_o} -min -$tIHa             [get_ports {dm_rdqs_pad_io[*]}] -add_delay
160
set_output_delay -clock {ck_pad_o} -min -$tIHa -clock_fall [get_ports {dm_rdqs_pad_io[*]}] -add_delay
161 15 mikaeljf
 
162 22 mikaeljf
# Single Data Rate requires constraints for rising clock edge only
163
# Chip Select
164
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {cs_n_pad_o}] -add_delay
165
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {cs_n_pad_o}] -add_delay
166
# Row Address Strobe
167
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {ras_pad_o}] -add_delay
168
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {ras_pad_o}] -add_delay
169
# Column Address Strobe
170
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {cas_pad_o}] -add_delay
171
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {cas_pad_o}] -add_delay
172
# Write Enable
173
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {we_pad_o}] -add_delay
174
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {we_pad_o}] -add_delay
175
# Bank Address
176
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {ba_pad_o[*]}] -add_delay
177
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {ba_pad_o[*]}] -add_delay
178
# Address
179
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {addr_pad_o[*]}] -add_delay
180
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {addr_pad_o[*]}] -add_delay
181
# Clock Enable
182
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {cke_pad_o}] -add_delay
183
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {cke_pad_o}] -add_delay
184 15 mikaeljf
 
185
 
186
#**************************************************************
187
# Set Clock Groups
188
#**************************************************************
189
 
190
 
191
 
192
#**************************************************************
193
# Set False Path
194
#**************************************************************
195
 
196 20 mikaeljf
# Reset
197 81 mikaeljf
set_false_path -from [get_ports {wb_rst[*]}]
198 21 mikaeljf
 
199 20 mikaeljf
# Input Timing Exceptions
200 22 mikaeljf
# False path exceptions for opposite-edge transfer
201
# Data
202 21 mikaeljf
set_false_path -setup -fall_from [get_clocks ck_pad_o] -rise_to [get_clocks sdram_clk_270]
203
set_false_path -setup -rise_from [get_clocks ck_pad_o] -fall_to [get_clocks sdram_clk_270]
204
set_false_path -hold  -rise_from [get_clocks ck_pad_o] -fall_to [get_clocks sdram_clk_270]
205
set_false_path -hold  -fall_from [get_clocks ck_pad_o] -rise_to [get_clocks sdram_clk_270]
206 22 mikaeljf
# Data Strobe
207
#set_false_path -setup -fall_from [get_clocks ck_pad_o] -rise_to [get_clocks sdram_clk_0]
208
#set_false_path -setup -rise_from [get_clocks ck_pad_o] -fall_to [get_clocks sdram_clk_0]
209
#set_false_path -hold  -rise_from [get_clocks ck_pad_o] -fall_to [get_clocks sdram_clk_0]
210
#set_false_path -hold  -fall_from [get_clocks ck_pad_o] -rise_to [get_clocks sdram_clk_0]
211 15 mikaeljf
 
212 21 mikaeljf
# Output Timing Exceptions
213 22 mikaeljf
# False path exceptions for opposite-edge transfer
214
# Data
215 21 mikaeljf
set_false_path -setup -rise_from [get_clocks sdram_clk_270] -fall_to [get_clocks ck_pad_o]
216
set_false_path -setup -fall_from [get_clocks sdram_clk_270] -rise_to [get_clocks ck_pad_o]
217
set_false_path -hold  -rise_from [get_clocks sdram_clk_270] -rise_to [get_clocks ck_pad_o]
218
set_false_path -hold  -fall_from [get_clocks sdram_clk_270] -fall_to [get_clocks ck_pad_o]
219 22 mikaeljf
# Data Strobe
220
set_false_path -setup -rise_from [get_clocks sdram_clk_0] -fall_to [get_clocks ck_pad_o]
221
set_false_path -setup -fall_from [get_clocks sdram_clk_0] -rise_to [get_clocks ck_pad_o]
222
set_false_path -hold  -rise_from [get_clocks sdram_clk_0] -rise_to [get_clocks ck_pad_o]
223
set_false_path -hold  -fall_from [get_clocks sdram_clk_0] -fall_to [get_clocks ck_pad_o]
224 15 mikaeljf
 
225 21 mikaeljf
 
226 15 mikaeljf
#**************************************************************
227
# Set Multicycle Path
228
#**************************************************************
229
 
230
 
231
 
232
#**************************************************************
233
# Set Maximum Delay
234
#**************************************************************
235
 
236
 
237
 
238
#**************************************************************
239
# Set Minimum Delay
240
#**************************************************************
241
 
242
 
243
 
244
#**************************************************************
245
# Set Input Transition
246
#**************************************************************
247
 
248 21 mikaeljf
 

powered by: WebSVN 2.1.0

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