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 83

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 83 mikaeljf
# DQS used as clock
73
#create_clock -name {dqs_n_pad_io[0]} -period $sdram_clk_period [get_ports {dqs_n_pad_io[0]}]
74
 
75 15 mikaeljf
# Virtual clocks
76 22 mikaeljf
#create_clock -name {v_wb_clk_in}     -period $wb_clk_period
77
#create_clock -name {v_wb_clk_out}    -period $wb_clk_period
78
#create_clock -name {v_sdram_clk_in}  -period $sdram_clk_period
79
#create_clock -name {v_sdram_clk_out} -period $sdram_clk_period
80 15 mikaeljf
 
81 21 mikaeljf
 
82 15 mikaeljf
#**************************************************************
83
# Create Generated Clock
84
#**************************************************************
85
 
86 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]}]
87
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]}]
88
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]}]
89 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}]
90 15 mikaeljf
 
91
#**************************************************************
92
# Set Clock Latency
93
#**************************************************************
94
 
95
 
96
 
97
#**************************************************************
98
# Set Clock Uncertainty
99
#**************************************************************
100
 
101
derive_clock_uncertainty
102
 
103
 
104
#**************************************************************
105
# Set Input Delay
106
#**************************************************************
107 22 mikaeljf
# Double Data Rate requires constraints for both rising and falling clock edge
108
# Input max delay value = max trace delay for data + tCO of external device – min trace delay for clock
109
# Input min delay value = min trace delay for data + tCOmin of external device – max trace delay for clock
110
# Assume (for now): max trace delay for data = min trace delay for clock
111
#                   min trace delay for data = max trace delay for clock
112
# Data
113 21 mikaeljf
set_input_delay -clock {ck_pad_o} -max $tACmax             [get_ports {dq_pad_io[*]}] -add_delay
114
set_input_delay -clock {ck_pad_o} -max $tACmax -clock_fall [get_ports {dq_pad_io[*]}] -add_delay
115
set_input_delay -clock {ck_pad_o} -min $tACmin             [get_ports {dq_pad_io[*]}] -add_delay
116
set_input_delay -clock {ck_pad_o} -min $tACmin -clock_fall [get_ports {dq_pad_io[*]}] -add_delay
117 22 mikaeljf
# Data Strobe
118
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax             [get_ports {dqs_pad_io[*]}] -add_delay
119
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax -clock_fall [get_ports {dqs_pad_io[*]}] -add_delay
120
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin             [get_ports {dqs_pad_io[*]}] -add_delay
121
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin -clock_fall [get_ports {dqs_pad_io[*]}] -add_delay
122
# Data Strobe
123
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax             [get_ports {dqs_n_pad_io[*]}] -add_delay
124
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax -clock_fall [get_ports {dqs_n_pad_io[*]}] -add_delay
125
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin             [get_ports {dqs_n_pad_io[*]}] -add_delay
126
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin -clock_fall [get_ports {dqs_n_pad_io[*]}] -add_delay
127
# Data Mask
128
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax             [get_ports {dm_rdqs_pad_io[*]}] -add_delay
129
set_input_delay -clock {ck_pad_o} -max $tDQSCKmax -clock_fall [get_ports {dm_rdqs_pad_io[*]}] -add_delay
130
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin             [get_ports {dm_rdqs_pad_io[*]}] -add_delay
131
set_input_delay -clock {ck_pad_o} -min $tDQSCKmin -clock_fall [get_ports {dm_rdqs_pad_io[*]}] -add_delay
132 15 mikaeljf
 
133 22 mikaeljf
# Single Data Rate requires constraints for rising clock edge only
134 15 mikaeljf
 
135
 
136
#**************************************************************
137
# Set Output Delay
138
#**************************************************************
139 22 mikaeljf
# Double Data Rate requires constraints for both rising and falling clock edge
140
# Output max delay = max trace delay for data + tSU of external register – min trace delay for clock
141
# Output min delay = min trace delay for data – tH of external register – max trace delay for clock
142
# Assume (for now): max trace delay for data = min trace delay for clock
143
#                   min trace delay for data = max trace delay for clock
144
# Data
145
set_output_delay -clock {ck_pad_o} -max $tISa              [get_ports {dq_pad_io[*]}] -add_delay
146
set_output_delay -clock {ck_pad_o} -max $tISa  -clock_fall [get_ports {dq_pad_io[*]}] -add_delay
147
set_output_delay -clock {ck_pad_o} -min -$tIHa             [get_ports {dq_pad_io[*]}] -add_delay
148
set_output_delay -clock {ck_pad_o} -min -$tIHa -clock_fall [get_ports {dq_pad_io[*]}] -add_delay
149
# Data Strobe
150
set_output_delay -clock {ck_pad_o} -max $tISa              [get_ports {dqs_pad_io[*]}] -add_delay
151
set_output_delay -clock {ck_pad_o} -max $tISa  -clock_fall [get_ports {dqs_pad_io[*]}] -add_delay
152
set_output_delay -clock {ck_pad_o} -min -$tIHa             [get_ports {dqs_pad_io[*]}] -add_delay
153
set_output_delay -clock {ck_pad_o} -min -$tIHa -clock_fall [get_ports {dqs_pad_io[*]}] -add_delay
154
# Data Strobe
155
set_output_delay -clock {ck_pad_o} -max $tISa              [get_ports {dqs_n_pad_io[*]}] -add_delay
156
set_output_delay -clock {ck_pad_o} -max $tISa  -clock_fall [get_ports {dqs_n_pad_io[*]}] -add_delay
157
set_output_delay -clock {ck_pad_o} -min -$tIHa             [get_ports {dqs_n_pad_io[*]}] -add_delay
158
set_output_delay -clock {ck_pad_o} -min -$tIHa -clock_fall [get_ports {dqs_n_pad_io[*]}] -add_delay
159
# Data Mask
160
set_output_delay -clock {ck_pad_o} -max $tISa              [get_ports {dm_rdqs_pad_io[*]}] -add_delay
161
set_output_delay -clock {ck_pad_o} -max $tISa  -clock_fall [get_ports {dm_rdqs_pad_io[*]}] -add_delay
162
set_output_delay -clock {ck_pad_o} -min -$tIHa             [get_ports {dm_rdqs_pad_io[*]}] -add_delay
163
set_output_delay -clock {ck_pad_o} -min -$tIHa -clock_fall [get_ports {dm_rdqs_pad_io[*]}] -add_delay
164 15 mikaeljf
 
