diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-03-31 18:05:31 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-03-31 18:05:31 +0200 |
commit | b66e9fb3482a67a69e822b39b5764e715f8c684a (patch) | |
tree | 7b926a106f9867f62ac9c2224c07eaa4d11c7049 /kernel | |
parent | f1a2fd966f62df072d2c43573fb71a1369857523 (diff) | |
download | yosys-b66e9fb3482a67a69e822b39b5764e715f8c684a.tar.gz yosys-b66e9fb3482a67a69e822b39b5764e715f8c684a.tar.bz2 yosys-b66e9fb3482a67a69e822b39b5764e715f8c684a.zip |
Added "script" command
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/driver.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/driver.cc b/kernel/driver.cc index cdb9e9ecc..8374afa7f 100644 --- a/kernel/driver.cc +++ b/kernel/driver.cc @@ -225,6 +225,22 @@ struct ShellPass : public Pass { } } ShellPass; +struct ScriptPass : public Pass { + ScriptPass() : Pass("script", "execute files from script file") { } + virtual void help() { + log("\n"); + log(" script <filename>\n"); + log("\n"); + log("This command executes the yosys commands in the specified file.\n"); + log("\n"); + } + virtual void execute(std::vector<std::string> args, RTLIL::Design *design) { + if (args.size() != 2) + extra_args(args, 1, design, false); + run_frontend(args[1], "script", design, NULL); + } +} ScriptPass; + int main(int argc, char **argv) { std::string frontend_command = "auto"; |