@@ -168,12 +168,12 @@ string get_full_netlist_name(Netlist *nl)
168168
169169std::string format_src_location (DesignObj *obj)
170170{
171- if (obj == nullptr || obj->Linefile () == nullptr )
171+ if (obj == nullptr || ! obj->Linefile ())
172172 return std::string ();
173173#ifdef VERIFIC_LINEFILE_INCLUDES_COLUMNS
174- return stringf (" %s:%d.%d-%d.%d" , LineFile::GetFileName (obj->Linefile ()), obj->Linefile ()->GetLeftLine (), obj->Linefile ()->GetLeftCol (), obj->Linefile ()->GetRightLine (), obj->Linefile ()->GetRightCol ());
174+ return stringf (" %s:%d.%d-%d.%d" , LineFile::GetFileName (obj->Linefile ()), obj->Linefile ()->GetLeftLine (), obj->Linefile ()->GetLeftCol (), obj->Linefile ()->GetRightLine (), obj->Linefile ()->GetRightCol ());
175175#else
176- return stringf (" %s:%d" , LineFile::GetFileName (obj->Linefile ()), LineFile::GetLineNo (obj->Linefile ()));
176+ return stringf (" %s:%d" , LineFile::GetFileName (obj->Linefile ()), LineFile::GetLineNo (obj->Linefile ()));
177177#endif
178178}
179179
@@ -1663,7 +1663,7 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
16631663 if (*ascii_initdata == 0 )
16641664 break ;
16651665 if (*ascii_initdata == ' 0' || *ascii_initdata == ' 1' ) {
1666- initval.bits ()[ bit_idx] = (*ascii_initdata == ' 0' ) ? State::S0 : State::S1;
1666+ initval.set ( bit_idx, (*ascii_initdata == ' 0' ) ? State::S0 : State::S1) ;
16671667 initval_valid = true ;
16681668 }
16691669 ascii_initdata++;
@@ -1787,9 +1787,9 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
17871787
17881788 if (init_nets.count (net)) {
17891789 if (init_nets.at (net) == ' 0' )
1790- initval.bits (). at ( bitidx) = State::S0;
1790+ initval.set ( bitidx, State::S0) ;
17911791 if (init_nets.at (net) == ' 1' )
1792- initval.bits (). at ( bitidx) = State::S1;
1792+ initval.set ( bitidx, State::S1) ;
17931793 initval_valid = true ;
17941794 init_nets.erase (net);
17951795 }
@@ -1862,13 +1862,13 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
18621862 if (bit.wire ->attributes .count (ID::init))
18631863 initval = bit.wire ->attributes .at (ID::init);
18641864
1865- while (GetSize (initval) < GetSize (bit.wire ))
1866- initval.bits (). push_back ( State::Sx);
1865+ if (GetSize (initval) < GetSize (bit.wire ))
1866+ initval.resize ( GetSize (bit. wire ), State::Sx);
18671867
18681868 if (it.second == ' 0' )
1869- initval.bits (). at ( bit.offset ) = State::S0;
1869+ initval.set ( bit.offset , State::S0) ;
18701870 if (it.second == ' 1' )
1871- initval.bits (). at ( bit.offset ) = State::S1;
1871+ initval.set ( bit.offset , State::S1) ;
18721872
18731873 bit.wire ->attributes [ID::init] = initval;
18741874 }
@@ -1995,7 +1995,7 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
19951995 if (import_netlist_instance_cells (inst, inst_name))
19961996 continue ;
19971997 if (inst->IsOperator () && !verific_sva_prims.count (inst->Type ()))
1998- log_warning (" Unsupported Verific operator: %s (fallback to gate level implementation provided by verific)\n " , inst->View ()->Owner ()->Name ());
1998+ log_warning (" %sUnsupported Verific operator: %s (fallback to gate level implementation provided by verific)\n " , announce_src_location (inst) , inst->View ()->Owner ()->Name ());
19991999 } else {
20002000 if (import_netlist_instance_gates (inst, inst_name))
20012001 continue ;
@@ -2055,7 +2055,7 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
20552055 }
20562056
20572057 Const qx_init = Const (State::S1, width);
2058- qx_init.bits (). resize (2 * width, State::S0);
2058+ qx_init.resize (2 * width, State::S0);
20592059
20602060 clocking.addDff (new_verific_id (inst), sig_dx, sig_qx, qx_init);
20612061 module ->addXnor (new_verific_id (inst), sig_dx, sig_qx, sig_ox);
@@ -2320,7 +2320,7 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
23202320 continue ;
23212321
23222322 if (non_ff_bits.count (SigBit (wire, i)))
2323- initval.bits ()[i] = State::Sx;
2323+ initval.set (i, State::Sx) ;
23242324 }
23252325
23262326 if (wire->port_input ) {
@@ -2513,7 +2513,7 @@ Cell *VerificClocking::addDff(IdString name, SigSpec sig_d, SigSpec sig_q, Const
25132513 if (c.wire && c.wire ->attributes .count (ID::init)) {
25142514 Const val = c.wire ->attributes .at (ID::init);
25152515 for (int i = 0 ; i < GetSize (c); i++)
2516- initval.bits ()[ offset+i] = val[c.offset +i];
2516+ initval.set ( offset+i, val[c.offset +i]) ;
25172517 }
25182518 offset += GetSize (c);
25192519 }
@@ -2584,7 +2584,7 @@ Cell *VerificClocking::addAldff(IdString name, RTLIL::SigSpec sig_aload, RTLIL::
25842584 if (c.wire && c.wire ->attributes .count (ID::init)) {
25852585 Const val = c.wire ->attributes .at (ID::init);
25862586 for (int i = 0 ; i < GetSize (c); i++)
2587- initval.bits ()[ offset+i] = val[c.offset +i];
2587+ initval.set ( offset+i, val[c.offset +i]) ;
25882588 }
25892589 offset += GetSize (c);
25902590 }
0 commit comments