mv sdc swig to Sdc.i

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2024-07-20 22:24:32 -07:00
parent 2f9a9016f0
commit 0e0a0624fe
6 changed files with 1138 additions and 1104 deletions

View File

@ -238,7 +238,6 @@ set(STA_TCL_FILES
tcl/Network.tcl
tcl/NetworkEdit.tcl
tcl/Property.tcl
tcl/Sdc.tcl
tcl/Search.tcl
tcl/Sta.tcl
tcl/Splash.tcl
@ -247,6 +246,7 @@ set(STA_TCL_FILES
liberty/Liberty.tcl
parasitics/Parasitics.tcl
power/Power.tcl
sdc/Sdc.tcl
sdf/Sdf.tcl
spice/WriteSpice.tcl
verilog/Verilog.tcl
@ -421,6 +421,7 @@ set_property(SOURCE ${STA_SWIG_FILE}
-module sta
-namespace -prefix sta
-I${STA_HOME}/tcl
-I${STA_HOME}/sdc
-I${STA_HOME}/sdf
-I${STA_HOME}/dcalc
-I${STA_HOME}/liberty
@ -435,6 +436,7 @@ set(SWIG_FILES
${STA_HOME}/liberty/Liberty.i
${STA_HOME}/parasitics/Parasitics.i
${STA_HOME}/power/Power.i
${STA_HOME}/sdc/Sdc.i
${STA_HOME}/sdf/Sdf.i
${STA_HOME}/spice/WriteSpice.i
${STA_HOME}/tcl/Exception.i

View File

@ -23,6 +23,7 @@
%include "Verilog.i"
%include "NetworkEdit.i"
%include "Sdf.i"
%include "Sdc.i"
%include "DelayCalc.i"
%include "WriteSpice.i"
%include "Parasitics.i"

View File

@ -18,8 +18,10 @@
// 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 "Liberty.hh"
#include "EquivCells.hh"
#include "LibertyWriter.hh"
#include "Sta.hh"
using namespace sta;
@ -45,4 +47,59 @@ write_liberty_cmd(LibertyLibrary *library,
writeLiberty(library, filename, Sta::sta());
}
void
make_equiv_cells(LibertyLibrary *lib)
{
LibertyLibrarySeq libs;
libs.push_back(lib);
Sta::sta()->makeEquivCells(&libs, nullptr);
}
LibertyCellSeq *
find_equiv_cells(LibertyCell *cell)
{
return Sta::sta()->equivCells(cell);
}
bool
equiv_cells(LibertyCell *cell1,
LibertyCell *cell2)
{
return sta::equivCells(cell1, cell2);
}
bool
equiv_cell_ports(LibertyCell *cell1,
LibertyCell *cell2)
{
return equivCellPorts(cell1, cell2);
}
bool
equiv_cell_timing_arcs(LibertyCell *cell1,
LibertyCell *cell2)
{
return equivCellTimingArcSets(cell1, cell2);
}
LibertyCellSeq *
find_library_buffers(LibertyLibrary *library)
{
return library->buffers();
}
const char *
liberty_port_direction(const LibertyPort *port)
{
return port->direction()->name();
}
bool
liberty_supply_exists(const char *supply_name)
{
auto network = Sta::sta()->network();
auto lib = network->defaultLibertyLibrary();
return lib && lib->supplyExists(supply_name);
}
%} // inline

1076
sdc/Sdc.i Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff