Skip to content

Commit

Permalink
Merge pull request The-OpenROAD-Project#169 from openroadie/master
Browse files Browse the repository at this point in the history
Update to latest OpenSTA
  • Loading branch information
openroadie authored Jun 15, 2023
2 parents ac3479b + 9e7cf8b commit 2609cc8
Show file tree
Hide file tree
Showing 73 changed files with 807 additions and 603 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ open source projects are. The copyright and develpment are exclusive to Parallax
Software. OpenSTA does not accept external code contributions.

The official git repository is located at
https://github.com/jjcherry56/OpenSTA.git. Any forks from this code
https://github.com/parallaxsw/OpenSTA.git. Any forks from this code
base have not passed extensive regression testing which is not
publicly available.

Expand All @@ -78,14 +78,14 @@ work, but these are the versions used for development.

```
from Ubuntu Xcode
18.04.1 11.3
cmake 3.10.2 3.10.2 3.16.2
clang 9.1.0 11.0.0
gcc 3.3.2 7.3.0
22.04.2 11.3
cmake 3.10.2 3.24.2 3.16.2
clang 9.1.0 14.0.3
gcc 3.3.2 11.3.0
tcl 8.4 8.6 8.6.6
swig 1.3.28 3.0.12 4.0.1
bison 1.35 3.0.4 3.5
flex 2.5.4 2.6.4 2.5.35
swig 1.3.28 4.1.0 4.0.1
bison 1.35 3.0.2 3.8.2
flex 2.5.4 2.6.4 2.6.4
```

Note that flex versions before 2.6.4 contain 'register' declarations that
Expand Down
2 changes: 1 addition & 1 deletion app/StaMain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "StaMain.hh"

#include <tcl.h>
#include <stdlib.h>
#include <cstdlib>
#include <sys/stat.h>

#include "Machine.hh"
Expand Down
2 changes: 1 addition & 1 deletion dcalc/ArnoldiDelayCalc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "ArnoldiDelayCalc.hh"

#include <stdio.h>
#include <cstdio>
#include <cmath> // abs

#include "Report.hh"
Expand Down
5 changes: 0 additions & 5 deletions dcalc/ArnoldiReduce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#include "ArnoldiReduce.hh"

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>

#include "Debug.hh"
#include "MinMax.hh"
#include "Sdc.hh"
Expand Down
4 changes: 4 additions & 0 deletions dcalc/LumpedCapDelayCalc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include "LumpedCapDelayCalc.hh"

#include <cmath> // isnan

#include "Debug.hh"
#include "Units.hh"
#include "TimingArc.hh"
Expand All @@ -29,6 +31,8 @@

namespace sta {

using std::isnan;

ArcDelayCalc *
makeLumpedCapDelayCalc(StaState *sta)
{
Expand Down
1 change: 1 addition & 0 deletions include/sta/ArcDelayCalc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include <string>

#include "MinMax.hh"
#include "LibertyClass.hh"
#include "NetworkClass.hh"
Expand Down
2 changes: 1 addition & 1 deletion include/sta/ArrayTable.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#pragma once

#include <string.h> // memcpy
#include <cstring> // memcpy
#include <vector>

#include "ObjectId.hh"
Expand Down
2 changes: 0 additions & 2 deletions include/sta/ConcreteNetwork.hh
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ public:
const char *filename(const Cell *cell) override;
Port *findPort(const Cell *cell,
const char *name) const override;
PortSeq findPortsMatching(const Cell *cell,
const PatternMatch *pattern) const override;
bool isLeaf(const Cell *cell) const override;
CellPortIterator *portIterator(const Cell *cell) const override;
CellPortBitIterator *portBitIterator(const Cell *cell) const override;
Expand Down
3 changes: 2 additions & 1 deletion include/sta/Debug.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

#pragma once

#include <stdarg.h>
#include <cstdarg>

#include "Map.hh"
#include "StringUtil.hh"

Expand Down
18 changes: 12 additions & 6 deletions include/sta/ExceptionPath.hh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public:
ExceptionThruSeq *thrus() const { return thrus_; }
ExceptionTo *to() const { return to_; }
ExceptionPt *firstPt();
bool intersectsPts(ExceptionPath *exception) const;
bool intersectsPts(ExceptionPath *exception,
const Network *network) const;
const MinMaxAll *minMax() const { return min_max_; }
virtual bool matches(const MinMax *min_max,
bool exact) const;
Expand All @@ -71,7 +72,8 @@ public:
virtual bool resetMatch(ExceptionFrom *from,
ExceptionThruSeq *thrus,
ExceptionTo *to,
const MinMaxAll *min_max);
const MinMaxAll *min_max,
const Network *network);
// The priority remains the same even though pin/clock/net/inst objects
// are added to the exceptions points during exception merging because
// only exceptions with the same priority are merged.
Expand Down Expand Up @@ -262,7 +264,8 @@ public:
virtual bool resetMatch(ExceptionFrom *from,
ExceptionThruSeq *thrus,
ExceptionTo *to,
const MinMaxAll *min_max);
const MinMaxAll *min_max,
const Network *network);
virtual int typePriority() const;
virtual bool tighterThan(ExceptionPath *exception) const;
};
Expand Down Expand Up @@ -424,7 +427,8 @@ public:
const Network *network);
ExceptionFrom *clone(const Network *network);
virtual bool isFrom() const { return true; }
bool intersectsPts(ExceptionFrom *from) const;
bool intersectsPts(ExceptionFrom *from,
const Network *network) const;
virtual int typePriority() const { return 0; }

