KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SPICE_CIRCUIT_MODEL Class Reference

Special netlist exporter flavor that allows one to override simulation commands. More...

#include <spice_circuit_model.h>

Inheritance diagram for SPICE_CIRCUIT_MODEL:
NETLIST_EXPORTER_SPICE SIMULATION_MODEL NETLIST_EXPORTER_BASE

Public Types

enum  OPTIONS {
  OPTION_ADJUST_INCLUDE_PATHS = 0x0010 , OPTION_ADJUST_PASSIVE_VALS = 0x0020 , OPTION_SAVE_ALL_VOLTAGES = 0x0040 , OPTION_SAVE_ALL_CURRENTS = 0x0080 ,
  OPTION_SAVE_ALL_DISSIPATIONS = 0x0100 , OPTION_CUR_SHEET_AS_ROOT = 0x0200 , OPTION_SIM_COMMAND = 0x0400 , OPTION_SAVE_ALL_EVENTS = 0x0800 ,
  OPTION_DEFAULT_FLAGS
}
 

Public Member Functions

 SPICE_CIRCUIT_MODEL (SCHEMATIC *aSchematic)
 
virtual ~SPICE_CIRCUIT_MODEL ()
 
SIM_TRACE_TYPE VectorToSignal (const std::string &aVector, wxString &aSignal) const
 Return name of Spice dataset for a specific trace.
 
bool GetNetlist (const wxString &aCommand, unsigned aOptions, OUTPUTFORMATTER *aFormatter, REPORTER &aReporter)
 
wxString GetSchTextSimCommand ()
 Return simulation command directives placed in schematic sheets (if any).
 
bool ParseDCCommand (const wxString &aCmd, SPICE_DC_PARAMS *aSource1, SPICE_DC_PARAMS *aSource2)
 Parse a two-source .dc command directive into its symbols.
 
bool ParsePZCommand (const wxString &aCmd, wxString *transferFunction, wxString *input, wxString *inputRef, wxString *output, wxString *outputRef, SPICE_PZ_ANALYSES *analyses)
 
bool ParseNoiseCommand (const wxString &aCmd, wxString *aOutput, wxString *aRef, wxString *aSource, wxString *aScale, SPICE_VALUE *aPts, SPICE_VALUE *aFStart, SPICE_VALUE *aFStop, bool *aSaveAll)
 
bool WriteNetlist (const wxString &aOutFileName, unsigned aNetlistOptions, REPORTER &aReporter) override
 Write to specified output file.
 
bool DoWriteNetlist (const wxString &aSimCommand, unsigned aSimOptions, OUTPUTFORMATTER &aFormatter, REPORTER &aReporter)
 Write the netlist in aFormatter.
 
virtual void WriteHead (OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions)
 Write the netlist head (title and so on).
 
virtual void WriteTail (OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions)
 Write the tail (.end).
 
virtual bool ReadSchematicAndLibraries (unsigned aNetlistOptions, REPORTER &aReporter)
 Process the schematic and Spice libraries to create net mapping and a list of SPICE_ITEMs.
 
std::set< wxString > GetNets () const
 Return the list of nets.
 
wxString GetItemName (const wxString &aRefName) const
 Return name of Spice device corresponding to a schematic symbol.
 
const std::list< SPICE_ITEM > & GetItems () const
 Return the list of items representing schematic symbols in the Spice world.
 
const SPICE_ITEMFindItem (const wxString &aRefName) const
 Find and return the item corresponding to aRefName.
 
const std::vector< wxString > & GetDirectives ()
 

Static Public Member Functions

static bool IsSimCommand (const wxString &aCmd)
 Determine if a directive is a simulation command.
 
static SIM_TYPE CommandToSimType (const wxString &aCmd)
 Return simulation type basing on a simulation command directive.
 
static void ConvertToSpiceMarkup (wxString *aNetName)
 Remove formatting wrappers and replace illegal spice net name characters with underscores.
 
static wxString MakeCommandLine (const wxString &aFormatString, const wxString &aNetlistFile, const wxString &aFinalFile, const wxString &aProjectDirectory)
 Build up a string that describes a command line for executing a child process.
 

Protected Member Functions

void WriteDirectives (const wxString &aSimCommand, unsigned aSimOptions, OUTPUTFORMATTER &aFormatter) const override
 
void ReadDirectives (unsigned aNetlistOptions)
 
virtual wxString GenerateItemPinNetName (const wxString &aNetName, int &aNcCounter) const
 
SCH_SHEET_LIST BuildSheetList (unsigned aNetlistOptions=0) const
 Return the paths of exported sheets (either all or the current one).
 
std::vector< PIN_INFOCreatePinList (SCH_SYMBOL *aSymbol, const SCH_SHEET_PATH &aSheetPath, bool aKeepUnconnectedPins)
 Find a symbol from the DrawList and builds its pin list.
 
SCH_SYMBOLfindNextSymbol (EDA_ITEM *aItem, const SCH_SHEET_PATH &aSheetPath)
 Check if the given symbol should be processed for netlisting.
 
void eraseDuplicatePins (std::vector< PIN_INFO > &pins)
 Erase duplicate pins.
 
void findAllUnitsOfSymbol (SCH_SYMBOL *aSchSymbol, const SCH_SHEET_PATH &aSheetPath, std::vector< PIN_INFO > &aPins, bool aKeepUnconnectedPins)
 Find all units for symbols with multiple symbols per package.
 

Protected Attributes

UNIQUE_STRINGS m_referencesAlreadyFound
 Used for "multiple symbols per package" symbols to avoid processing a lib symbol more than once.
 
std::set< LIB_SYMBOL *, LIB_SYMBOL_LESS_THANm_libParts
 unique library symbols used. LIB_SYMBOL items are sorted by names
 
SCHEMATICm_schematic
 The schematic we're generating a netlist for.
 

Private Member Functions

void readRefName (SCH_SHEET_PATH &aSheet, SCH_SYMBOL &aSymbol, SPICE_ITEM &aItem, std::set< std::string > &aRefNames)
 
void readModel (SCH_SHEET_PATH &aSheet, SCH_SYMBOL &aSymbol, SPICE_ITEM &aItem, REPORTER &aReporter)
 
void readPinNumbers (SCH_SYMBOL &aSymbol, SPICE_ITEM &aItem, const std::vector< PIN_INFO > &aPins)
 
void readPinNetNames (SCH_SYMBOL &aSymbol, SPICE_ITEM &aItem, const std::vector< PIN_INFO > &aPins, int &aNcCounter)
 
void getNodePattern (SPICE_ITEM &aItem, std::vector< std::string > &aModifiers)
 
void readNodePattern (SPICE_ITEM &aItem)
 
void writeInclude (OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions, const wxString &aPath)
 
void writeIncludes (OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions)
 
void writeModels (OUTPUTFORMATTER &aFormatter)
 
void writeItems (OUTPUTFORMATTER &aFormatter)
 

Private Attributes

SIM_LIB_MGR m_libMgr
 Holds libraries and models.
 
NAME_GENERATOR m_modelNameGenerator
 Generates unique model names.
 
std::vector< wxString > m_directives
 Spice directives found in the schematic sheet.
 
std::set< wxString > m_rawIncludes
 include directives found in symbols
 
std::set< wxString > m_nets
 Items representing schematic symbols in Spice world.
 
std::list< SPICE_ITEMm_items
 

Detailed Description

Special netlist exporter flavor that allows one to override simulation commands.

Definition at line 54 of file spice_circuit_model.h.

Member Enumeration Documentation

◆ OPTIONS

Enumerator
OPTION_ADJUST_INCLUDE_PATHS 
OPTION_ADJUST_PASSIVE_VALS 
OPTION_SAVE_ALL_VOLTAGES 
OPTION_SAVE_ALL_CURRENTS 
OPTION_SAVE_ALL_DISSIPATIONS 
OPTION_CUR_SHEET_AS_ROOT 
OPTION_SIM_COMMAND 
OPTION_SAVE_ALL_EVENTS 
OPTION_DEFAULT_FLAGS 

