From e6df25bf740b259027541db3543a769ecfc92d4f Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 29 Jul 2014 21:12:50 +0200 Subject: [PATCH] Renamed "write_autotest" to "test_autotb" and moved to passes/tests/ --- backends/autotest/Makefile.inc | 3 --- kernel/register.cc | 4 +++- passes/tests/Makefile.inc | 3 +++ .../autotest.cc => passes/tests/test_autotb.cc | 10 +++++----- tests/tools/autotest.sh | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) delete mode 100644 backends/autotest/Makefile.inc create mode 100644 passes/tests/Makefile.inc rename backends/autotest/autotest.cc => passes/tests/test_autotb.cc (97%) diff --git a/backends/autotest/Makefile.inc b/backends/autotest/Makefile.inc deleted file mode 100644 index 9308dcd47..000000000 --- a/backends/autotest/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ - -OBJS += backends/autotest/autotest.o - diff --git a/kernel/register.cc b/kernel/register.cc index da3569831..4569481fa 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -376,7 +376,9 @@ void Frontend::frontend_call(RTLIL::Design *design, FILE *f, std::string filenam design->check(); } -Backend::Backend(std::string name, std::string short_help) : Pass("write_"+name, short_help), backend_name(name) +Backend::Backend(std::string name, std::string short_help) : + Pass(name.substr(0, 1) == "=" ? name.substr(1) : "write_"+name, short_help), + backend_name(name.substr(0, 1) == "=" ? name.substr(1) : name) { } diff --git a/passes/tests/Makefile.inc b/passes/tests/Makefile.inc new file mode 100644 index 000000000..6497f86e9 --- /dev/null +++ b/passes/tests/Makefile.inc @@ -0,0 +1,3 @@ + +OBJS += passes/tests/test_autotb.o + diff --git a/backends/autotest/autotest.cc b/passes/tests/test_autotb.cc similarity index 97% rename from backends/autotest/autotest.cc rename to passes/tests/test_autotb.cc index 3bb0f9d66..f121089b1 100644 --- a/backends/autotest/autotest.cc +++ b/passes/tests/test_autotb.cc @@ -301,13 +301,13 @@ static void autotest(FILE *f, RTLIL::Design *design) fprintf(f, "endmodule\n"); } -struct AutotestBackend : public Backend { - AutotestBackend() : Backend("autotest", "generate simple test benches") { } +struct TestAutotbBackend : public Backend { + TestAutotbBackend() : Backend("=test_autotb", "generate simple test benches") { } virtual void help() { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" write_autotest [filename]\n"); + log(" test_autotb [filename]\n"); log("\n"); log("Automatically create primitive verilog test benches for all modules in the\n"); log("design. The generated testbenches toggle the input pins of the module in\n"); @@ -327,9 +327,9 @@ struct AutotestBackend : public Backend { } virtual void execute(FILE *&f, std::string filename, std::vector args, RTLIL::Design *design) { - log_header("Executing AUTOTEST backend (auto-generate pseudo-random test benches).\n"); + log_header("Executing TEST_AUTOTB backend (auto-generate pseudo-random test benches).\n"); extra_args(f, filename, args, 1); autotest(f, design); } -} AutotestBackend; +} TestAutotbBackend; diff --git a/tests/tools/autotest.sh b/tests/tools/autotest.sh index c383e19f4..1130bbb70 100755 --- a/tests/tools/autotest.sh +++ b/tests/tools/autotest.sh @@ -93,7 +93,7 @@ do cd ${bn}.out cp ../$fn $fn if [ ! -f ../${bn}_tb.v ]; then - "$toolsdir"/../../yosys -b autotest -o ${bn}_tb.v $fn + "$toolsdir"/../../yosys -b test_autotb -o ${bn}_tb.v $fn else cp ../${bn}_tb.v ${bn}_tb.v fi -- 2.30.2