forked from The-OpenROAD-Project/OpenSTA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sta.cc
5712 lines (5164 loc) · 130 KB
/
Sta.cc
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
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2023, Parallax Software, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "Sta.hh"
#include "Machine.hh"
#include "DispatchQueue.hh"
#include "ReportTcl.hh"
#include "Debug.hh"
#include "Stats.hh"
#include "Fuzzy.hh"
#include "Units.hh"
#include "TimingArc.hh"
#include "FuncExpr.hh"
#include "EquivCells.hh"
#include "Liberty.hh"
#include "liberty/LibertyReader.hh"
#include "LibertyWriter.hh"
#include "SdcNetwork.hh"
#include "MakeConcreteNetwork.hh"
#include "PortDirection.hh"
#include "VerilogReader.hh"
#include "Graph.hh"
#include "GraphCmp.hh"
#include "Sdc.hh"
#include "WriteSdc.hh"
#include "ExceptionPath.hh"
#include "MakeConcreteParasitics.hh"
#include "Parasitics.hh"
#include "parasitics/SpefReader.hh"
#include "parasitics/ReportParasiticAnnotation.hh"
#include "DelayCalc.hh"
#include "ArcDelayCalc.hh"
#include "dcalc/GraphDelayCalc1.hh"
#include "sdf/SdfWriter.hh"
#include "Levelize.hh"
#include "Sim.hh"
#include "ClkInfo.hh"
#include "TagGroup.hh"
#include "PathAnalysisPt.hh"
#include "Corner.hh"
#include "Search.hh"
#include "Latches.hh"
#include "PathGroup.hh"
#include "CheckTiming.hh"
#include "CheckSlewLimits.hh"
#include "CheckFanoutLimits.hh"
#include "CheckCapacitanceLimits.hh"
#include "CheckMinPulseWidths.hh"
#include "CheckMinPeriods.hh"
#include "CheckMaxSkews.hh"
#include "ClkSkew.hh"
#include "FindRegister.hh"
#include "ReportPath.hh"
#include "VisitPathGroupVertices.hh"
#include "Genclks.hh"
#include "ClkNetwork.hh"
#include "power/Power.hh"
#include "VisitPathEnds.hh"
#include "PathExpanded.hh"
#include "MakeTimingModel.hh"
namespace sta {
using std::min;
using std::max;
static const ClockEdge *clk_edge_wildcard = reinterpret_cast<ClockEdge*>(1);
static bool
libertyPortCapsEqual(const LibertyPort *port1,
const LibertyPort *port2);
static bool
hasDisabledArcs(Edge *edge,
Graph *graph);
static InstanceSet
pinInstances(PinSet &pins,
const Network *network);
////////////////////////////////////////////////////////////////
//
// Observers are used to propagate updates from a component
// to other components.
//
////////////////////////////////////////////////////////////////
// When an incremental change is made the delay calculation
// changes downstream. This invalidates the required times
// for all vertices upstream of the changes.
class StaDelayCalcObserver : public DelayCalcObserver
{
public:
explicit StaDelayCalcObserver(Search *search);
virtual void delayChangedFrom(Vertex *vertex);
virtual void delayChangedTo(Vertex *vertex);
virtual void checkDelayChangedTo(Vertex *vertex);
private:
Search *search_;
};
StaDelayCalcObserver::StaDelayCalcObserver(Search *search) :
DelayCalcObserver(),
search_(search)
{
}
void
StaDelayCalcObserver::delayChangedFrom(Vertex *vertex)
{
search_->requiredInvalid(vertex);
}
void
StaDelayCalcObserver::delayChangedTo(Vertex *vertex)
{
search_->arrivalInvalid(vertex);
}
void
StaDelayCalcObserver::checkDelayChangedTo(Vertex *vertex)
{
search_->requiredInvalid(vertex);
}
////////////////////////////////////////////////////////////////
class StaSimObserver : public SimObserver
{
public:
StaSimObserver(GraphDelayCalc *graph_delay_calc,
Levelize *levelize,
Search *search);
virtual void valueChangeAfter(Vertex *vertex);
virtual void faninEdgesChangeAfter(Vertex *vertex);
virtual void fanoutEdgesChangeAfter(Vertex *vertex);
private:
GraphDelayCalc *graph_delay_calc_;
Levelize *levelize_;
Search *search_;
};
StaSimObserver::StaSimObserver(GraphDelayCalc *graph_delay_calc,
Levelize *levelize,
Search *search) :
SimObserver(),
graph_delay_calc_(graph_delay_calc),
levelize_(levelize),
search_(search)
{
}
// When pins with constant values are incrementally connected to a net
// the downstream delays and arrivals will not be updated (removed)
// because the search predicate does not search through constants.
// This observer makes sure the delays and arrivals are invalidated.
void
StaSimObserver::valueChangeAfter(Vertex *vertex)
{
graph_delay_calc_->delayInvalid(vertex);
search_->arrivalInvalid(vertex);
search_->requiredInvalid(vertex);
search_->endpointInvalid(vertex);
levelize_->invalidFrom(vertex);
}
void
StaSimObserver::faninEdgesChangeAfter(Vertex *vertex)
{
graph_delay_calc_->delayInvalid(vertex);
search_->arrivalInvalid(vertex);
search_->endpointInvalid(vertex);
}
void
StaSimObserver::fanoutEdgesChangeAfter(Vertex *vertex)
{
search_->requiredInvalid(vertex);
search_->endpointInvalid(vertex);
}
////////////////////////////////////////////////////////////////
class StaLevelizeObserver : public LevelizeObserver
{
public:
StaLevelizeObserver(Search *search);
virtual void levelChangedBefore(Vertex *vertex);
private:
Search *search_;
};
StaLevelizeObserver::StaLevelizeObserver(Search *search) :
search_(search)
{
}
void
StaLevelizeObserver::levelChangedBefore(Vertex *vertex)
{
search_->levelChangedBefore(vertex);
}
////////////////////////////////////////////////////////////////
void
initSta()
{
initElapsedTime();
TimingRole::init();
PortDirection::init();
initTmpStrings();
initLiberty();
initDelayConstants();
registerDelayCalcs();
initPathSenseThru();
}
void
deleteAllMemory()
{
// Verilog modules refer to the network in the sta so it has
// to deleted before the sta.
deleteVerilogReader();
Sta *sta = Sta::sta();
if (sta) {
delete sta;
Sta::setSta(nullptr);
}
deleteDelayCalcs();
deleteTmpStrings();
TimingRole::destroy();
PortDirection::destroy();
deleteLiberty();
}
////////////////////////////////////////////////////////////////
// Singleton used by TCL commands.
Sta *Sta::sta_;
Sta::Sta() :
StaState(),
current_instance_(nullptr),
check_timing_(nullptr),
check_slew_limits_(nullptr),
check_fanout_limits_(nullptr),
check_capacitance_limits_(nullptr),
check_min_pulse_widths_(nullptr),
check_min_periods_(nullptr),
check_max_skews_(nullptr),
clk_skews_(nullptr),
report_path_(nullptr),
power_(nullptr),
link_make_black_boxes_(true),
update_genclks_(false),
equiv_cells_(nullptr),
graph_sdc_annotated_(false),
// Default to same parasitics for each corner min/max.
parasitics_per_corner_(false),
parasitics_per_min_max_(false)
{
}
void
Sta::makeComponents()
{
makeReport();
makeDebug();
makeUnits();
makeNetwork();
makeSdc();
makeLevelize();
makeParasitics();
makeCorners();
makeArcDelayCalc();
makeGraphDelayCalc();
makeSim();
makeSearch();
makeLatches();
makeClkNetwork();
makeSdcNetwork();
makeReportPath();
makePower();
setCmdNamespace1(CmdNamespace::sdc);
setThreadCount1(defaultThreadCount());
updateComponentsState();
makeObservers();
// This must follow updateComponentsState.
makeParasiticAnalysisPts();
}
void
Sta::makeObservers()
{
graph_delay_calc_->setObserver(new StaDelayCalcObserver(search_));
sim_->setObserver(new StaSimObserver(graph_delay_calc_, levelize_, search_));
levelize_->setObserver(new StaLevelizeObserver(search_));
}
int
Sta::defaultThreadCount() const
{
return 1;
}
void
Sta::setThreadCount(int thread_count)
{
setThreadCount1(thread_count);
updateComponentsState();
}
void
Sta::setThreadCount1(int thread_count)
{
thread_count_ = thread_count;
if (dispatch_queue_)
dispatch_queue_->setThreadCount(thread_count);
else if (thread_count > 1)
dispatch_queue_ = new DispatchQueue(thread_count);
}
void
Sta::updateComponentsState()
{
network_->copyState(this);
cmd_network_->copyState(this);
sdc_network_->copyState(this);
if (graph_)
graph_->copyState(this);
sdc_->copyState(this);
corners_->copyState(this);
levelize_->copyState(this);
parasitics_->copyState(this);
if (arc_delay_calc_)
arc_delay_calc_->copyState(this);
sim_->copyState(this);
search_->copyState(this);
latches_->copyState(this);
graph_delay_calc_->copyState(this);
report_path_->copyState(this);
if (check_timing_)
check_timing_->copyState(this);
clk_network_->copyState(this);
if (power_)
power_->copyState(this);
}
void
Sta::makeReport()
{
report_ = new ReportTcl();
}
void
Sta::makeDebug()
{
debug_ = new Debug(report_);
}
void
Sta::makeUnits()
{
units_ = new Units();
}
void
Sta::makeNetwork()
{
network_ = makeConcreteNetwork();
}
void
Sta::makeSdc()
{
sdc_ = new Sdc(this);
}
void
Sta::makeLevelize()
{
levelize_ = new Levelize(this);
}
void
Sta::makeParasitics()
{
parasitics_ = makeConcreteParasitics(this);
}
void
Sta::makeArcDelayCalc()
{
arc_delay_calc_ = makeDelayCalc("dmp_ceff_elmore", this);
}
void
Sta::makeGraphDelayCalc()
{
graph_delay_calc_ = new GraphDelayCalc1(this);
}
void
Sta::makeSim()
{
sim_ = new Sim(this);
}
void
Sta::makeSearch()
{
search_ = new Search(this);
}
void
Sta::makeLatches()
{
latches_ = new Latches(this);
}
void
Sta::makeSdcNetwork()
{
sdc_network_ = sta::makeSdcNetwork(network_);
}
void
Sta::makeCheckTiming()
{
check_timing_ = new CheckTiming(this);
}
void
Sta::makeCheckSlewLimits()
{
check_slew_limits_ = new CheckSlewLimits(this);
}
void
Sta::makeCheckFanoutLimits()
{
check_fanout_limits_ = new CheckFanoutLimits(this);
}
void
Sta::makeCheckCapacitanceLimits()
{
check_capacitance_limits_ = new CheckCapacitanceLimits(this);
}
void
Sta::makeCheckMinPulseWidths()
{
check_min_pulse_widths_ = new CheckMinPulseWidths(this);
}
void
Sta::makeCheckMinPeriods()
{
check_min_periods_ = new CheckMinPeriods(this);
}
void
Sta::makeCheckMaxSkews()
{
check_max_skews_ = new CheckMaxSkews(this);
}
void
Sta::makeReportPath()
{
report_path_ = new ReportPath(this);
}
void
Sta::makeClkNetwork()
{
clk_network_ = new ClkNetwork(this);
}
void
Sta::makePower()
{
power_ = new Power(this);
}
void
Sta::setSta(Sta *sta)
{
sta_ = sta;
}
Sta *
Sta::sta()
{
return sta_;
}
Sta::~Sta()
{
// Delete "top down" to minimize chance of referencing deleted memory.
delete check_slew_limits_;
delete check_fanout_limits_;
delete check_capacitance_limits_;
delete check_min_pulse_widths_;
delete check_min_periods_;
delete check_max_skews_;
delete clk_skews_;
delete check_timing_;
delete report_path_;
// Constraints reference search filter, so delete search first.
delete search_;
delete latches_;
delete parasitics_;
if (arc_delay_calc_)
delete arc_delay_calc_;
delete graph_delay_calc_;
delete sim_;
delete levelize_;
delete sdc_;
delete corners_;
delete graph_;
delete sdc_network_;
delete network_;
delete debug_;
delete units_;
delete report_;
delete clk_network_;
delete power_;
delete equiv_cells_;
delete dispatch_queue_;
}
void
Sta::clear()
{
clkPinsInvalid();
// Constraints reference search filter, so clear search first.
search_->clear();
sdc_->clear();
graph_sdc_annotated_ = false;
// corners are NOT cleared because they are used to index liberty files.
levelize_->clear();
if (parasitics_)
parasitics_->clear();
graph_delay_calc_->clear();
sim_->clear();
if (check_min_pulse_widths_)
check_min_pulse_widths_->clear();
if (check_min_periods_)
check_min_periods_->clear();
delete graph_;
graph_ = nullptr;
current_instance_ = nullptr;
// Notify components that graph is toast.
updateComponentsState();
}
void
Sta::networkChanged()
{
// Everything else from clear().
search_->clear();
levelize_->clear();
if (parasitics_)
parasitics_->clear();
graph_delay_calc_->clear();
sim_->clear();
if (check_min_pulse_widths_)
check_min_pulse_widths_->clear();
if (check_min_periods_)
check_min_periods_->clear();
delete graph_;
graph_ = nullptr;
graph_sdc_annotated_ = false;
current_instance_ = nullptr;
updateComponentsState();
}
void
Sta::setTclInterp(Tcl_Interp *interp)
{
tcl_interp_ = interp;
report_->setTclInterp(interp);
}
Tcl_Interp *
Sta::tclInterp()
{
return tcl_interp_;
}
CmdNamespace
Sta::cmdNamespace()
{
return cmd_namespace_;
}
void
Sta::setCmdNamespace(CmdNamespace namespc)
{
setCmdNamespace1(namespc);
updateComponentsState();
}
void
Sta::setCmdNamespace1(CmdNamespace namespc)
{
cmd_namespace_ = namespc;
switch (cmd_namespace_) {
case CmdNamespace::sta:
cmd_network_ = network_;
break;
case CmdNamespace::sdc:
cmd_network_ = sdc_network_;
break;
}
}
Instance *
Sta::currentInstance() const
{
if (current_instance_ == nullptr)
return network_->topInstance();
else
return current_instance_;
}
void
Sta::setCurrentInstance(Instance *inst)
{
current_instance_ = inst;
}
////////////////////////////////////////////////////////////////
LibertyLibrary *
Sta::readLiberty(const char *filename,
Corner *corner,
const MinMaxAll *min_max,
bool infer_latches)
{
Stats stats(debug_, report_);
LibertyLibrary *library = readLibertyFile(filename, corner, min_max,
infer_latches);
if (library
// The default library is the first library read.
// This corresponds to a link_path of '*'.
&& network_->defaultLibertyLibrary() == nullptr) {
network_->setDefaultLibertyLibrary(library);
// Set units from default (first) library.
*units_ = *library->units();
}
stats.report("Read liberty");
return library;
}
LibertyLibrary *
Sta::readLibertyFile(const char *filename,
Corner *corner,
const MinMaxAll *min_max,
bool infer_latches)
{
LibertyLibrary *liberty = sta::readLibertyFile(filename, infer_latches,
network_);
if (liberty) {
// Don't map liberty cells if they are redefined by reading another
// library with the same cell names.
if (min_max == MinMaxAll::all()) {
readLibertyAfter(liberty, corner, MinMax::min());
readLibertyAfter(liberty, corner, MinMax::max());
}
else
readLibertyAfter(liberty, corner, min_max->asMinMax());
network_->readLibertyAfter(liberty);
}
return liberty;
}
LibertyLibrary *
Sta::readLibertyFile(const char *filename,
bool infer_latches)
{
return sta::readLibertyFile(filename, infer_latches, network_);
}
void
Sta::readLibertyAfter(LibertyLibrary *liberty,
Corner *corner,
const MinMax *min_max)
{
corner->addLiberty(liberty, min_max);
LibertyLibrary::makeCornerMap(liberty, corner->libertyIndex(min_max),
network_, report_);
}
bool
Sta::setMinLibrary(const char *min_filename,
const char *max_filename)
{
LibertyLibrary *max_lib = network_->findLibertyFilename(max_filename);
if (max_lib) {
LibertyLibrary *min_lib = readLibertyFile(min_filename, cmd_corner_,
MinMaxAll::min(), false);
return min_lib != nullptr;
}
else
return false;
}
void
Sta::readNetlistBefore()
{
clear();
NetworkReader *network_reader = networkReader();
if (network_reader)
network_reader->readNetlistBefore();
}
bool
Sta::linkDesign(const char *top_cell_name)
{
clear();
Stats stats(debug_, report_);
bool status = network_->linkNetwork(top_cell_name,
link_make_black_boxes_,
report_);
stats.report("Link");
return status;
}
bool
Sta::linkMakeBlackBoxes() const
{
return link_make_black_boxes_;
}
void
Sta::setLinkMakeBlackBoxes(bool make)
{
link_make_black_boxes_ = make;
}
////////////////////////////////////////////////////////////////
void
Sta::setDebugLevel(const char *what,
int level)
{
debug_->setLevel(what, level);
}
////////////////////////////////////////////////////////////////
void
Sta::setAnalysisType(AnalysisType analysis_type)
{
if (analysis_type != sdc_->analysisType()) {
sdc_->setAnalysisType(analysis_type);
graph_delay_calc_->delaysInvalid();
search_->arrivalsInvalid();
search_->deletePathGroups();
corners_->analysisTypeChanged();
if (graph_)
graph_->setDelayCount(corners_->dcalcAnalysisPtCount());
}
}
OperatingConditions *
Sta::operatingConditions(const MinMax *min_max) const
{
return sdc_->operatingConditions(min_max);
}
void
Sta::setOperatingConditions(OperatingConditions *op_cond,
const MinMaxAll *min_max)
{
sdc_->setOperatingConditions(op_cond, min_max);
corners_->operatingConditionsChanged();
graph_delay_calc_->delaysInvalid();
search_->arrivalsInvalid();
}
const Pvt *
Sta::pvt(Instance *inst,
const MinMax *min_max)
{
return sdc_->pvt(inst, min_max);
}
void
Sta::setPvt(Instance *inst,
const MinMaxAll *min_max,
float process,
float voltage,
float temperature)
{
Pvt pvt(process, voltage, temperature);
setPvt(inst, min_max, pvt);
}
void
Sta::setPvt(const Instance *inst,
const MinMaxAll *min_max,
const Pvt &pvt)
{
sdc_->setPvt(inst, min_max, pvt);
delaysInvalidFrom(inst);
}
void
Sta::setTimingDerate(TimingDerateType type,
PathClkOrData clk_data,
const RiseFallBoth *rf,
const EarlyLate *early_late,
float derate)
{
sdc_->setTimingDerate(type, clk_data, rf, early_late, derate);
// Delay calculation results are still valid.
// The search derates delays while finding arrival times.
search_->arrivalsInvalid();
}
void
Sta::setTimingDerate(const Net *net,
PathClkOrData clk_data,
const RiseFallBoth *rf,
const EarlyLate *early_late,
float derate)
{
sdc_->setTimingDerate(net, clk_data, rf, early_late, derate);
// Delay calculation results are still valid.
// The search derates delays while finding arrival times.
search_->arrivalsInvalid();
}
void
Sta::setTimingDerate(const Instance *inst,
TimingDerateCellType type,
PathClkOrData clk_data,
const RiseFallBoth *rf,
const EarlyLate *early_late,
float derate)
{
sdc_->setTimingDerate(inst, type, clk_data, rf, early_late, derate);
// Delay calculation results are still valid.
// The search derates delays while finding arrival times.
search_->arrivalsInvalid();
}
void
Sta::setTimingDerate(const LibertyCell *cell,
TimingDerateCellType type,
PathClkOrData clk_data,
const RiseFallBoth *rf,
const EarlyLate *early_late,
float derate)
{
sdc_->setTimingDerate(cell, type, clk_data, rf, early_late, derate);
// Delay calculation results are still valid.
// The search derates delays while finding arrival times.
search_->arrivalsInvalid();
}
void
Sta::unsetTimingDerate()
{
sdc_->unsetTimingDerate();
// Delay calculation results are still valid.
// The search derates delays while finding arrival times.
search_->arrivalsInvalid();
}
void
Sta::setInputSlew(const Port *port,
const RiseFallBoth *rf,
const MinMaxAll *min_max,
float slew)
{
sdc_->setInputSlew(port, rf, min_max, slew);
delaysInvalidFrom(port);
}
void
Sta::setDriveCell(const LibertyLibrary *library,
const LibertyCell *cell,
const Port *port,
const LibertyPort *from_port,
float *from_slews,
const LibertyPort *to_port,
const RiseFallBoth *rf,
const MinMaxAll *min_max)
{
sdc_->setDriveCell(library, cell, port, from_port, from_slews, to_port,
rf, min_max);
delaysInvalidFrom(port);
}
void
Sta::setDriveResistance(const Port *port,
const RiseFallBoth *rf,
const MinMaxAll *min_max,
float res)
{
sdc_->setDriveResistance(port, rf, min_max, res);
delaysInvalidFrom(port);
}
void
Sta::setLatchBorrowLimit(const Pin *pin,
float limit)
{
sdc_->setLatchBorrowLimit(pin, limit);
search_->requiredInvalid(pin);
}
void
Sta::setLatchBorrowLimit(const Instance *inst,
float limit)
{
sdc_->setLatchBorrowLimit(inst, limit);
search_->requiredInvalid(inst);
}
void
Sta::setLatchBorrowLimit(const Clock *clk,
float limit)
{
sdc_->setLatchBorrowLimit(clk, limit);
search_->arrivalsInvalid();
}
void
Sta::setMinPulseWidth(const RiseFallBoth *rf,
float min_width)
{
sdc_->setMinPulseWidth(rf, min_width);
}
void
Sta::setMinPulseWidth(const Pin *pin,
const RiseFallBoth *rf,
float min_width)
{
sdc_->setMinPulseWidth(pin, rf, min_width);
}
void
Sta::setMinPulseWidth(const Instance *inst,
const RiseFallBoth *rf,
float min_width)
{
sdc_->setMinPulseWidth(inst, rf, min_width);
}
void
Sta::setMinPulseWidth(const Clock *clk,
const RiseFallBoth *rf,
float min_width)
{
sdc_->setMinPulseWidth(clk, rf, min_width);
}
void
Sta::setWireloadMode(WireloadMode mode)
{
sdc_->setWireloadMode(mode);
graph_delay_calc_->delaysInvalid();
search_->arrivalsInvalid();
}
void
Sta::setWireload(Wireload *wireload,
const MinMaxAll *min_max)
{
sdc_->setWireload(wireload, min_max);
graph_delay_calc_->delaysInvalid();
search_->arrivalsInvalid();
}
void
Sta::setWireloadSelection(WireloadSelection *selection,