Skip to content

Commit 21a62eb

Browse files
committed
liberty test_cell parse internals
commit 6a290928a1e554df63682ec416ead0d463c89b4a Author: James Cherry <[email protected]> Date: Thu Oct 24 11:33:24 2024 -0700 liberty test signal_types Signed-off-by: James Cherry <[email protected]> commit 662b68e3def20b467c5dc1a2d9ca14b399ad27c1 Author: James Cherry <[email protected]> Date: Thu Oct 24 11:28:25 2024 -0700 liberty test_cell Signed-off-by: James Cherry <[email protected]> commit d91e9a824b46149fb1f803c76714971043fe21b6 Author: James Cherry <[email protected]> Date: Thu Oct 24 10:35:17 2024 -0700 readme Signed-off-by: James Cherry <[email protected]> commit cbe980545669379ac25c5721c488168de98e9120 Author: James Cherry <[email protected]> Date: Thu Oct 24 09:38:29 2024 -0700 message ids Signed-off-by: James Cherry <[email protected]> commit f0234ddefae5ad82bad75839afc18baf458ebdab Author: James Cherry <[email protected]> Date: Wed Oct 23 12:52:39 2024 -0700 rm test_cell disable edge support Signed-off-by: James Cherry <[email protected]> commit db798869bc85a6c7be5f938f4c4eb27402c177ad Author: James Cherry <[email protected]> Date: Wed Oct 23 08:20:24 2024 -0700 liberty test_cell Signed-off-by: James Cherry <[email protected]> commit d8fe710d551737f899a770abd2ca0b5e3a261d32 Author: James Cherry <[email protected]> Date: Tue Oct 22 17:37:04 2024 -0700 liberty test_cell Signed-off-by: James Cherry <[email protected]> commit 9ad676ec78df99223ecd82e27c941341b28eb4e4 Author: James Cherry <[email protected]> Date: Mon Oct 21 19:50:44 2024 -0700 liberty testcell Signed-off-by: James Cherry <[email protected]> Signed-off-by: James Cherry <[email protected]>
1 parent a2d445b commit 21a62eb

File tree

13 files changed

+368
-445
lines changed

13 files changed

+368
-445
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ https://github.com/parallaxsw/OpenSTA.git. Any forks from this code
7777
base have not passed extensive regression testing which is not
7878
publicly available.
7979

80-
## Build
80+
## Build from source
8181

8282
OpenSTA is built with CMake.
8383

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

190+
## Build with Docker
191+
192+
An alternative way to build and run OpenSTA is with
193+
[Docker](https://www.docker.com). After installing Docker, the
194+
following command builds a Docker image.
195+
196+
```
197+
cd OpenSTA
198+
docker build --file Dockerfile.ubuntu_22.04 --tag OpenSTA .
199+
```
200+
201+
To run a docker container using the OpenSTA image, use the -v option
202+
to docker to mount direcories with data to use and -i to run
203+
interactively.
204+
205+
```
206+
docker run -i -v $HOME:/data OpenSTA
207+
```
208+
190209
## Bug Reports
191210

192211
Use the Issues tab on the github repository to report bugs.

doc/messages.txt

Lines changed: 215 additions & 223 deletions
Large diffs are not rendered by default.

include/sta/Liberty.hh

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ enum class ClockGateType { none, latch_posedge, latch_negedge, other };
8888

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

91+
enum class ScanSignalType { enable, enable_inverted, clock, clock_a, clock_b,
92+
input, input_inverted, output, output_inverted, none };
93+
9194
enum class ScaleFactorPvt { process, volt, temp, unknown };
9295
constexpr int scale_factor_pvt_count = int(ScaleFactorPvt::unknown) + 1;
9396

@@ -691,6 +694,8 @@ public:
691694
LibertyPort *findLibertyBusBit(int index) const;
692695
BusDcl *busDcl() const { return bus_dcl_; }
693696
void setDirection(PortDirection *dir);
697+
ScanSignalType scanSignalType() const { return scan_signal_type_; }
698+
void setScanSignalType(ScanSignalType type);
694699
void fanoutLoad(// Return values.
695700
float &fanout_load,
696701
bool &exists) const;
@@ -861,6 +866,7 @@ protected:
861866
LibertyCell *liberty_cell_;
862867
BusDcl *bus_dcl_;
863868
FuncExpr *function_;
869+
ScanSignalType scan_signal_type_;
864870
FuncExpr *tristate_enable_;
865871
ScaledPortMap *scaled_ports_;
866872
RiseFallMinMax capacitance_;
@@ -1080,32 +1086,12 @@ protected:
10801086
TableAxisPtr axis3_;
10811087
};
10821088

1083-
class TestCell
1089+
class TestCell : public LibertyCell
10841090
{
10851091
public:
1086-
TestCell();
1087-
TestCell(LibertyPort *data_in,
1088-
LibertyPort *scan_in,
1089-
LibertyPort *scan_enable,
1090-
LibertyPort *scan_out,
1091-
LibertyPort *scan_out_inv);
1092-
LibertyPort *dataIn() const { return data_in_; }
1093-
void setDataIn(LibertyPort *port);
1094-
LibertyPort *scanIn() const { return scan_in_; }
1095-
void setScanIn(LibertyPort *port);
1096-
LibertyPort *scanEnable() const { return scan_enable_; }
1097-
void setScanEnable(LibertyPort *port);
1098-
LibertyPort *scanOut() const { return scan_out_; }
1099-
void setScanOut(LibertyPort *port);
1100-
LibertyPort *scanOutInv() const { return scan_out_inv_; }
1101-
void setScanOutInv(LibertyPort *port);
1092+
TestCell(LibertyCell *cell);
11021093

11031094
protected:
1104-
LibertyPort *data_in_;
1105-
LibertyPort *scan_in_;
1106-
LibertyPort *scan_enable_;
1107-
LibertyPort *scan_out_;
1108-
LibertyPort *scan_out_inv_;
11091095
};
11101096

11111097
class OcvDerate

include/sta/LibertyClass.hh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class OperatingConditions;
3636
class BusDcl;
3737
class ModeDef;
3838
class ModeValueDef;
39-
class TestCell;
4039
class TableTemplate;
4140
class Table;
4241
class TableModel;

liberty/Liberty.cc

Lines changed: 9 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,6 +2075,7 @@ LibertyPort::LibertyPort(LibertyCell *cell,
20752075
liberty_cell_(cell),
20762076
bus_dcl_(bus_dcl),
20772077
function_(nullptr),
2078+
scan_signal_type_(ScanSignalType::none),
20782079
tristate_enable_(nullptr),
20792080
scaled_ports_(nullptr),
20802081
fanout_load_(0.0),
@@ -2132,6 +2133,12 @@ LibertyPort::setDirection(PortDirection *dir)
21322133
liberty_cell_->setHasInternalPorts(true);
21332134
}
21342135

2136+
void
2137+
LibertyPort::setScanSignalType(ScanSignalType type)
2138+
{
2139+
scan_signal_type_ = type;
2140+
}
2141+
21352142
LibertyPort *
21362143
LibertyPort::findLibertyMember(int index) const
21372144
{
@@ -3152,56 +3159,9 @@ ScaleFactors::print()
31523159
}
31533160
}
31543161

3155-
TestCell::TestCell(LibertyPort *data_in,
3156-
LibertyPort *scan_in,
3157-
LibertyPort *scan_enable,
3158-
LibertyPort *scan_out,
3159-
LibertyPort *scan_out_inv) :
3160-
data_in_(data_in),
3161-
scan_in_(scan_in),
3162-
scan_enable_(scan_enable),
3163-
scan_out_(scan_out),
3164-
scan_out_inv_(scan_out_inv)
3165-
{
3166-
}
3167-
3168-
TestCell::TestCell() :
3169-
data_in_(nullptr),
3170-
scan_in_(nullptr),
3171-
scan_enable_(nullptr),
3172-
scan_out_(nullptr),
3173-
scan_out_inv_(nullptr)
3174-
{
3175-
}
3176-
3177-
void
3178-
TestCell::setDataIn(LibertyPort *port)
3179-
{
3180-
data_in_ = port;
3181-
}
3182-
3183-
void
3184-
TestCell::setScanIn(LibertyPort *port)
3185-
{
3186-
scan_in_ = port;
3187-
}
3188-
3189-
void
3190-
TestCell::setScanEnable(LibertyPort *port)
3191-
{
3192-
scan_enable_ = port;
3193-
}
3194-
3195-
void
3196-
TestCell::setScanOut(LibertyPort *port)
3197-
{
3198-
scan_out_ = port;
3199-
}
3200-
3201-
void
3202-
TestCell::setScanOutInv(LibertyPort *port)
3162+
TestCell::TestCell(LibertyCell *cell) :
3163+
LibertyCell(cell->libertyLibrary(), cell->name(), cell->filename())
32033164
{
3204-
scan_out_inv_ = port;
32053165
}
32063166

32073167
////////////////////////////////////////////////////////////////

liberty/Liberty.i

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ ensure_voltage_waveforms()
294294
self->ensureVoltageWaveforms(dcalc_aps);
295295
}
296296

297+
LibertyCell *test_cell() { return self->testCell(); }
298+
297299
} // LibertyCell methods
298300

299301
%extend LibertyPort {

0 commit comments

Comments
 (0)