#include <register.h>
Inherited by AbcPass, AddPass, AlumaccPass, Backend, CdPass, CleanPass, ConnectPass, ConnwrappersPass, CopyPass, CoverPass, DeletePass, DesignPass, Dff2dffePass, DfflibmapPass, DumpPass, EchoPass, EvalPass, ExposePass, ExtractPass, FlattenPass, FreducePass, Frontend, FsmDetectPass, FsmExpandPass, FsmExportPass, FsmExtractPass, FsmInfoPass, FsmMapPass, FsmOptPass, FsmPass, FsmRecodePass, HelpPass, HierarchyPass, HilomapPass, IopadmapPass, LogPass, LsPass, MaccmapPass, MemoryCollectPass, MemoryDffPass, MemoryMapPass, MemoryPass, MemorySharePass, MemoryUnpackPass, MiterPass, MyPass, OptCleanPass, OptConstPass, OptMuxtreePass, OptPass, OptReducePass, OptRmdffPass, OptSharePass, PluginPass, ProcArstPass, ProcCleanPass, ProcDffPass, ProcInitPass, ProcMuxPass, ProcPass, ProcRmdeadPass, RenamePass, SatPass, ScatterPass, SccPass, ScriptPass, SelectPass, SetattrPass, SetparamPass, SetundefPass, SharePass, ShellPass, ShowPass, SimplemapPass, SplicePass, SplitnetsPass, StatPass, StubnetsPass, SubmodPass, SynthPass, SynthXilinxPass, TechmapPass, TeePass, Test1Pass, Test2Pass, TestAbcloopPass, TestCellPass, TracePass, VerificPass, VerilogDefaults, Vhdl2verilogPass, and WreducePass.
|
static void | call (RTLIL::Design *design, std::string command) |
|
static void | call (RTLIL::Design *design, std::vector< std::string > args) |
|
static void | call_on_selection (RTLIL::Design *design, const RTLIL::Selection &selection, std::string command) |
|
static void | call_on_selection (RTLIL::Design *design, const RTLIL::Selection &selection, std::vector< std::string > args) |
|
static void | call_on_module (RTLIL::Design *design, RTLIL::Module *module, std::string command) |
|
static void | call_on_module (RTLIL::Design *design, RTLIL::Module *module, std::vector< std::string > args) |
|
static void | init_register () |
|
static void | done_register () |
|
Definition at line 27 of file register.h.
Pass::Pass |
( |
std::string |
name, |
|
|
std::string |
short_help = "** document me **" |
|
) |
| |
Definition at line 146 of file register.cc.
148 std::vector<std::string>
args;
150 std::string cmd_buf = command;
151 std::string tok =
next_token(cmd_buf,
" \t\r\n");
153 if (tok.empty() || tok[0] ==
'#')
157 cmd_buf = command.substr(command.find(
'!') + 1);
158 while (!cmd_buf.empty() && (cmd_buf.back() ==
' ' || cmd_buf.back() ==
'\t' ||
159 cmd_buf.back() ==
'\r' || cmd_buf.back() ==
'\n'))
160 cmd_buf.resize(cmd_buf.size()-1);
161 log_header(
"Shell command: %s\n", cmd_buf.c_str());
164 log_cmd_error(
"Shell command returned error code %d.\n", retCode);
168 while (!tok.empty()) {
171 if (tok.back() ==
';') {
172 int num_semikolon = 0;
173 while (!tok.empty() && tok.back() ==
';')
174 tok.resize(tok.size()-1), num_semikolon++;
179 if (num_semikolon == 2)
180 call(design,
"clean");
181 if (num_semikolon == 3)
182 call(design,
"clean -purge");
static std::string next_token(bool pass_newline=false)
void log_header(const char *format,...)
int run_command(const std::string &command, std::function< void(const std::string &)> process_line)
void log_cmd_error(const char *format,...)
static void call(RTLIL::Design *design, std::string command)
void Pass::call |
( |
RTLIL::Design * |
design, |
|
|
std::vector< std::string > |
args |
|
) |
| |
|
static |
Definition at line 191 of file register.cc.
193 if (
args.size() == 0 ||
args[0][0] ==
'#')
198 for (
size_t i = 0; i <
args.size(); i++)
199 log(
"%s%s", i ?
" " :
"",
args[i].c_str());
204 log_cmd_error(
"No such command: %s (type 'help' for a command overview)\n",
args[0].c_str());
std::vector< RTLIL::Selection > selection_stack
const char * create_prompt(RTLIL::Design *design, int recursion_counter)
void log_cmd_error(const char *format,...)
void log(const char *format,...)
std::map< std::string, Pass * > pass_register
Definition at line 240 of file register.cc.
std::vector< RTLIL::Selection > selection_stack
std::string selected_active_module
static void call(RTLIL::Design *design, std::string command)
Definition at line 253 of file register.cc.
std::vector< RTLIL::Selection > selection_stack
std::string selected_active_module
static void call(RTLIL::Design *design, std::string command)
Definition at line 216 of file register.cc.
std::vector< RTLIL::Selection > selection_stack
std::string selected_active_module
static void call(RTLIL::Design *design, std::string command)
Definition at line 228 of file register.cc.
std::vector< RTLIL::Selection > selection_stack
std::string selected_active_module
static void call(RTLIL::Design *design, std::string command)
void Pass::cmd_error |
( |
const std::vector< std::string > & |
args, |
|
|
size_t |
argidx, |
|
|
std::string |
msg |
|
) |
| |
Definition at line 110 of file register.cc.
112 std::string command_text;
115 for (
size_t i = 0; i <
args.size(); i++) {
117 error_pos +=
args[i].size() + 1;
118 command_text = command_text + (command_text.empty() ?
"" :
" ") +
args[i];
121 log(
"\nSyntax error in command `%s':\n", command_text.c_str());
125 msg.c_str(), command_text.c_str(), error_pos,
"");
void log_cmd_error(const char *format,...)
void log(const char *format,...)
void Pass::cmd_log_args |
( |
const std::vector< std::string > & |
args | ) |
|
Definition at line 100 of file register.cc.
102 if (
args.size() <= 1)
104 log(
"Full command line:");
105 for (
size_t i = 0; i <
args.size(); i++)
void log(const char *format,...)
void Pass::done_register |
( |
| ) |
|
|
static |
Definition at line 62 of file register.cc.
std::map< std::string, Frontend * > frontend_register
#define log_assert(_assert_expr_)
std::map< std::string, Pass * > pass_register
std::map< std::string, Backend * > backend_register
virtual void Pass::execute |
( |
std::vector< std::string > |
args, |
|
|
RTLIL::Design * |
design |
|
) |
| |
|
pure virtual |
Implemented in SharePass, LsPass, CdPass, AbcPass, FlattenPass, SelectPass, OptConstPass, VerificPass, ScriptPass, SatPass, ShellPass, TechmapPass, FreducePass, MemorySharePass, EchoPass, ShowPass, HelpPass, AlumaccPass, TestCellPass, DumpPass, DfflibmapPass, SimplemapPass, ExtractPass, OptMuxtreePass, FsmExtractPass, CleanPass, EvalPass, MaccmapPass, HierarchyPass, ProcDffPass, OptReducePass, FsmOptPass, MemoryMapPass, FsmMapPass, VerilogDefaults, WreducePass, OptCleanPass, OptSharePass, MiterPass, SubmodPass, SplicePass, ProcMuxPass, TestAbcloopPass, FsmExpandPass, ExposePass, SccPass, ProcArstPass, Dff2dffePass, MemoryCollectPass, MemoryDffPass, StatPass, ConnwrappersPass, OptRmdffPass, ProcCleanPass, SetparamPass, FsmExportPass, FsmDetectPass, FsmRecodePass, AddPass, MemoryUnpackPass, SynthXilinxPass, StubnetsPass, ProcInitPass, SplitnetsPass, Backend, SynthPass, CoverPass, DesignPass, SetundefPass, RenamePass, ConnectPass, SetattrPass, ProcRmdeadPass, HilomapPass, Frontend, Vhdl2verilogPass, PluginPass, TracePass, IopadmapPass, FsmPass, OptPass, LogPass, ProcPass, Test2Pass, TeePass, MemoryPass, ScatterPass, FsmInfoPass, DeletePass, CopyPass, Test1Pass, and MyPass.
void Pass::extra_args |
( |
std::vector< std::string > |
args, |
|
|
size_t |
argidx, |
|
|
RTLIL::Design * |
design, |
|
|
bool |
select = true |
|
) |
| |
Definition at line 128 of file register.cc.
130 for (; argidx <
args.size(); argidx++)
132 std::string arg =
args[argidx];
134 if (arg.substr(0, 1) ==
"-")
135 cmd_error(
args, argidx,
"Unknown option or option in arguments.");
void cmd_error(const std::vector< std::string > &args, size_t argidx, std::string msg)
void handle_extra_select_args(Pass *pass, std::vector< std::string > args, size_t argidx, size_t args_size, RTLIL::Design *design)
Reimplemented in SharePass, LsPass, CdPass, FlattenPass, VerilogBackend, BtorBackend, AbcPass, ScriptPass, OptConstPass, ShellPass, SelectPass, SatPass, VerificPass, TechmapPass, FreducePass, MemorySharePass, EchoPass, ShowPass, AlumaccPass, HelpPass, TestCellPass, DumpPass, DfflibmapPass, SimplemapPass, LibertyFrontend, OptMuxtreePass, IlangBackend, FsmExtractPass, CleanPass, MaccmapPass, EvalPass, ProcDffPass, ExtractPass, OptReducePass, MemoryMapPass, FsmOptPass, FsmMapPass, WreducePass, HierarchyPass, OptCleanPass, TestAutotbBackend, VerilogDefaults, BlifBackend, OptSharePass, SubmodPass, ProcMuxPass, MiterPass, FsmExpandPass, TestAbcloopPass, SplicePass, ExposePass, Dff2dffePass, SccPass, ProcArstPass, MemoryCollectPass, MemoryDffPass, StatPass, ConnwrappersPass, OptRmdffPass, ProcCleanPass, SetparamPass, FsmDetectPass, FsmRecodePass, FsmExportPass, SpiceBackend, MemoryUnpackPass, EdifBackend, ProcInitPass, AddPass, SplitnetsPass, ProcRmdeadPass, SetattrPass, TracePass, SetundefPass, HilomapPass, PluginPass, RenamePass, IntersynthBackend, ConnectPass, VerilogFrontend, SynthPass, DesignPass, SynthXilinxPass, IlangFrontend, Vhdl2verilogPass, CoverPass, IopadmapPass, FsmInfoPass, LogPass, ScatterPass, TeePass, FsmPass, MemoryPass, OptPass, ProcPass, CopyPass, WriteFileFrontend, and DeletePass.
Definition at line 93 of file register.cc.
96 log(
"No help message for command `%s'.\n",
pass_name.c_str());
void log(const char *format,...)
void Pass::init_register |
( |
| ) |
|
|
static |
Definition at line 54 of file register.cc.
virtual void run_register()
Definition at line 74 of file register.cc.
76 pre_post_exec_state_t state;
void Pass::run_register |
( |
| ) |
|
|
virtual |
Reimplemented in Backend, and Frontend.
Definition at line 48 of file register.cc.
#define log_assert(_assert_expr_)
std::map< std::string, Pass * > pass_register
Pass* Pass::next_queued_pass |
std::string Pass::pass_name |
std::string Pass::short_help |
The documentation for this struct was generated from the following files: