-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdc1.5.tcl
executable file
·553 lines (477 loc) · 17.4 KB
/
sdc1.5.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
################################################################################
#
# Copyright 2005 (c) Synopsys, Inc.
#
################################################################################
#
# Title : SDC-parser commands declaration for SDC version 1.5
#
# : Ibna Faruque
# Updated : April 5, 2005
# Bug Fixes :
################################################################################
declare all_clocks {
}
declare all_inputs {
{-level_sensitive Flag }
{-edge_triggered Flag }
{-clock List }
} {!(param(-level_sensitive) && param(-edge_triggered))}
declare all_outputs {
{-level_sensitive Flag }
{-edge_triggered Flag }
{-clock List }
} {!(param(-level_sensitive) && param(-edge_triggered))}
declare create_clock {
{-period Float {$par>=0}}
{-name String }
{-waveform List {type_Float {length($length>=2 && ($length % 2)==0)} } }
{port_pin_list List }
{-add Flag }
} {param(-period) && (param(-name) || param(port_pin_list))}
declare create_generated_clock {
{-name String }
{-source List }
{-edges List {type_Float {length($length>=2} } }
{-divide_by Int {1 && $par>=0} }
{-multiply_by Int {1 && $par>=0} }
{-edge_shift List }
{-duty_cycle Float {$par>=0 && $par <=100} }
{-invert Flag }
{port_pin_list List }
{-add Flag }
{-master_clock List }
} {param(-source) && param(port_pin_list) && !(param(-multiply_by) && param(-divide_by))}
declare current_design {
}
declare current_instance {
{-instance String }
}
declare get_cells {
{-of_objects List }
{patterns List }
{-hierarchical Flag }
{-regexp Flag }
{-nocase Flag }
{-hsc Enum {{/} {@} {^} {#} {.} {|}}}
# { }
} {(param(patterns) && !param(-of_objects)) || \
(param(-of_objects) && !param(patterns)) || !param(patterns)}
# && !param(-hierarchical))}
# get_cell synonym for get_cells
declare get_cell {
{-of_objects List }
{patterns List }
{-hierarchical Flag }
{-regexp Flag }
{-nocase Flag }
{-hsc Enum {{/} {@} {^} {#} {.} {|}}}
# { }
} {(param(patterns) && !param(-of_objects)) || \
(param(-of_objects) && !param(patterns)) || !param(patterns)}
declare get_clocks {
{patterns List }
{-regexp Flag }
{-nocase Flag }
}
#} {param(patterns)}
declare get_clock {
{patterns List }
{-regexp Flag }
{-nocase Flag }
}
declare get_lib_cells {
{patterns List }
{-regexp Flag }
{-nocase Flag }
{-hsc Enum {{/} {@} {^} {#} {.} {|}}}
} {param(patterns)}
declare get_lib_cell {
{patterns List }
{-regexp Flag }
{-nocase Flag }
{-hsc Enum {{/} {@} {^} {#} {.} {|}}}
} {param(patterns)}
declare get_lib_pins {
{patterns List }
{-regexp Flag }
{-nocase Flag }
{-hsc Enum {{/} {@} {^} {#} {.} {|}}}
} {param(patterns)}
declare get_lib_pin {
{patterns List }
{-regexp Flag }
{-nocase Flag }
{-hsc Enum {{/} {@} {^} {#} {.} {|}}}
} {param(patterns)}
declare get_libs {
{-regexp Flag }
{-nocase Flag }
{patterns List }
}
#} {param(patterns)}
declare get_nets {
{patterns List }
{-of_objects List }
{-hierarchical Flag }
{-regexp Flag }
{-nocase Flag }
{-hsc Enum {{/} {@} {^} {#} {.} {|}}}
} {(param(patterns) && !param(-of_objects)) || \
(param(-of_objects) && !param(patterns)) || !param(patterns)}
declare get_net {
{patterns List }
{-of_objects List }
{-hierarchical Flag }
{-regexp Flag }
{-nocase Flag }
{-hsc Enum {{/} {@} {^} {#} {.} {|}}}
} {(param(patterns) && !param(-of_objects)) || \
(param(-of_objects) && !param(patterns)) || !param(patterns)}
declare get_pins {
{patterns List }
{-hierarchical Flag }
{-regexp Flag }
{-nocase Flag }
{-hsc Enum {{/} {@} {^} {#} {.} {|}}}
}
declare get_pin {
{patterns List }
{-hierarchical Flag }
{-regexp Flag }
{-nocase Flag }
{-hsc Enum {{/} {@} {^} {#} {.} {|}}}
}
declare get_ports {
{-hierarchical Flag }
{-regexp Flag }
{patterns List }
}
# } {param(patterns)}
declare get_port {
{-hierarchical Flag }
{-regexp Flag }
{patterns List }
}
# } {param(patterns)}
declare set_case_analysis {
{value Enum {0 1 rising falling zero one rise fall}}
{port_pin_list List }
} {param(value) && param(port_pin_list)}
declare set_clock_gating_check {
{-setup Float {$par>=0}}
{-hold Float {$par>=0}}
{-rise Flag }
{-fall Flag }
{-high Flag }
{-low Flag }
{object_list List }
} {(param(-setup) || param(-hold) || param(-high) || param(-low)) && \
!(param(-high) && param(-low))}
declare set_clock_latency {
{delay Float {1}}
{object_list List }
{-rise Flag }
{-fall Flag }
{-min Flag }
{-max Flag }
{-source Flag }
{-early Flag }
{-late Flag }
{-clock List }
} {param(delay) && param(object_list)}
declare set_clock_transition {
{transition Float {1}}
{clock_list List }
{-rise Flag }
{-fall Flag }
{-min Flag }
{-max Flag }
} {param(transition) && param(clock_list) && \
!(param(-rise) && param(-fall))}
declare set_clock_uncertainty {
{uncertainty Float {1}}
{-from List }
{-to List }
{-rise_to List }
{-fall_to List }
{-rise_from List }
{-fall_from List }
{-rise Flag }
{-fall Flag }
{-setup Flag }
{-hold Flag }
{object_list List }
} {param(uncertainty) && param(object_list) ^ \
(((param(-from) ^ param(-rise_from) ^ param(-fall_from))) \
&& (param(-to) ^ param(-rise_to) ^ param(-fall_to)))}
declare set_disable_timing {
{object_list List }
{-from String }
{-to String }
} {param(object_list) && \
!(param(-to) ^ param(-from))}
declare set_drive {
{resistance Float {$par>=0}}
{port_list List }
{-rise Flag }
{-fall Flag }
{-min Flag }
{-max Flag }
} {param(resistance) && param(port_list)}
declare set_driving_cell {
{-lib_cell String }
{-rise Flag }
{-fall Flag }
{-library String }
{-pin String }
{-from_pin String }
{-multiply_by Float {$par>=0}}
{-dont_scale Flag }
{-no_design_rule Flag }
{-input_transition_rise Float {$par>=0}}
{-input_transition_fall Float {$par>=0}}
{port_list List }
{-min Flag }
{-max Flag }
{-clock List }
{-clock_fall Flag }
} {param(port_list) && param(-lib_cell)}
declare set_false_path {
{-setup Flag }
{-hold Flag }
{-rise Flag }
{-fall Flag }
{-from List }
{-to List }
{-through List {dup}}
} {(param(-from) || param(-to) || param(-through)) && \
!(param(-rise) && param(-fall)) && !(param(-setup) && param(-hold))}
declare set_fanout_load {
{value Float {$par>=0}}
{port_list List }
} {param(value) && param(port_list)}
declare set_hierarchy_separator {
{hchar Enum {{/} {@} {^} {#} {.} {|}}}
} {param(hchar)}
declare set_input_delay {
{-clock List }
{-clock_fall Flag }
{-level_sensitive Flag }
{-rise Flag }
{-fall Flag }
{-min Flag }
{-max Flag }
{-add_delay Flag }
{delay_value Float {1}}
{port_pin_list List }
{-network_latency_included Flag }
{-source_latency_included Flag }
} {param(delay_value) && param(port_pin_list) && \
!((param(-clock_fall) || param(-level_sensitive)) && !param(-clock))}
declare set_input_transition {
{-rise Flag }
{-fall Flag }
{-min Flag }
{-max Flag }
{transition Float {$par>=0}}
{port_list List }
{-clock List }
{-clock_fall Flag }
} {param(transition) && param(port_list)}
declare set_load {
{-min Flag }
{-max Flag }
{-substract_pin_load Flag }
{-pin_load Flag }
{-wire_load Flag }
{value Float {$par>=0}}
{objects List }
} {param(value) && param(objects)}
declare set_logic_dc {
{port_list List }
} {param(port_list)}
declare set_logic_one {
{port_list List }
} {param(port_list)}
declare set_logic_zero {
{port_list List }
} {param(port_list)}
declare set_max_area {
{area_value Float {$par>=0}}
} {param(area_value)}
declare set_max_capacitance {
{capacitance_value Float {$par>=0}}
{object_list List }
} {param(capacitance_value) && param(object_list)}
declare set_max_delay {
{delay_value Float {1}}
{-rise Flag }
{-fall Flag }
{-from List }
{-to List }
{-through List {dup}}
} {param(delay_value) && \
!(param(-rise) && param(-fall))}
declare set_max_fanout {
{fanout_value Float {$par>=0}}
{object_list List }
} {param(fanout_value) && param(object_list)}
declare set_max_time_borrow {
{delay_value Float {$par>=0}}
{object_list List }
} {param(delay_value) && param(object_list)}
declare set_max_transition {
{transition_value Float {$par>=0}}
{-clock_path Flag }
{-fall Flag }
{-rise Flag}
{object_list List }
} {param(transition_value) && param(object_list)}
declare set_min_capacitance {
{capacitance_value Float {$par>=0}}
{object_list List }
} {param(capacitance_value) && param(object_list)}
declare set_min_delay {
{delay_value Float {1}}
{-rise Flag }
{-fall Flag }
{-from List }
{-to List }
{-through List {dup}}
} {param(delay_value) && \
!(param(-rise) && param(-fall))}
declare set_multicycle_path {
{path_multiplier Int {1}}
{-setup Flag }
{-hold Flag }
{-rise Flag }
{-fall Flag }
{-start Flag }
{-end Flag }
{-from List }
{-to List }
{-through List {dup}}
} {param(path_multiplier)}
declare set_operating_conditions {
{-analysis_type Enum {single bc_wc on_chip_variation}}
{-library List }
{-max String }
{-min String }
{-max_library List }
{-object_list List }
{-min_library List }
{condition String }
}
declare set_output_delay {
{-clock List }
{-clock_fall Flag }
{-level_sensitive Flag }
{-rise Flag }
{-fall Flag }
{-min Flag }
{-max Flag }
{-add_delay Flag }
{delay_value Float {1}}
{port_pin_list List }
{-network_latency_included Flag }
{-source_latency_included Flag }
} {param(delay_value) && param(port_pin_list) && \
!((param(-clock_fall) || param(-level_sensitive)) && !param(-clock))}
declare set_port_fanout_number {
{fanout_number Int {($par>=0) && ($par<=100000)}}
{port_list List }
} {param(fanout_number) && param(port_list)}
declare set_propagated_clock {
{object_list List }
} {param(object_list)}
declare set_resistance {
{value Float {$par>=0}}
{net_list List }
{-min Flag }
{-max Flag }
} {param(value) && param(net_list)}
declare set_wire_load_min_block_size {
{size Float {$par>=0}}
} {param(size)}
declare set_wire_load_mode {
{mode_name Enum {top enclosed segmented}}
} {param(mode_name)}
declare set_wire_load_model {
{-name String }
{-library List }
{-min Flag }
{-max Flag }
{object_list List }
} {param(-name)}
declare set_wire_load_selection_group {
{group_name String }
{-library List }
{-min Flag }
{-max Flag }
{object_list List }
} {param(group_name)}
declare set_data_check {
{-from List }
{-rise_from List }
{-fall_from List }
{-to List }
{-rise_to List }
{-fall_to List }
{-rise Flag }
{-fall Flag }
{-setup Flag }
{-hold Flag }
{-clock List }
{value Float {$par>=0} }
} {(param(-rise_from) || param(-from) || param(-fall_from)) && \
((param(-to) || param(-rise_to)) || param(-fall_to)) }
declare set_timing_derate {
{derate_value Float {$par>=0.1 } }
{object_list List }
# {derate_value Float {$par>=0.1 && $par<=2.0}}
{-min Flag }
{-max Flag }
{-early Flag }
{-late Flag }
{-clock Flag }
{-data Flag }
{-net_delay Flag }
{-cell_delay Flag }
{-cell_check Flag }
} {param(derate_value) && (param(-early) && !param(-late)) || (param(-late) && !param(-early))}
declare set_max_dynamic_power {
{power_value Float {$par>=0} }
{-unit Enum {GW MW KW W mW uW nW pW fW aW} }
} {param(power_value)}
declare set_max_leakage_power {
{power_value Float {$par>=0}}
{-unit Enum {GW MW KW W mW uW nW pW fW aW}}
} {param(power_value)}
declare set_min_porosity {
{porosity_value Float {$par>=0 && $par <=90}}
{object_list List }
} {param(porosity_value) && param(object_list)}
# register_new_type EdgeList {
# if {[sdc::check_type List $value]} {
# if {[expr {[llength $value] % 2}] || [llength $value]==0} {
# return 0
# }
#
# set startvalue -0.1
#
# foreach parv $value {
# if {[catch {expr {$parv + 1}}]} {
# return 0
# }
# if {$parv<=$startvalue} {
# return 0
# }
# set startvalue $parv
# }
#
# return 1
# } else {
# return 0
# }
# }