Definition at line 52 of file netlist_exporter_spice.h.

Constructor & Destructor Documentation

◆ SPICE_CIRCUIT_MODEL()

SPICE_CIRCUIT_MODEL::SPICE_CIRCUIT_MODEL ( SCHEMATIC * aSchematic)
inline

◆ ~SPICE_CIRCUIT_MODEL()

virtual SPICE_CIRCUIT_MODEL::~SPICE_CIRCUIT_MODEL ( )
inlinevirtual

Definition at line 61 of file spice_circuit_model.h.

Member Function Documentation

◆ BuildSheetList()

SCH_SHEET_LIST NETLIST_EXPORTER_SPICE::BuildSheetList ( unsigned aNetlistOptions = 0) const
protectedinherited

Return the paths of exported sheets (either all or the current one).

Definition at line 704 of file netlist_exporter_spice.cpp.

References SCH_SHEET_PATH::GetExcludedFromSim(), NETLIST_EXPORTER_BASE::m_schematic, and OPTION_CUR_SHEET_AS_ROOT.

Referenced by ReadDirectives(), NETLIST_EXPORTER_SPICE_MODEL::readPorts(), and ReadSchematicAndLibraries().

◆ CommandToSimType()

SIM_TYPE SPICE_CIRCUIT_MODEL::CommandToSimType ( const wxString & aCmd)
static

◆ ConvertToSpiceMarkup()

void NETLIST_EXPORTER_SPICE::ConvertToSpiceMarkup ( wxString * aNetName)
staticinherited

Remove formatting wrappers and replace illegal spice net name characters with underscores.

Definition at line 218 of file netlist_exporter_spice.cpp.

References MARKUP::MARKUP_PARSER::Parse().

Referenced by GenerateItemPinNetName(), SCHEMATIC::GetOperatingPoint(), SIMULATOR_FRAME_UI::rebuildSignalsList(), and SCH_EDITOR_CONTROL::SimProbe().

◆ CreatePinList()

std::vector< PIN_INFO > NETLIST_EXPORTER_BASE::CreatePinList ( SCH_SYMBOL * aSymbol,
const SCH_SHEET_PATH & aSheetPath,
bool aKeepUnconnectedPins )
protectedinherited

Find a symbol from the DrawList and builds its pin list.

This list is sorted by pin number. The symbol is the next actual symbol after aSymbol. Power symbols and virtual symbols that have their reference designators starting with '#' are skipped. if aKeepUnconnectedPins = false, unconnected pins will be removed from list but usually we need all pins in netlists.

Definition at line 128 of file netlist_exporter_base.cpp.

References eraseDuplicatePins(), findAllUnitsOfSymbol(), CONNECTION_GRAPH::FindSubgraphByName(), CONNECTION_SUBGRAPH::GetItems(), SCH_SYMBOL::GetLibSymbolRef(), CONNECTION_SUBGRAPH::GetNoConnect(), SCH_SYMBOL::GetPins(), SCH_SYMBOL::GetRef(), LIB_SYMBOL::GetUnitCount(), SCH_SYMBOL::IsPower(), m_libParts, m_schematic, and pin.

Referenced by NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().

◆ DoWriteNetlist()

bool NETLIST_EXPORTER_SPICE::DoWriteNetlist ( const wxString & aSimCommand,
unsigned aSimOptions,
OUTPUTFORMATTER & aFormatter,
REPORTER & aReporter )
inherited

◆ eraseDuplicatePins()

void NETLIST_EXPORTER_BASE::eraseDuplicatePins ( std::vector< PIN_INFO > & pins)
protectedinherited

Erase duplicate pins.

