diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-08-18 13:43:12 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-08-18 13:43:12 +0200 |
commit | b3a01451a54506addf7493d4e3abaa621aa5689c (patch) | |
tree | a69603128897f3592330c502f23ef6b5b91fabe8 /passes/tests | |
parent | de8ee412c30e92efe3a3e1434c0f4b495f8cdbbe (diff) | |
download | yosys-b3a01451a54506addf7493d4e3abaa621aa5689c.tar.gz yosys-b3a01451a54506addf7493d4e3abaa621aa5689c.tar.bz2 yosys-b3a01451a54506addf7493d4e3abaa621aa5689c.zip |
Bugfix in test_autotb
Diffstat (limited to 'passes/tests')
-rw-r--r-- | passes/tests/test_autotb.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/passes/tests/test_autotb.cc b/passes/tests/test_autotb.cc index 607bc4761..69e2e76d7 100644 --- a/passes/tests/test_autotb.cc +++ b/passes/tests/test_autotb.cc @@ -155,6 +155,7 @@ static void autotest(std::ostream &f, RTLIL::Design *design, int num_iter, int s f << stringf("\t%s <= #%d 0;\n", it->first.c_str(), ++delay_counter*2); for (auto it = signal_clk.begin(); it != signal_clk.end(); ++it) f << stringf("\t%s <= #%d 0;\n", it->first.c_str(), ++delay_counter*2); + f << stringf("\t#%d;\n", ((2*delay_counter+99)/100)*100); for (auto it = signal_clk.begin(); it != signal_clk.end(); ++it) { f << stringf("\t#100; %s <= 1;\n", it->first.c_str()); f << stringf("\t#100; %s <= 0;\n", it->first.c_str()); @@ -162,6 +163,7 @@ static void autotest(std::ostream &f, RTLIL::Design *design, int num_iter, int s delay_counter = 0; for (auto it = signal_in.begin(); it != signal_in.end(); ++it) f << stringf("\t%s <= #%d ~0;\n", it->first.c_str(), ++delay_counter*2); + f << stringf("\t#%d;\n", ((2*delay_counter+99)/100)*100); for (auto it = signal_clk.begin(); it != signal_clk.end(); ++it) { f << stringf("\t#100; %s <= 1;\n", it->first.c_str()); f << stringf("\t#100; %s <= 0;\n", it->first.c_str()); @@ -172,6 +174,7 @@ static void autotest(std::ostream &f, RTLIL::Design *design, int num_iter, int s continue; f << stringf("\t%s <= #%d 'b%s;\n", it->first.c_str(), ++delay_counter*2, signal_const[it->first].c_str()); } + f << stringf("\t#%d;\n", ((2*delay_counter+99)/100)*100); f << stringf("end\n"); f << stringf("endtask\n\n"); @@ -184,6 +187,7 @@ static void autotest(std::ostream &f, RTLIL::Design *design, int num_iter, int s f << stringf("\txorshift128;\n"); f << stringf("\t%s <= #%d { xorshift128_x, xorshift128_y, xorshift128_z, xorshift128_w };\n", it->first.c_str(), ++delay_counter*2); } + f << stringf("\t#%d;\n", ((2*delay_counter+99)/100)*100); f << stringf("end\n"); f << stringf("endtask\n\n"); |