openfpga/src/annotation/check_netlist_naming_conflict.cpp
/********************************************************************
 * Correct and report any naming conflict by checking a list of 
 * sensitive characters
 * - Iterate over all the blocks and correct any block name that contains 
 *   any sensitive character
 * - Iterate over all the nets and correct any net name that contains
 *   any sensitive character
 *******************************************************************/
Correct and report any naming conflict by checking a list of
sensitive characters
- Iterate over all the blocks and correct any block name that contains
any sensitive character
- Iterate over all the nets and correct any net name that contains
any sensitive character
Correct and report any naming conflict by checking a list of sensitive characters - Iterate over all the blocks and correct any block name that contains any sensitive character - Iterate over all the nets and correct any net name that contains any sensitive character
static 
void fix_netlist_naming_conflict(const AtomNetlist& atom_netlist,
                                 const std::string& sensitive_chars,
                                 const std::string& fix_chars,
                                 VprNetlistAnnotation& vpr_netlist_annotation) {
  size_t num_fixes = 0;
  for (const auto& block : atom_netlist.blocks()) {
    const std::string& block_name = atom_netlist.block_name(block);
    const std::string& violation = name_contain_sensitive_chars(block_name, sensitive_chars);
    if (false == violation.empty()) {
      vpr_netlist_annotation.rename_block(block, fix_name_contain_sensitive_chars(block_name, sensitive_chars, fix_chars)); 
      num_fixes++;
    }
  }
  for (const auto& net : atom_netlist.nets()) {
    const std::string& net_name = atom_netlist.net_name(net);
    const std::string& violation = name_contain_sensitive_chars(net_name, sensitive_chars);
    if (false == violation.empty()) {
      vpr_netlist_annotation.rename_net(net, fix_name_contain_sensitive_chars(net_name, sensitive_chars, fix_chars)); 
      num_fixes++;
    }
  }
  if (0 < num_fixes) {
    VTR_LOG("Fixed %ld naming conflicts in the netlist.\n",
            num_fixes);
  }
}
static void fix_netlist_naming_conflict ( const AtomNetlist & atom_netlist , const std :: string & sensitive_chars , const std :: string & fix_chars , VprNetlistAnnotation & vpr_netlist_annotation ) { size_t num_fixes = 0 ; for ( const auto & block : atom_netlist . blocks ( ) ) { const std :: string & block_name = atom_netlist . block_name ( block ) ; const std :: string & violation = name_contain_sensitive_chars ( block_name , sensitive_chars ) ; if ( false == violation . empty ( ) ) { vpr_netlist_annotation . rename_block ( block , fix_name_contain_sensitive_chars ( block_name , sensitive_chars , fix_chars ) ) ; num_fixes ++ ; } } for ( const auto & net : atom_netlist . nets ( ) ) { const std :: string & net_name = atom_netlist . net_name ( net ) ; const std :: string & violation = name_contain_sensitive_chars ( net_name , sensitive_chars ) ; if ( false == violation . empty ( ) ) { vpr_netlist_annotation . rename_net ( net , fix_name_contain_sensitive_chars ( net_name , sensitive_chars , fix_chars ) ) ; num_fixes ++ ; } } if ( 0 < num_fixes ) { VTR_LOG ( " \n " , num_fixes ) ; } }
Correct and report any naming conflict by checking a list of
 sensitive characters
 - Iterate over all the blocks and correct any block name that contains
   any sensitive character
 - Iterate over all the nets and correct any net name that contains
   any sensitive character
Correct and report any naming conflict by checking a list of sensitive characters - Iterate over all the blocks and correct any block name that contains any sensitive character - Iterate over all the nets and correct any net name that contains any sensitive character
/* Walk through blocks in the netlist */ /* Apply fix-up here */ /* Walk through nets in the netlist */ /* Apply fix-up here */