Files
OpenSTA/include/sta/StaMain.hh
T

79 lines
2.3 KiB
C++
Raw Normal View History

2018-09-28 08:54:21 -07:00
// OpenSTA, Static Timing Analyzer
2026-03-10 13:21:17 -07:00
// Copyright (c) 2026, Parallax Software, Inc.
2018-09-28 08:54:21 -07:00
//
// 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
2022-01-04 10:17:08 -07:00
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2018-09-28 08:54:21 -07:00
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
2022-01-04 10:17:08 -07:00
// along with this program. If not, see <https://www.gnu.org/licenses/>.
2025-01-21 18:54:33 -07:00
//
// The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software.
//
// Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
//
// This notice may not be removed or altered from any source distribution.
2018-09-28 08:54:21 -07:00
2020-02-15 17:13:16 -07:00
#pragma once
2018-09-28 08:54:21 -07:00
2026-03-28 19:13:35 -07:00
#include <string_view>
2018-09-28 08:54:21 -07:00
struct Tcl_Interp;
namespace sta {
2019-05-19 17:06:06 -06:00
class Sta;
2018-09-28 08:54:21 -07:00
2019-11-16 18:11:25 -07:00
// Parse command line argument
int
staTclAppInit(int argc,
2026-01-03 16:59:35 -08:00
char *argv[],
const char *init_filename,
Tcl_Interp *interp);
2018-09-28 08:54:21 -07:00
2019-11-16 18:11:25 -07:00
// Sta initialization.
// Makes the Sta object and registers TCL commands.
2018-09-28 08:54:21 -07:00
void
2019-11-16 18:11:25 -07:00
initSta(int argc,
2026-01-03 16:59:35 -08:00
char *argv[],
Tcl_Interp *interp);
2018-09-28 08:54:21 -07:00
// TCL init files are encoded into the string init using the three
// digit decimal equivalent for each ascii character. This function
// unencodes the string and evals it. This packages the TCL init
// files as part of the executable so they don't have to be shipped as
// separate files that have to be located and loaded at run time.
void
evalTclInit(Tcl_Interp *interp,
2026-01-03 16:59:35 -08:00
const char *inits[]);
2021-03-10 18:47:18 -07:00
char *
unencode(const char *inits[]);
2018-09-28 08:54:21 -07:00
bool
2019-06-14 16:53:03 -07:00
findCmdLineFlag(int &argc,
2026-01-03 16:59:35 -08:00
char *argv[],
2026-03-28 19:13:35 -07:00
std::string_view flag);
2018-09-28 08:54:21 -07:00
char *
2019-06-14 16:53:03 -07:00
findCmdLineKey(int &argc,
2026-01-03 16:59:35 -08:00
char *argv[],
2026-03-28 19:13:35 -07:00
std::string_view key);
2018-09-28 08:54:21 -07:00
2019-08-08 14:13:02 -07:00
int
parseThreadsArg(int &argc,
2026-01-03 16:59:35 -08:00
char *argv[]);
2020-11-13 12:46:19 -07:00
int
2019-06-05 10:20:48 -07:00
sourceTclFile(const char *filename,
2026-01-03 16:59:35 -08:00
bool echo,
bool verbose,
Tcl_Interp *interp);
2019-06-04 10:18:14 -07:00
2026-04-13 14:58:16 -07:00
} // namespace sta