From: Clifford Wolf Date: Sun, 31 Mar 2013 16:05:31 +0000 (+0200) Subject: Added "script" command X-Git-Tag: yosys-0.2.0~658 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b66e9fb3482a67a69e822b39b5764e715f8c684a;p=yosys.git Added "script" command --- 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 \n"); + log("\n"); + log("This command executes the yosys commands in the specified file.\n"); + log("\n"); + } + virtual void execute(std::vector 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";