openfpga/src/annotation/check_netlist_naming_conflict.cpp
/********************************************************************
 * Detect and report any naming conflict by checking a list of 
 * sensitive characters
 * - Iterate over all the blocks and see if any block name contain 
 *   any sensitive character
 * - Iterate over all the nets and see if any net name contain 
 *   any sensitive character
 *******************************************************************/
Detect and report any naming conflict by checking a list of
sensitive characters
- Iterate over all the blocks and see if any block name contain
any sensitive character
- Iterate over all the nets and see if any net name contain
any sensitive character
Detect and report any naming conflict by checking a list of sensitive characters - Iterate over all the blocks and see if any block name contain any sensitive character - Iterate over all the nets and see if any net name contain any sensitive character
static 
size_t detect_netlist_naming_conflict(const AtomNetlist& atom_netlist,
                                    const std::string& sensitive_chars) {
  size_t num_conflicts = 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()) {
      VTR_LOG("Block '%s' contains illegal characters '%s'\n",
              block_name.c_str(), violation.c_str());
      num_conflicts++;
    }
  }
  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()) {
      VTR_LOG("Net '%s' contains illegal characters '%s'\n",
              net_name.c_str(), violation.c_str());
      num_conflicts++;
    }
  }
  return num_conflicts;
}
static size_t detect_netlist_naming_conflict ( const AtomNetlist & atom_netlist , const std :: string & sensitive_chars ) { size_t num_conflicts = 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 ( ) ) { VTR_LOG ( " \n " , block_name . c_str ( ) , violation . c_str ( ) ) ; num_conflicts ++ ; } } 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 ( ) ) { VTR_LOG ( " \n " , net_name . c_str ( ) , violation . c_str ( ) ) ; num_conflicts ++ ; } } return num_conflicts ; }
Detect and report any naming conflict by checking a list of
 sensitive characters
 - Iterate over all the blocks and see if any block name contain
   any sensitive character
 - Iterate over all the nets and see if any net name contain
   any sensitive character
Detect and report any naming conflict by checking a list of sensitive characters - Iterate over all the blocks and see if any block name contain any sensitive character - Iterate over all the nets and see if any net name contain any sensitive character
/* Walk through blocks in the netlist */ /* Walk through nets in the netlist */