openfpga/src/fpga_spice/spice_subckt_writer.cpp
/********************************************************************
 * Print short connections inside a SPICE module
 * The short connection is defined as the direct connection
 * between an input port of the module and an output port of the module
 * This type of connection is not covered when printing SPICE instances
 * Therefore, they are covered in this function 
 *
 *            module
 *            +-----------------------------+
 *            |                             |
 *  inputA--->|---------------------------->|--->outputB
 *            |                             |
 *            |                             |
 *            |                             |
 *            +-----------------------------+
 *******************************************************************/
Print short connections inside a SPICE module
The short connection is defined as the direct connection
between an input port of the module and an output port of the module
This type of connection is not covered when printing SPICE instances
Therefore, they are covered in this function


Print short connections inside a SPICE module The short connection is defined as the direct connection between an input port of the module and an output port of the module This type of connection is not covered when printing SPICE instances Therefore they are covered in this function
static 
void print_spice_subckt_local_short_connections(std::fstream& fp, 
                                                const ModuleManager& module_manager,
                                                const ModuleId& module_id) {
  for (ModuleNetId module_net : module_manager.module_nets(module_id)) {
    if (false == module_net_include_local_short_connection(module_manager, module_id, module_net)) {
      continue;
    }
    print_spice_comment(fp, std::string("Local connection due to Wire " + std::to_string(size_t(module_net))));
    print_spice_subckt_local_short_connection(fp, module_manager, module_id, module_net); 
  }
}
static void print_spice_subckt_local_short_connections ( std :: fstream & fp , const ModuleManager & module_manager , const ModuleId & module_id ) { for ( ModuleNetId module_net : module_manager . module_nets ( module_id ) ) { if ( false == module_net_include_local_short_connection ( module_manager , module_id , module_net ) ) { continue ; } print_spice_comment ( fp , std :: string ( " " + std :: to_string ( size_t ( module_net ) ) ) ) ; print_spice_subckt_local_short_connection ( fp , module_manager , module_id , module_net ) ; } }
Print short connections inside a SPICE module
 The short connection is defined as the direct connection
 between an input port of the module and an output port of the module
 This type of connection is not covered when printing SPICE instances
 Therefore, they are covered in this function
Print short connections inside a SPICE module The short connection is defined as the direct connection between an input port of the module and an output port of the module This type of connection is not covered when printing SPICE instances Therefore they are covered in this function
/* Local wires come from the child modules */ /* We only care the nets that indicate short connections */