(This is a list of pins found in the whole schematic, for a single symbol.) These duplicate pins were put in list because some pins (power pins...) are found more than once when in "multiple symbols per package" symbols. For instance, a 74ls00 has 4 symbols, and therefore the VCC pin and GND pin appears 4 times in the list. Note: this list MUST be sorted by pin number (.m_PinNum member value) Also set the m_Flag member of "removed" NETLIST_OBJECT pin item to 1

Definition at line 215 of file netlist_exporter_base.cpp.

Referenced by CreatePinList().

◆ findAllUnitsOfSymbol()

void NETLIST_EXPORTER_BASE::findAllUnitsOfSymbol ( SCH_SYMBOL * aSchSymbol,
const SCH_SHEET_PATH & aSheetPath,
std::vector< PIN_INFO > & aPins,
bool aKeepUnconnectedPins )
protectedinherited

Find all units for symbols with multiple symbols per package.

Search the entire design for all units of aSymbol based on matching reference designator, and for each unit, add all its pins to the sorted pin list. if aKeepUnconnectedPins = false, unconnected pins will be removed from list but usually we need all pins in netlists.

Definition at line 248 of file netlist_exporter_base.cpp.

References CONNECTION_GRAPH::FindSubgraphByName(), CONNECTION_SUBGRAPH::GetItems(), CONNECTION_SUBGRAPH::GetNoConnect(), SCH_SYMBOL::GetPins(), SCH_SYMBOL::GetRef(), m_schematic, pin, and SCH_SYMBOL_T.

Referenced by CreatePinList().

◆ FindItem()

const SPICE_ITEM * NETLIST_EXPORTER_SPICE::FindItem ( const wxString & aRefName) const
inherited

Find and return the item corresponding to aRefName.

Definition at line 280 of file netlist_exporter_spice.cpp.

References GetItems().

Referenced by SIMULATOR_FRAME_UI::applyTuners(), and GetItemName().

◆ findNextSymbol()

SCH_SYMBOL * NETLIST_EXPORTER_BASE::findNextSymbol ( EDA_ITEM * aItem,
const SCH_SHEET_PATH & aSheetPath )
protectedinherited

Check if the given symbol should be processed for netlisting.

Prevent processing multi-unit symbols more than once, etc.

Parameters
aItemis a symbol to check
aSheetPathis the sheet to check the symbol for
Returns
the symbol if it should be processed, or nullptr

Definition at line 82 of file netlist_exporter_base.cpp.

References SCH_SCREEN::GetLibSymbols(), SCH_SYMBOL::GetRef(), SCH_SYMBOL::GetSchSymbolLibraryName(), LIB_SYMBOL::GetUnitCount(), SCH_SHEET_PATH::LastScreen(), m_libParts, m_referencesAlreadyFound, SCH_SYMBOL_T, and EDA_ITEM::Type().

Referenced by NETLIST_EXPORTER_ALLEGRO::extractComponentsInfo(), NETLIST_EXPORTER_XML::makeSymbols(), NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), NETLIST_EXPORTER_CADSTAR::WriteNetlist(), NETLIST_EXPORTER_ORCADPCB2::WriteNetlist(), and NETLIST_EXPORTER_PADS::WriteNetlist().

◆ GenerateItemPinNetName()

wxString NETLIST_EXPORTER_SPICE::GenerateItemPinNetName ( const wxString & aNetName,
int & aNcCounter ) const
protectedvirtualinherited

◆ GetDirectives()

const std::vector< wxString > & NETLIST_EXPORTER_SPICE::GetDirectives ( )
inlineinherited

Definition at line 133 of file netlist_exporter_spice.h.

References m_directives.

Referenced by SPICE_CIRCUIT_MODEL::GetSchTextSimCommand().

◆ GetItemName()

wxString NETLIST_EXPORTER_SPICE::GetItemName ( const wxString & aRefName) const
inherited

Return name of Spice device corresponding to a schematic symbol.

Parameters
aRefNameis the component reference.
Returns
Spice device name or empty string if there is no such symbol in the netlist. Normally the name is either a plain reference if the first character of reference corresponds to the assigned device model type or a reference prefixed with a character defining the device model type.