165 22 mikaeljf
# Single Data Rate requires constraints for rising clock edge only
166
# Chip Select
167
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {cs_n_pad_o}] -add_delay
168
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {cs_n_pad_o}] -add_delay
169
# Row Address Strobe
170
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {ras_pad_o}] -add_delay
171
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {ras_pad_o}] -add_delay
172
# Column Address Strobe
173
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {cas_pad_o}] -add_delay
174
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {cas_pad_o}] -add_delay
175
# Write Enable
176
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {we_pad_o}] -add_delay
177
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {we_pad_o}] -add_delay
178
# Bank Address
179
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {ba_pad_o[*]}] -add_delay
180
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {ba_pad_o[*]}] -add_delay
181
# Address
182
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {addr_pad_o[*]}] -add_delay
183
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {addr_pad_o[*]}] -add_delay
184
# Clock Enable
185
set_output_delay -clock {ck_pad_o} -max $tISa  [get_ports {cke_pad_o}] -add_delay
186
set_output_delay -clock {ck_pad_o} -min -$tIHa [get_ports {cke_pad_o}] -add_delay
187 15 mikaeljf
 
188
 
189
#**************************************************************
190
# Set Clock Groups
191
#**************************************************************
192
 
193
 
194
 
195
#**************************************************************
196
# Set False Path
197
#**************************************************************
198
 
199 20 mikaeljf
# Reset
200 81 mikaeljf
set_false_path -from [get_ports {wb_rst[*]}]
201 21 mikaeljf
 
202 20 mikaeljf
# Input Timing Exceptions
203 22 mikaeljf
# False path exceptions for opposite-edge transfer
204
# Data
205 21 mikaeljf
set_false_path -setup -fall_from [get_clocks ck_pad_o] -rise_to [get_clocks sdram_clk_270]
206
set_false_path -setup -rise_from [get_clocks ck_pad_o] -fall_to [get_clocks sdram_clk_270]
207
set_false_path -hold  -rise_from [get_clocks ck_pad_o] -fall_to [get_clocks sdram_clk_270]
208
set_false_path -hold  -fall_from [get_clocks ck_pad_o] -rise_to [get_clocks sdram_clk_270]
209 22 mikaeljf
# Data Strobe
210
#set_false_path -setup -fall_from [get_clocks ck_pad_o] -rise_to [get_clocks sdram_clk_0]
211
#set_false_path -setup -rise_from [get_clocks ck_pad_o] -fall_to [get_clocks sdram_clk_0]
212
#set_false_path -hold  -rise_from [get_clocks ck_pad_o] -fall_to [get_clocks sdram_clk_0]
213
#set_false_path -hold  -fall_from [get_clocks ck_pad_o] -rise_to [get_clocks sdram_clk_0]
214 15 mikaeljf
 
215 21 mikaeljf
# Output Timing Exceptions
216 22 mikaeljf
# False path exceptions for opposite-edge transfer
217
# Data
218 21 mikaeljf
set_false_path -setup -rise_from [get_clocks sdram_clk_270] -fall_to [get_clocks ck_pad_o]
219
set_false_path -setup -fall_from [get_clocks sdram_clk_270] -rise_to [get_clocks ck_pad_o]
220
set_false_path -hold  -rise_from [get_clocks sdram_clk_270] -rise_to [get_clocks ck_pad_o]
221
set_false_path -hold  -fall_from [get_clocks sdram_clk_270] -fall_to [get_clocks ck_pad_o]
222 22 mikaeljf
# Data Strobe
223
set_false_path -setup -rise_from [get_clocks sdram_clk_0] -fall_to [get_clocks ck_pad_o]
224
set_false_path -setup -fall_from [get_clocks sdram_clk_0] -rise_to [get_clocks ck_pad_o]
225
set_false_path -hold  -rise_from [get_clocks sdram_clk_0] -rise_to [get_clocks ck_pad_o]
226
set_false_path -hold  -fall_from [get_clocks sdram_clk_0] -fall_to [get_clocks ck_pad_o]
227 15 mikaeljf
 
228 21 mikaeljf
 
229 15 mikaeljf
#**************************************************************
230
# Set Multicycle Path
231
#**************************************************************
232
 
233
 
234
 
235
#**************************************************************
236
# Set Maximum Delay
237
#**************************************************************
238
 
239
 
240
 
241
#**************************************************************
242
# Set Minimum Delay
243
#**************************************************************
244
 
245
 
246
 
247
#**************************************************************
248
# Set Input Transition
249
#**************************************************************
250
 
251 21 mikaeljf
 

powered by: WebSVN 2.1.0

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