From b66e9fb3482a67a69e822b39b5764e715f8c684a Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 31 Mar 2013 18:05:31 +0200 Subject: [PATCH] Added "script" command --- kernel/driver.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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"; -- 2.30.2