openfpga/src/fpga_spice/spice_passgate.cpp
/********************************************************************
 * Generate the SPICE subckt for a pass-gate
 *
 * Note: 
 * - This function supports both pass-transistor
 *   and transmission gates
 *******************************************************************/
Generate the SPICE subckt for a pass-gate
Note:
- This function supports both pass-transistor
and transmission gates
Generate the SPICE subckt for a pass - gate Note : - This function supports both pass - transistor and transmission gates
int print_spice_passgate_subckt(std::fstream& fp,
                                const ModuleManager& module_manager,
                                const ModuleId& module_id,
                                const CircuitLibrary& circuit_lib,
                                const CircuitModelId& circuit_model,
                                const TechnologyLibrary& tech_lib,
                                const TechnologyModelId& tech_model) {
  int status = CMD_EXEC_SUCCESS;
  if (CIRCUIT_MODEL_PASS_GATE_TRANSISTOR == circuit_lib.pass_gate_logic_type(circuit_model)) {
    status = print_spice_pass_transistor_subckt(fp,
                                                module_manager, module_id,
                                                circuit_lib, circuit_model,
                                                tech_lib, tech_model);
  } else if (CIRCUIT_MODEL_PASS_GATE_TRANSMISSION == circuit_lib.pass_gate_logic_type(circuit_model)) {
    status = print_spice_transmission_gate_subckt(fp,
                                                  module_manager, module_id,
                                                  circuit_lib, circuit_model,
                                                  tech_lib, tech_model);
  }
  return status;
}
int print_spice_passgate_subckt ( std :: fstream & fp , const ModuleManager & module_manager , const ModuleId & module_id , const CircuitLibrary & circuit_lib , const CircuitModelId & circuit_model , const TechnologyLibrary & tech_lib , const TechnologyModelId & tech_model ) { int status = CMD_EXEC_SUCCESS ; if ( CIRCUIT_MODEL_PASS_GATE_TRANSISTOR == circuit_lib . pass_gate_logic_type ( circuit_model ) ) { status = print_spice_pass_transistor_subckt ( fp , module_manager , module_id , circuit_lib , circuit_model , tech_lib , tech_model ) ; } else if ( CIRCUIT_MODEL_PASS_GATE_TRANSMISSION == circuit_lib . pass_gate_logic_type ( circuit_model ) ) { status = print_spice_transmission_gate_subckt ( fp , module_manager , module_id , circuit_lib , circuit_model , tech_lib , tech_model ) ; } return status ; }
Generate the SPICE subckt for a pass-gate
 Note:
 - This function supports both pass-transistor
   and transmission gates
Generate the SPICE subckt for a pass - gate Note : - This function supports both pass - transistor and transmission gates