Definition at line 271 of file netlist_exporter_spice.cpp.

References FindItem().

◆ GetItems()

const std::list< SPICE_ITEM > & NETLIST_EXPORTER_SPICE::GetItems ( ) const
inlineinherited

Return the list of items representing schematic symbols in the Spice world.

Definition at line 126 of file netlist_exporter_spice.h.

References m_items.

Referenced by FindItem(), and DIALOG_SIM_MODEL< T >::newParamProperty().

◆ GetNetlist()

bool SPICE_CIRCUIT_MODEL::GetNetlist ( const wxString & aCommand,
unsigned aOptions,
OUTPUTFORMATTER * aFormatter,
REPORTER & aReporter )
inline

Definition at line 73 of file spice_circuit_model.h.

References NETLIST_EXPORTER_SPICE::DoWriteNetlist().

Referenced by NGSPICE::Attach().

◆ GetNets()

std::set< wxString > NETLIST_EXPORTER_SPICE::GetNets ( ) const
inlineinherited

Return the list of nets.

Definition at line 110 of file netlist_exporter_spice.h.

References m_nets.

◆ getNodePattern()

void NETLIST_EXPORTER_SPICE::getNodePattern ( SPICE_ITEM & aItem,
std::vector< std::string > & aModifiers )
privateinherited

◆ GetSchTextSimCommand()

wxString SPICE_CIRCUIT_MODEL::GetSchTextSimCommand ( )

Return simulation command directives placed in schematic sheets (if any).

Definition at line 84 of file spice_circuit_model.cpp.

References NETLIST_EXPORTER_SPICE::GetDirectives(), IsSimCommand(), and NETLIST_EXPORTER_SPICE::ReadDirectives().

Referenced by SIMULATOR_FRAME_UI::InitWorkbook().

◆ IsSimCommand()

static bool SPICE_CIRCUIT_MODEL::IsSimCommand ( const wxString & aCmd)
inlinestatic

Determine if a directive is a simulation command.

Definition at line 104 of file spice_circuit_model.h.

References CommandToSimType(), and ST_UNKNOWN.

Referenced by GetSchTextSimCommand().

◆ MakeCommandLine()

wxString NETLIST_EXPORTER_BASE::MakeCommandLine ( const wxString & aFormatString,
const wxString & aNetlistFile,
const wxString & aFinalFile,
const wxString & aProjectDirectory )
staticinherited

Build up a string that describes a command line for executing a child process.

The input and output file names along with any options to the executable are all possibly in the returned string.

Parameters
aFormatStringholds:
  • the name of the external program
  • any options needed by that program
  • formatting sequences, see below.
aNetlistFileis the name of the input file for the external program, that is a intermediate netlist file in xml format.
aFinalFileis the name of the output file that the user expects.
aProjectDirectoryis used for P replacement, it should omit the trailing '/'.

Supported formatting sequences and their meaning:

  • B => base filename of selected output file, minus path and extension.
  • I => complete filename and path of the temporary input file.
  • O => complete filename and path of the user chosen output file.
  • P => project directory, without name and without trailing '/'

Definition at line 46 of file netlist_exporter_base.cpp.

Referenced by SCH_EDIT_FRAME::WriteNetListFile().

◆ ParseDCCommand()

bool SPICE_CIRCUIT_MODEL::ParseDCCommand ( const wxString & aCmd,
SPICE_DC_PARAMS * aSource1,
SPICE_DC_PARAMS * aSource2 )

Parse a two-source .dc command directive into its symbols.

Parameters
aCmdis the input command string
Returns
true if the command was parsed successfully

Definition at line 122 of file spice_circuit_model.cpp.

References SPICE_DC_PARAMS::m_source, SPICE_DC_PARAMS::m_vend, SPICE_DC_PARAMS::m_vincrement, and SPICE_DC_PARAMS::m_vstart.

◆ ParseNoiseCommand()

bool SPICE_CIRCUIT_MODEL::ParseNoiseCommand ( const wxString & aCmd,
wxString * aOutput,
wxString * aRef,
wxString * aSource,
wxString * aScale,
SPICE_VALUE * aPts,
SPICE_VALUE * aFStart,
SPICE_VALUE * aFStop,
bool * aSaveAll )

Definition at line 189 of file spice_circuit_model.cpp.

Referenced by SIMULATOR_FRAME_UI::getNoiseSource().

◆ ParsePZCommand()

bool SPICE_CIRCUIT_MODEL::ParsePZCommand ( const wxString & aCmd,
wxString * transferFunction,
wxString * input,
wxString * inputRef,
wxString * output,
wxString * outputRef,
SPICE_PZ_ANALYSES * analyses )

◆ ReadDirectives()

void NETLIST_EXPORTER_SPICE::ReadDirectives ( unsigned aNetlistOptions)
protectedinherited

◆ readModel()

◆ readNodePattern()

void NETLIST_EXPORTER_SPICE::readNodePattern ( SPICE_ITEM & aItem)
privateinherited

◆ readPinNetNames()

void NETLIST_EXPORTER_SPICE::readPinNetNames ( SCH_SYMBOL & aSymbol,
SPICE_ITEM & aItem,
const std::vector< PIN_INFO > & aPins,
int & aNcCounter )
privateinherited

◆ readPinNumbers()

void NETLIST_EXPORTER_SPICE::readPinNumbers ( SCH_SYMBOL & aSymbol,
SPICE_ITEM & aItem,
const std::vector< PIN_INFO > & aPins )
privateinherited

Definition at line 469 of file netlist_exporter_spice.cpp.

References pin, and SPICE_ITEM::pinNumbers.

Referenced by ReadSchematicAndLibraries().

◆ readRefName()

void NETLIST_EXPORTER_SPICE::readRefName ( SCH_SHEET_PATH & aSheet,
SCH_SYMBOL & aSymbol,
SPICE_ITEM & aItem,
std::set< std::string > & aRefNames )
privateinherited

Definition at line 411 of file netlist_exporter_spice.cpp.

References SCH_SYMBOL::GetRef(), and SPICE_ITEM::refName.

Referenced by ReadSchematicAndLibraries().

◆ ReadSchematicAndLibraries()

bool NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries ( unsigned aNetlistOptions,
REPORTER & aReporter )
virtualinherited

◆ VectorToSignal()

SIM_TRACE_TYPE SPICE_CIRCUIT_MODEL::VectorToSignal ( const std::string & aVector,
wxString & aSignal ) const

Return name of Spice dataset for a specific trace.

Parameters
aVectoris name of the vector produced by ngspice
[out]aSignalis output in form: V(R1), Ib(Q2), I(L8)
Returns
[SPT_VOLTAGE, SPT_CURRENT]. Otherwise SPT_UNKNOWN if vector is of different, unsupported type.

Definition at line 35 of file spice_circuit_model.cpp.

References POWER, SPT_CURRENT, SPT_POWER, SPT_UNKNOWN, and SPT_VOLTAGE.

Referenced by SIMULATOR_FRAME_UI::OnSimRefresh().

◆ WriteDirectives()

void SPICE_CIRCUIT_MODEL::WriteDirectives ( const wxString & aSimCommand,
unsigned aSimOptions,
OUTPUTFORMATTER & aFormatter ) const
overrideprotectedvirtual

◆ WriteHead()

void NETLIST_EXPORTER_SPICE::WriteHead ( OUTPUTFORMATTER & aFormatter,
unsigned aNetlistOptions )
virtualinherited

Write the netlist head (title and so on).

Reimplemented in NETLIST_EXPORTER_SPICE_MODEL.

Definition at line 110 of file netlist_exporter_spice.cpp.

References OUTPUTFORMATTER::Print().

Referenced by DoWriteNetlist().

◆ writeInclude()

void NETLIST_EXPORTER_SPICE::writeInclude ( OUTPUTFORMATTER & aFormatter,
unsigned aNetlistOptions,
const wxString & aPath )
privateinherited

◆ writeIncludes()

void NETLIST_EXPORTER_SPICE::writeIncludes ( OUTPUTFORMATTER & aFormatter,
unsigned aNetlistOptions )
privateinherited

Definition at line 597 of file netlist_exporter_spice.cpp.

References library, m_libMgr, m_rawIncludes, path, and writeInclude().

Referenced by DoWriteNetlist().

◆ writeItems()

void NETLIST_EXPORTER_SPICE::writeItems ( OUTPUTFORMATTER & aFormatter)
privateinherited

Definition at line 622 of file netlist_exporter_spice.cpp.

References m_items, and OUTPUTFORMATTER::Print().

Referenced by DoWriteNetlist().

◆ writeModels()

void NETLIST_EXPORTER_SPICE::writeModels ( OUTPUTFORMATTER & aFormatter)
privateinherited

Definition at line 610 of file netlist_exporter_spice.cpp.

References m_items, and OUTPUTFORMATTER::Print().

Referenced by DoWriteNetlist().

◆ WriteNetlist()

bool NETLIST_EXPORTER_SPICE::WriteNetlist ( const wxString & aOutFileName,
unsigned aNetlistOptions,
REPORTER & aReporter )
overridevirtualinherited

Write to specified output file.

Reimplemented from NETLIST_EXPORTER_BASE.

Definition at line 75 of file netlist_exporter_spice.cpp.

References DoWriteNetlist().

◆ WriteTail()

void NETLIST_EXPORTER_SPICE::WriteTail ( OUTPUTFORMATTER & aFormatter,
unsigned aNetlistOptions )
virtualinherited

Write the tail (.end).

Reimplemented in NETLIST_EXPORTER_SPICE_MODEL.

Definition at line 116 of file netlist_exporter_spice.cpp.

References OUTPUTFORMATTER::Print().

Referenced by DoWriteNetlist().

Member Data Documentation

◆ m_directives

std::vector<wxString> NETLIST_EXPORTER_SPICE::m_directives
privateinherited

Spice directives found in the schematic sheet.

Definition at line 169 of file netlist_exporter_spice.h.

Referenced by GetDirectives(), ReadDirectives(), and WriteDirectives().

◆ m_items

std::list<SPICE_ITEM> NETLIST_EXPORTER_SPICE::m_items
privateinherited

◆ m_libMgr

SIM_LIB_MGR NETLIST_EXPORTER_SPICE::m_libMgr
privateinherited

Holds libraries and models.

Definition at line 166 of file netlist_exporter_spice.h.

Referenced by NETLIST_EXPORTER_SPICE(), readModel(), and writeIncludes().

◆ m_libParts

std::set<LIB_SYMBOL*, LIB_SYMBOL_LESS_THAN> NETLIST_EXPORTER_BASE::m_libParts
protectedinherited

◆ m_modelNameGenerator

NAME_GENERATOR NETLIST_EXPORTER_SPICE::m_modelNameGenerator
privateinherited

Generates unique model names.

Definition at line 167 of file netlist_exporter_spice.h.

Referenced by readModel().

◆ m_nets

std::set<wxString> NETLIST_EXPORTER_SPICE::m_nets
privateinherited

Items representing schematic symbols in Spice world.

Definition at line 171 of file netlist_exporter_spice.h.

Referenced by GetNets(), readPinNetNames(), and ReadSchematicAndLibraries().

◆ m_rawIncludes

std::set<wxString> NETLIST_EXPORTER_SPICE::m_rawIncludes
privateinherited

include directives found in symbols

Definition at line 170 of file netlist_exporter_spice.h.

Referenced by DoWriteNetlist(), readModel(), and writeIncludes().

◆ m_referencesAlreadyFound

UNIQUE_STRINGS NETLIST_EXPORTER_BASE::m_referencesAlreadyFound
protectedinherited

◆ m_schematic


The documentation for this class was generated from the following files: