Skip to content

Commit

Permalink
Merge branch 'parallaxsw:master' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
akashlevy authored Oct 25, 2024
2 parents 14811a1 + 21a62eb commit 87e29f9
Show file tree
Hide file tree
Showing 13 changed files with 368 additions and 445 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ https://github.com/parallaxsw/OpenSTA.git. Any forks from this code
base have not passed extensive regression testing which is not
publicly available.

## Build
## Build from source

OpenSTA is built with CMake.

Expand Down Expand Up @@ -187,6 +187,25 @@ If you make changes to `CMakeLists.txt` you may need to clean out
existing CMake cached variable values by deleting all of the
files in the build directory.

## Build with Docker

An alternative way to build and run OpenSTA is with
[Docker](https://www.docker.com). After installing Docker, the
following command builds a Docker image.

```
cd OpenSTA
docker build --file Dockerfile.ubuntu_22.04 --tag OpenSTA .
```

To run a docker container using the OpenSTA image, use the -v option
to docker to mount direcories with data to use and -i to run
interactively.

```
docker run -i -v $HOME:/data OpenSTA
```

## Bug Reports

Use the Issues tab on the github repository to report bugs.
Expand Down
438 changes: 215 additions & 223 deletions doc/messages.txt

Large diffs are not rendered by default.

30 changes: 8 additions & 22 deletions include/sta/Liberty.hh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ enum class ClockGateType { none, latch_posedge, latch_negedge, other };

enum class DelayModelType { cmos_linear, cmos_pwl, cmos2, table, polynomial, dcm };

enum class ScanSignalType { enable, enable_inverted, clock, clock_a, clock_b,
input, input_inverted, output, output_inverted, none };

enum class ScaleFactorPvt { process, volt, temp, unknown };
constexpr int scale_factor_pvt_count = int(ScaleFactorPvt::unknown) + 1;

Expand Down Expand Up @@ -691,6 +694,8 @@ public:
LibertyPort *findLibertyBusBit(int index) const;
BusDcl *busDcl() const { return bus_dcl_; }
void setDirection(PortDirection *dir);
ScanSignalType scanSignalType() const { return scan_signal_type_; }
void setScanSignalType(ScanSignalType type);
void fanoutLoad(// Return values.
float &fanout_load,
bool &exists) const;
Expand Down Expand Up @@ -861,6 +866,7 @@ protected:
LibertyCell *liberty_cell_;
BusDcl *bus_dcl_;
FuncExpr *function_;
ScanSignalType scan_signal_type_;
FuncExpr *tristate_enable_;
ScaledPortMap *scaled_ports_;
RiseFallMinMax capacitance_;
Expand Down Expand Up @@ -1080,32 +1086,12 @@ protected:
TableAxisPtr axis3_;
};

class TestCell
class TestCell : public LibertyCell
{
public:
TestCell();
TestCell(LibertyPort *data_in,
LibertyPort *scan_in,
LibertyPort *scan_enable,
LibertyPort *scan_out,
LibertyPort *scan_out_inv);
LibertyPort *dataIn() const { return data_in_; }
void setDataIn(LibertyPort *port);
LibertyPort *scanIn() const { return scan_in_; }
void setScanIn(LibertyPort *port);
LibertyPort *scanEnable() const { return scan_enable_; }
void setScanEnable(LibertyPort *port);
LibertyPort *scanOut() const { return scan_out_; }
void setScanOut(LibertyPort *port);
LibertyPort *scanOutInv() const { return scan_out_inv_; }
void setScanOutInv(LibertyPort *port);
TestCell(LibertyCell *cell);

protected:
LibertyPort *data_in_;
LibertyPort *scan_in_;
LibertyPort *scan_enable_;
LibertyPort *scan_out_;
LibertyPort *scan_out_inv_;
};

class OcvDerate
Expand Down
1 change: 0 additions & 1 deletion include/sta/LibertyClass.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class OperatingConditions;
class BusDcl;
class ModeDef;
class ModeValueDef;
class TestCell;
class TableTemplate;
class Table;
class TableModel;
Expand Down
58 changes: 9 additions & 49 deletions liberty/Liberty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2075,6 +2075,7 @@ LibertyPort::LibertyPort(LibertyCell *cell,
liberty_cell_(cell),
bus_dcl_(bus_dcl),
function_(nullptr),
scan_signal_type_(ScanSignalType::none),
tristate_enable_(nullptr),
scaled_ports_(nullptr),
fanout_load_(0.0),
Expand Down Expand Up @@ -2132,6 +2133,12 @@ LibertyPort::setDirection(PortDirection *dir)
liberty_cell_->setHasInternalPorts(true);
}

void
LibertyPort::setScanSignalType(ScanSignalType type)
{
scan_signal_type_ = type;
}

LibertyPort *
LibertyPort::findLibertyMember(int index) const
{
Expand Down Expand Up @@ -3152,56 +3159,9 @@ ScaleFactors::print()
}
}

TestCell::TestCell(LibertyPort *data_in,
LibertyPort *scan_in,
LibertyPort *scan_enable,
LibertyPort *scan_out,
LibertyPort *scan_out_inv) :
data_in_(data_in),
scan_in_(scan_in),
scan_enable_(scan_enable),
scan_out_(scan_out),
scan_out_inv_(scan_out_inv)
{
}

TestCell::TestCell() :
data_in_(nullptr),
scan_in_(nullptr),
scan_enable_(nullptr),
scan_out_(nullptr),
scan_out_inv_(nullptr)
{
}

void
TestCell::setDataIn(LibertyPort *port)
{
data_in_ = port;
}

void
TestCell::setScanIn(LibertyPort *port)
{
scan_in_ = port;
}

void
TestCell::setScanEnable(LibertyPort *port)
{
scan_enable_ = port;
}

void
TestCell::setScanOut(LibertyPort *port)
{
scan_out_ = port;
}

void
TestCell::setScanOutInv(LibertyPort *port)
TestCell::TestCell(LibertyCell *cell) :
LibertyCell(cell->libertyLibrary(), cell->name(), cell->filename())
{
scan_out_inv_ = port;
}

////////////////////////////////////////////////////////////////
Expand Down
2 changes: 2 additions & 0 deletions liberty/Liberty.i
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ ensure_voltage_waveforms()
self->ensureVoltageWaveforms(dcalc_aps);
}

LibertyCell *test_cell() { return self->testCell(); }

} // LibertyCell methods

%extend LibertyPort {
Expand Down
Loading

0 comments on commit 87e29f9

Please sign in to comment.