mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-23 06:01:27 +00:00
opensta: refactor default command
This commit is contained in:
parent
526c5e915b
commit
3651eecdf8
2 changed files with 5 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
#include "kernel/rtlil.h"
|
#include "kernel/rtlil.h"
|
||||||
#include "kernel/log.h"
|
#include "kernel/log.h"
|
||||||
|
#include "techlibs/common/opensta.h"
|
||||||
|
|
||||||
USING_YOSYS_NAMESPACE
|
USING_YOSYS_NAMESPACE
|
||||||
PRIVATE_NAMESPACE_BEGIN
|
PRIVATE_NAMESPACE_BEGIN
|
||||||
|
|
@ -7,7 +8,6 @@ PRIVATE_NAMESPACE_BEGIN
|
||||||
#if !defined(YOSYS_DISABLE_SPAWN)
|
#if !defined(YOSYS_DISABLE_SPAWN)
|
||||||
struct OpenstaPass : public Pass
|
struct OpenstaPass : public Pass
|
||||||
{
|
{
|
||||||
const char* default_sta_cmd = "sta";
|
|
||||||
OpenstaPass() : Pass("opensta", "run OpenSTA") { }
|
OpenstaPass() : Pass("opensta", "run OpenSTA") { }
|
||||||
|
|
||||||
void help() override
|
void help() override
|
||||||
|
|
@ -19,7 +19,7 @@ struct OpenstaPass : public Pass
|
||||||
// TOOD
|
// TOOD
|
||||||
log("\n");
|
log("\n");
|
||||||
log(" -exe <command>\n");
|
log(" -exe <command>\n");
|
||||||
log(" use <command> to run OpenSTA instead of \"%s\"\n", default_sta_cmd);
|
log(" use <command> to run OpenSTA instead of \"%s\"\n", default_opensta_cmd);
|
||||||
log("\n");
|
log("\n");
|
||||||
log(" -sdc-in <filename>\n");
|
log(" -sdc-in <filename>\n");
|
||||||
log(" expand SDC input file <filename>\n");
|
log(" expand SDC input file <filename>\n");
|
||||||
|
|
@ -35,7 +35,7 @@ struct OpenstaPass : public Pass
|
||||||
void execute(std::vector<std::string> args, RTLIL::Design *design) override
|
void execute(std::vector<std::string> args, RTLIL::Design *design) override
|
||||||
{
|
{
|
||||||
string run_from, run_to;
|
string run_from, run_to;
|
||||||
string opensta_exe = design->scratchpad_get_string("opensta.exe", "sta");
|
string opensta_exe = design->scratchpad_get_string("opensta.exe", default_opensta_cmd);
|
||||||
string sdc_filename, sdc_expanded_filename;
|
string sdc_filename, sdc_expanded_filename;
|
||||||
string tempdir_name, script_filename;
|
string tempdir_name, script_filename;
|
||||||
string verilog_filename, liberty_filename;
|
string verilog_filename, liberty_filename;
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
#include "kernel/rtlil.h"
|
#include "kernel/rtlil.h"
|
||||||
#include "kernel/log.h"
|
#include "kernel/log.h"
|
||||||
|
#include "techlibs/common/opensta.h"
|
||||||
|
|
||||||
USING_YOSYS_NAMESPACE
|
USING_YOSYS_NAMESPACE
|
||||||
PRIVATE_NAMESPACE_BEGIN
|
PRIVATE_NAMESPACE_BEGIN
|
||||||
|
|
||||||
struct SdcExpandPass : public ScriptPass
|
struct SdcExpandPass : public ScriptPass
|
||||||
{
|
{
|
||||||
const char* default_sta_cmd = "sta";
|
|
||||||
SdcExpandPass() : ScriptPass("sdc_expand", "run OpenSTA") { }
|
SdcExpandPass() : ScriptPass("sdc_expand", "run OpenSTA") { }
|
||||||
|
|
||||||
void help() override
|
void help() override
|
||||||
|
|
@ -18,7 +18,7 @@ struct SdcExpandPass : public ScriptPass
|
||||||
// TODO
|
// TODO
|
||||||
log("\n");
|
log("\n");
|
||||||
log(" -exe <command>\n");
|
log(" -exe <command>\n");
|
||||||
log(" use <command> to run OpenSTA instead of \"%s\"\n", default_sta_cmd);
|
log(" use <command> to run OpenSTA instead of \"%s\"\n", default_opensta_cmd);
|
||||||
log("\n");
|
log("\n");
|
||||||
log(" -sdc-in <filename>\n");
|
log(" -sdc-in <filename>\n");
|
||||||
log(" expand SDC file <filename>\n");
|
log(" expand SDC file <filename>\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue