abc9_ops: update messaging (credit to @Xiretza for spotting)
authorEddie Hung <eddie@fpgeh.com>
Sat, 30 May 2020 15:57:48 +0000 (08:57 -0700)
committerEddie Hung <eddie@fpgeh.com>
Sat, 30 May 2020 15:57:48 +0000 (08:57 -0700)
passes/techmap/abc9_ops.cc
tests/arch/xilinx/abc9_dff.ys

index 22da09e53d7152fc4dccc8f96a919f7d91e4055b..b4d4b77d54c1c97445381f1cff83b6296e92e608 100644 (file)
@@ -129,20 +129,20 @@ void check(RTLIL::Design *design, bool dff_mode)
                                for (auto derived_cell : derived_module->cells()) {
                                        if (derived_cell->type.in(ID($dff), ID($_DFF_N_), ID($_DFF_P_))) {
                                                if (found)
-                                                       log_error("Module '%s' with (* abc9_flop *) contains more than one $_DFF_[NP]_ cell.\n", log_id(derived_module));
+                                                       log_error("Whitebox '%s' with (* abc9_flop *) contains more than one $_DFF_[NP]_ cell.\n", log_id(derived_module));
                                                found = true;
 
                                                SigBit Q = derived_cell->getPort(ID::Q);
                                                log_assert(GetSize(Q.wire) == 1);
 
                                                if (!Q.wire->port_output)
-                                                       log_error("Module '%s' contains a %s cell where its 'Q' port does not drive a module output!\n", log_id(derived_module), log_id(derived_cell->type));
+                                                       log_error("Whitebox '%s' with (* abc9_flop *) contains a %s cell where its 'Q' port does not drive a module output.\n", log_id(derived_module), log_id(derived_cell->type));
 
                                                Const init = Q.wire->attributes.at(ID::init, State::Sx);
                                                log_assert(GetSize(init) == 1);
                                        }
                                        else if (unsupported.count(derived_cell->type))
-                                               log_error("Module '%s' with (* abc9_flop *) contains a %s cell, which is not supported for sequential synthesis.\n", log_id(derived_module), log_id(derived_cell->type));
+                                               log_error("Whitebox '%s' with (* abc9_flop *) contains a %s cell, which is not supported for sequential synthesis.\n", log_id(derived_module), log_id(derived_cell->type));
                                }
                        }
        }
@@ -215,7 +215,7 @@ void prep_hier(RTLIL::Design *design, bool dff_mode)
                                                        // Block sequential synthesis on cells with (* init *) != 1'b0
                                                        //   because ABC9 doesn't support them
                                                        if (init != State::S0) {
-                                                               log_warning("Module '%s' contains a %s cell with non-zero initial state -- this is not unsupported for ABC9 sequential synthesis. Treating as a blackbox.\n", log_id(derived_module), log_id(derived_cell->type));
+                                                               log_warning("Whitebox '%s' with (* abc9_flop *) contains a %s cell with non-zero initial state -- this is not supported for ABC9 sequential synthesis. Treating as a blackbox.\n", log_id(derived_module), log_id(derived_cell->type));
                                                                derived_module->set_bool_attribute(ID::abc9_flop, false);
                                                        }
                                                        break;
index e3889be0501606722450cddfb3f842733f8fee5e..210e87477ce1270a9c10124ba4957cae2caec1be 100644 (file)
@@ -50,10 +50,10 @@ FDCE_1 /*#(.INIT(1))*/ fd7(.C(C), .CE(1'b0), .D(D), .CLR(1'b0), .Q(Q[6]));
 FDPE_1 #(.INIT(1)) fd8(.C(C), .CE(1'b0), .D(D), .PRE(1'b0), .Q(Q[7]));
 endmodule
 EOT
-logger -expect warning "Module '\$paramod\\FDRE\\INIT=1' contains a \$dff cell .*" 1
-logger -expect warning "Module '\$paramod\\FDRE_1\\INIT=1' contains a \$dff cell .*" 1
-logger -expect warning "Module 'FDSE' contains a \$dff cell .*" 1
-logger -expect warning "Module '\$paramod\\FDSE_1\\INIT=1' contains a \$dff cell .*" 1
+logger -expect warning "Whitebox '\$paramod\\FDRE\\INIT=1' with \(\* abc9_flop \*\) contains a \$dff cell with non-zero initial state -- this is not supported for ABC9 sequential synthesis. Treating as a blackbox\." 1
+logger -expect warning "Whitebox '\$paramod\\FDRE_1\\INIT=1' with \(\* abc9_flop \*\) contains a \$dff cell with non-zero initial state -- this is not supported for ABC9 sequential synthesis. Treating as a blackbox\." 1
+logger -expect warning "Whitebox 'FDSE' with \(\* abc9_flop \*\) contains a \$dff cell with non-zero initial state -- this is not supported for ABC9 sequential synthesis. Treating as a blackbox\." 1
+logger -expect warning "Whitebox '\$paramod\\FDSE_1\\INIT=1' with \(\* abc9_flop \*\) contains a \$dff cell with non-zero initial state -- this is not supported for ABC9 sequential synthesis. Treating as a blackbox\." 1
 equiv_opt -assert -multiclock -map +/xilinx/cells_sim.v synth_xilinx -abc9 -dff -noiopad -noclkbuf
 design -load postopt
 select -assert-count 8 t:FD*