openfpga/src/fpga_spice/spice_subckt_writer.cpp
/********************************************************************
 * Generate the name of a local wire for a undriven port inside SPICE 
 * module 
 *******************************************************************/
Generate the name of a local wire for a undriven port inside SPICE
module
Generate the name of a local wire for a undriven port inside SPICE module
static 
std::string generate_spice_undriven_local_wire_name(const ModuleManager& module_manager, 
                                                    const ModuleId& parent, 
                                                    const ModuleId& child, 
                                                    const size_t& instance_id, 
                                                    const ModulePortId& child_port_id) {
  std::string wire_name;
  if (!module_manager.instance_name(parent, child, instance_id).empty()) {
    wire_name = module_manager.instance_name(parent, child, instance_id);
  } else {
    wire_name = module_manager.module_name(parent) + std::string("_") + std::to_string(instance_id); 
    wire_name += std::string("_");
  }
  wire_name += std::string("_undriven_");
  wire_name += module_manager.module_port(child, child_port_id).get_name();
  return wire_name;
}
static std :: string generate_spice_undriven_local_wire_name ( const ModuleManager & module_manager , const ModuleId & parent , const ModuleId & child , const size_t & instance_id , const ModulePortId & child_port_id ) { std :: string wire_name ; if ( ! module_manager . instance_name ( parent , child , instance_id ) . empty ( ) ) { wire_name = module_manager . instance_name ( parent , child , instance_id ) ; } else { wire_name = module_manager . module_name ( parent ) + std :: string ( " " ) + std :: to_string ( instance_id ) ; wire_name += std :: string ( " " ) ; } wire_name += std :: string ( " " ) ; wire_name += module_manager . module_port ( child , child_port_id ) . get_name ( ) ; return wire_name ; }
Generate the name of a local wire for a undriven port inside SPICE
 module
Generate the name of a local wire for a undriven port inside SPICE module