File: StaState.hh

package info (click to toggle)
opensta 0~20191111gitc018cb2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 5,116 kB
  • sloc: cpp: 99,117; tcl: 8,530; yacc: 1,435; lex: 894; makefile: 541; sh: 107
file content (127 lines) | stat: -rw-r--r-- 4,105 bytes parent folder | download
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
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2019, 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/>.

#ifndef STA_STA_STATE_H
#define STA_STA_STATE_H

#include "DisallowCopyAssign.hh"

namespace sta {

class Report;
class Debug;
class Units;
class Network;
class NetworkEdit;
class NetworkReader;
class Sdc;
class Corners;
class Graph;
class Levelize;
class Sim;
class Search;
class Parasitics;
class ArcDelayCalc;
class GraphDelayCalc;
class Latches;
class DispatchQueue;

// Most STA components use functionality in other components.
// This class simplifies the process of copying pointers to the
// components.  It is deliberately simple to minimize circular
// dependencies between the it and the components.
class StaState
{
public:
  // Make an empty state.
  StaState();
  explicit StaState(const StaState *sta);
  // Copy the state from sta.  This is virtual so that a component
  // can notify sub-components.
  virtual void copyState(const StaState *sta);
  virtual ~StaState() {}
  Report *report() { return report_; }
  Report *report() const { return report_; }
  void setReport(Report *report);
  Debug *debug() { return debug_; }
  Debug *debug() const { return debug_; }
  void setDebug(Debug *debug);
  Units *units() { return units_; }
  Units *units() const { return units_; }
  Network *network() { return network_; }
  Network *network() const { return network_; }
  NetworkEdit *networkEdit();
  NetworkEdit *networkEdit() const;
  NetworkReader *networkReader();
  NetworkReader *networkReader() const;
  Network *sdcNetwork() { return sdc_network_; }
  Network *sdcNetwork() const { return sdc_network_; }
  // Command network uses the SDC namespace.
  Network *cmdNetwork() { return cmd_network_; }
  Network *cmdNetwork() const { return cmd_network_; }
  Sdc *sdc() { return sdc_; }
  Sdc *sdc() const { return sdc_; }
  Corners *corners() { return corners_; }
  Corners *corners() const { return corners_; }
  Graph *graph() { return graph_; }
  Graph *graph() const { return graph_; }
  Levelize *levelize() { return levelize_; }
  Levelize *levelize() const { return levelize_; }
  Parasitics *parasitics() { return parasitics_; }
  Parasitics *parasitics() const { return parasitics_; }
  ArcDelayCalc *arcDelayCalc() { return arc_delay_calc_; }
  ArcDelayCalc *arcDelayCalc() const { return arc_delay_calc_; }
  GraphDelayCalc *graphDelayCalc() { return graph_delay_calc_; }
  GraphDelayCalc *graphDelayCalc() const { return graph_delay_calc_; }
  Sim *sim() { return sim_; }
  Sim *sim() const { return sim_; }
  Search *search() { return search_; }
  Search *search() const { return search_; }
  Latches *latches() { return latches_; }
  Latches *latches() const { return latches_; }
  unsigned threadCount() const { return thread_count_; }
  bool pocvEnabled() const { return pocv_enabled_; }
  float sigmaFactor() const { return sigma_factor_; }

protected:
  Report *report_;
  Debug *debug_;
  Units *units_;
  Network *network_;
  Network *sdc_network_;
  // Network used by command interpreter (SdcNetwork).
  Network *cmd_network_;
  Sdc *sdc_;
  Corners *corners_;
  Graph *graph_;
  Levelize *levelize_;
  Parasitics *parasitics_;
  ArcDelayCalc *arc_delay_calc_;
  GraphDelayCalc *graph_delay_calc_;
  Sim *sim_;
  Search *search_;
  Latches *latches_;
  int thread_count_;
  DispatchQueue *dispatch_queue_;
  bool pocv_enabled_;
  float sigma_factor_;

private:
  DISALLOW_COPY_AND_ASSIGN(StaState);
};

} // namespace
#endif