mv liberty swig files to /liberty

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2024-07-20 18:41:05 -07:00
parent 9e53ca184d
commit 2f9a9016f0
5 changed files with 52 additions and 27 deletions

View File

@ -234,7 +234,6 @@ set(STA_TCL_FILES
tcl/CmdArgs.tcl
tcl/CmdUtil.tcl
tcl/Graph.tcl
tcl/Liberty.tcl
tcl/Link.tcl
tcl/Network.tcl
tcl/NetworkEdit.tcl
@ -245,6 +244,7 @@ set(STA_TCL_FILES
tcl/Splash.tcl
tcl/Variables.tcl
dcalc/DelayCalc.tcl
liberty/Liberty.tcl
parasitics/Parasitics.tcl
power/Power.tcl
sdf/Sdf.tcl
@ -423,6 +423,7 @@ set_property(SOURCE ${STA_SWIG_FILE}
-I${STA_HOME}/tcl
-I${STA_HOME}/sdf
-I${STA_HOME}/dcalc
-I${STA_HOME}/liberty
-I${STA_HOME}/parasitics
-I${STA_HOME}/power
-I${STA_HOME}/spice
@ -431,6 +432,7 @@ set_property(SOURCE ${STA_SWIG_FILE}
set(SWIG_FILES
${STA_HOME}/dcalc/DelayCalc.i
${STA_HOME}/liberty/Liberty.i
${STA_HOME}/parasitics/Parasitics.i
${STA_HOME}/power/Power.i
${STA_HOME}/sdf/Sdf.i

View File

@ -19,6 +19,7 @@
%include "Exception.i"
%include "StaTclTypes.i"
%include "StaTcl.i"
%include "Liberty.i"
%include "Verilog.i"
%include "NetworkEdit.i"
%include "Sdf.i"

48
liberty/Liberty.i Normal file
View File

@ -0,0 +1,48 @@
%module liberty
%{
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2024, 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/>.
#include "Sta.hh"
#include "LibertyWriter.hh"
using namespace sta;
%}
%inline %{
bool
read_liberty_cmd(char *filename,
Corner *corner,
const MinMaxAll *min_max,
bool infer_latches)
{
Sta *sta = Sta::sta();
LibertyLibrary *lib = sta->readLiberty(filename, corner, min_max, infer_latches);
return (lib != nullptr);
}
void
write_liberty_cmd(LibertyLibrary *library,
char *filename)
{
writeLiberty(library, filename, Sta::sta());
}
%} // inline

View File

@ -49,7 +49,6 @@
#include "TimingArc.hh"
#include "TableModel.hh"
#include "Liberty.hh"
#include "LibertyWriter.hh"
#include "EquivCells.hh"
#include "Wireload.hh"
#include "PortDirection.hh"
@ -707,31 +706,6 @@ set_current_instance(Instance *inst)
Sta::sta()->setCurrentInstance(inst);
}
bool
read_liberty_cmd(char *filename,
Corner *corner,
const MinMaxAll *min_max,
bool infer_latches)
{
LibertyLibrary *lib = Sta::sta()->readLiberty(filename, corner, min_max,
infer_latches);
return (lib != nullptr);
}
bool
set_min_library_cmd(char *min_filename,
char *max_filename)
{
return Sta::sta()->setMinLibrary(min_filename, max_filename);
}
void
write_liberty_cmd(LibertyLibrary *library,
char *filename)
{
writeLiberty(library, filename, Sta::sta());
}
Library *
find_library(const char *name)
{