Renamed "write_autotest" to "test_autotb" and moved to passes/tests/

This commit is contained in:
Clifford Wolf 2014-07-29 21:12:50 +02:00
parent e605af8a49
commit e6df25bf74
5 changed files with 12 additions and 10 deletions

View File

@ -1,3 +0,0 @@
OBJS += backends/autotest/autotest.o

View File

@ -376,7 +376,9 @@ void Frontend::frontend_call(RTLIL::Design *design, FILE *f, std::string filenam
design->check(); 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)
{ {
} }

View File

@ -0,0 +1,3 @@
OBJS += passes/tests/test_autotb.o

View File

@ -301,13 +301,13 @@ static void autotest(FILE *f, RTLIL::Design *design)
fprintf(f, "endmodule\n"); fprintf(f, "endmodule\n");
} }
struct AutotestBackend : public Backend { struct TestAutotbBackend : public Backend {
AutotestBackend() : Backend("autotest", "generate simple test benches") { } TestAutotbBackend() : Backend("=test_autotb", "generate simple test benches") { }
virtual void help() virtual void help()
{ {
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
log("\n"); log("\n");
log(" write_autotest [filename]\n"); log(" test_autotb [filename]\n");
log("\n"); log("\n");
log("Automatically create primitive verilog test benches for all modules in the\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"); 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<std::string> args, RTLIL::Design *design) virtual void execute(FILE *&f, std::string filename, std::vector<std::string> 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); extra_args(f, filename, args, 1);
autotest(f, design); autotest(f, design);
} }
} AutotestBackend; } TestAutotbBackend;

View File

@ -93,7 +93,7 @@ do
cd ${bn}.out cd ${bn}.out
cp ../$fn $fn cp ../$fn $fn
if [ ! -f ../${bn}_tb.v ]; then 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 else
cp ../${bn}_tb.v ${bn}_tb.v cp ../${bn}_tb.v ${bn}_tb.v
fi fi