protected:
Expand All @@ -448,7 +452,8 @@ public:
virtual bool isTo() const { return true; }
const char *asString(const Network *network) const;
const RiseFallBoth *endTransition() { return end_rf_; }
bool intersectsPts(ExceptionTo *to) const;
bool intersectsPts(ExceptionTo *to,
const Network *network) const;
virtual int typePriority() const { return 1; }
bool matches(const Pin *pin,
const ClockEdge *clk_edge,
Expand Down Expand Up @@ -511,7 +516,8 @@ public:
const Network *network) const;
virtual void mergeInto(ExceptionPt *pt,
const Network *network);
bool intersectsPts(ExceptionThru *thru) const;
bool intersectsPts(ExceptionThru *thru,
const Network *network) const;
virtual int typePriority() const { return 2; }
virtual size_t objectCount() const;
virtual void connectPinAfter(PinSet *drvrs,
Expand Down
4 changes: 4 additions & 0 deletions include/sta/GraphClass.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <limits>

#include "ObjectId.hh"
#include "Set.hh"
#include "Vector.hh"
Expand Down Expand Up @@ -45,6 +47,8 @@ typedef int DcalcAPIndex;
typedef int TagGroupIndex;
typedef Vector<GraphLoop*> GraphLoopSeq;

static constexpr int level_max = std::numeric_limits<Level>::max();

// 16,777,215 tags
static const int tag_group_index_bits = 24;
static const TagGroupIndex tag_group_index_max = (1<<tag_group_index_bits)-1;
Expand Down
1 change: 1 addition & 0 deletions include/sta/GraphDelayCalc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include <string>

#include "GraphClass.hh"
#include "DcalcAnalysisPt.hh"
#include "StaState.hh"
Expand Down
2 changes: 1 addition & 1 deletion include/sta/Machine.hh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#define vsnprint vsnprintf
#endif

#include <stddef.h> // size_t
#include <cstddef> // size_t

namespace sta {

Expand Down
2 changes: 1 addition & 1 deletion include/sta/Network.hh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public:
virtual Port *findPort(const Cell *cell,
const char *name) const = 0;
virtual PortSeq findPortsMatching(const Cell *cell,
const PatternMatch *pattern) const = 0;
const PatternMatch *pattern) const;
virtual bool isLeaf(const Cell *cell) const = 0;
virtual CellPortIterator *portIterator(const Cell *cell) const = 0;
// Iterate over port bits (expanded buses).
Expand Down
10 changes: 10 additions & 0 deletions include/sta/NetworkClass.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include <cstdint>

#include "Set.hh"
#include "Vector.hh"
#include "Iterator.hh"
Expand Down Expand Up @@ -145,6 +146,9 @@ public:
static int compare(const InstanceSet *set1,
const InstanceSet *set2,
const Network *network);
static bool intersects(const InstanceSet *set1,
const InstanceSet *set2,
const Network *network);
};

class PinSet : public Set<const Pin*, PinIdLess>
Expand All @@ -155,6 +159,9 @@ public:
static int compare(const PinSet *set1,
const PinSet *set2,
const Network *network);
static bool intersects(const PinSet *set1,
const PinSet *set2,
const Network *network);
};

class NetSet : public Set<const Net*, NetIdLess>
Expand All @@ -165,6 +172,9 @@ public:
static int compare(const NetSet *set1,
const NetSet *set2,
const Network *network);
static bool intersects(const NetSet *set1,
const NetSet *set2,
const Network *network);
};

} // namespace
1 change: 1 addition & 0 deletions include/sta/Parasitics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include <complex>

#include "StaState.hh"
#include "LibertyClass.hh"
#include "NetworkClass.hh"
Expand Down
41 changes: 23 additions & 18 deletions include/sta/ParseBus.hh
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,32 @@ parseBusName(const char *name,
// bus_name is set to null if name is not a range.
// Caller must delete returned bus_name string.
void
parseBusRange(const char *name,
const char brkt_left,
const char brkt_right,
char escape,
// Return values.
bool &is_bus,
string &bus_name,
int &from,
int &to);
parseBusName(const char *name,
const char brkt_left,
const char brkt_right,
char escape,
// Return values.
bool &is_bus,
bool &is_range,
string &bus_name,
int &from,
int &to,
bool &subscript_wild);

// brkt_lefts and brkt_rights are corresponding strings of legal
// bus brackets such as "[(<" and "])>".
void
parseBusRange(const char *name,
const char *brkts_left,
const char *brkts_right,
const char escape,
// Return values.
bool &is_bus,
string &bus_name,
int &from,
int &to);
parseBusName(const char *name,
const char *brkts_left,
const char *brkts_right,
const char escape,
// Return values.
bool &is_bus,
bool &is_range,
string &bus_name,
int &from,
int &to,
bool &subscript_wild);

// Insert escapes before ch1 and ch2 in token.
string
Expand Down
4 changes: 1 addition & 3 deletions include/sta/PathVertexRep.hh
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ public:

protected:
VertexId vertex_id_;
unsigned int tag_index_:tag_index_bits;
TagIndex tag_index_;
bool is_enum_:1;

private:
};

} // namespace
1 change: 1 addition & 0 deletions include/sta/PatternMatch.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include <string>

#include "Error.hh"

// Don't require all of tcl.h.
Expand Down
3 changes: 2 additions & 1 deletion include/sta/Report.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
#pragma once

#include <stdio.h>
#include <stdarg.h>
#include <cstdarg>
#include <string>
#include <mutex>

#include "Machine.hh" // __attribute__

struct Tcl_Interp;
Expand Down
1 change: 1 addition & 0 deletions include/sta/ReportTcl.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include <tcl.h>

#include "Report.hh"

namespace sta {
Expand Down
11 changes: 7 additions & 4 deletions include/sta/SearchClass.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <limits>

#include "Vector.hh"
#include "Set.hh"
#include "Map.hh"
Expand Down Expand Up @@ -97,7 +99,7 @@ protected:
};

typedef int PathAPIndex;
typedef unsigned TagIndex;
typedef uint32_t TagIndex;
typedef Vector<Tag*> TagSeq;
typedef Vector<MinPulseWidthCheck*> MinPulseWidthCheckSeq;
typedef Vector<MinPeriodCheck*> MinPeriodCheckSeq;
Expand All @@ -122,9 +124,10 @@ enum class ReportPathFormat { full,
json
};

static const int tag_index_bits = 24;
static const TagIndex tag_index_max = (1 << tag_index_bits) - 1;
static const TagIndex tag_index_max = std::numeric_limits<uint32_t>::max();
static const TagIndex tag_index_null = tag_index_max;
static const int path_ap_index_bit_count = 4;
static const int path_ap_index_bit_count = 8;
// One path analysis point per corner min/max.
static const int corner_count_max = (1 << path_ap_index_bit_count) / 2;

} // namespace
Loading

0 comments on commit 2609cc8

Please sign in to comment.