KiCad PCB EDA Suite
|
Special netlist exporter flavor that allows one to override simulation commands. More...
#include <ngspice_circuit_model.h>
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_CUR_SHEET_AS_ROOT = 0x0100 , OPTION_SIM_COMMAND = 0x0200 , OPTION_DEFAULT_FLAGS } |
Public Member Functions | |
NGSPICE_CIRCUIT_MODEL (SCHEMATIC_IFACE *aSchematic, wxWindow *aDialogParent=nullptr) | |
virtual | ~NGSPICE_CIRCUIT_MODEL () |
SIM_PLOT_TYPE | VectorToSignal (const std::string &aVector, wxString &aSignal) const |
Return name of Spice dataset for a specific plot. More... | |
void | SetSimOptions (int aOptions) |
int | GetSimOptions () const |
bool | GetNetlist (OUTPUTFORMATTER *aFormatter, REPORTER &aReporter) |
void | SetSimCommandOverride (const wxString &aCmd) |
Override the simulation command directive. More... | |
wxString | GetSimCommand () |
Return the command directive that is in use (either from the sheet or from m_simCommand) More... | |
wxString | GetSimCommandOverride () const |
Return the simulation command directive if stored separately (not as a sheet directive). More... | |
SIM_TYPE | GetSimType () |
Return simulation type basing on the simulation command directives. More... | |
wxString | GetSheetSimCommand () |
Return simulation command directives placed in schematic sheets (if any). More... | |
wxString | GetLastSheetSimCommand () const |
Return the sim command present as a sheet directive when the sim command override was last updated. More... | |
bool | ParseDCCommand (const wxString &aCmd, SPICE_DC_PARAMS *aSource1, SPICE_DC_PARAMS *aSource2) |
Parse a two-source .dc command directive into its symbols. More... | |
bool | WriteNetlist (const wxString &aOutFileName, unsigned aNetlistOptions, REPORTER &aReporter) override |
Write to specified output file. More... | |
bool | DoWriteNetlist (OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions, REPORTER &aReporter) |
Write the netlist in aFormatter. More... | |
virtual void | WriteHead (OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions) |
Write the netlist head (title and so on). More... | |
virtual void | WriteTail (OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions) |
Write the tail (.end). More... | |
virtual bool | ReadSchematicAndLibraries (unsigned aNetlistOptions, REPORTER &aReporter) |
Process the schematic and Spice libraries to create net mapping and a list of SPICE_ITEMs. More... | |
std::set< std::string > | GetNets () const |
Return the list of nets. More... | |
std::string | GetItemName (const std::string &aRefName) const |
Return name of Spice device corresponding to a schematic symbol. More... | |
const std::list< SPICE_ITEM > & | GetItems () const |
Return the list of items representing schematic symbols in the Spice world. More... | |
const SPICE_ITEM * | FindItem (const std::string &aRefName) const |
Find and return the item corresponding to aRefName. More... | |
const std::vector< wxString > & | GetDirectives () |
Static Public Member Functions | |
static bool | IsSimCommand (const wxString &aCmd) |
Determine if a directive is a simulation command. More... | |
static SIM_TYPE | CommandToSimType (const wxString &aCmd) |
Return simulation type basing on a simulation command directive. More... | |
static void | ConvertToSpiceMarkup (std::string &aNetName) |
Remove formatting wrappers and replace illegal spice net name characters with underscores. More... | |
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. More... | |
Protected Member Functions | |
void | WriteDirectives (OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions) const override |
void | ReadDirectives (unsigned aNetlistOptions) |
virtual std::string | GenerateItemPinNetName (const std::string &aNetName, int &aNcCounter) const |
SCH_SHEET_LIST | GetSheets (unsigned aNetlistOptions=0) const |
Return the paths of exported sheets (either all or the current one). More... | |
void | CreatePinList (SCH_SYMBOL *aSymbol, SCH_SHEET_PATH *aSheetPath, bool aKeepUnconnectedPins) |
Find a symbol from the DrawList and builds its pin list in m_sortedSymbolPinList. More... | |
SCH_SYMBOL * | findNextSymbol (EDA_ITEM *aItem, SCH_SHEET_PATH *aSheetPath) |
Check if the given symbol should be processed for netlisting. More... | |
void | eraseDuplicatePins () |
Erase duplicate pins from m_sortedSymbolPinList (i.e. More... | |
void | findAllUnitsOfSymbol (SCH_SYMBOL *aSchSymbol, SCH_SHEET_PATH *aSheetPath, bool aKeepUnconnectedPins) |
Find all units for symbols with multiple symbols per package. More... | |
Protected Attributes | |
std::vector< PIN_INFO > | m_sortedSymbolPinList |
Used to temporarily store and filter the list of pins of a schematic symbol when generating schematic symbol data in netlist (comp section). More... | |
UNIQUE_STRINGS | m_referencesAlreadyFound |
Used for "multiple symbols per package" symbols to avoid processing a lib symbol more than once. More... | |
std::set< LIB_SYMBOL *, LIB_SYMBOL_LESS_THAN > | m_libParts |
unique library symbols used. LIB_SYMBOL items are sorted by names More... | |
SCHEMATIC_IFACE * | m_schematic |
The schematic we're generating a netlist for. More... | |
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) |
void | readPinNumbers (SCH_SYMBOL &aSymbol, SPICE_ITEM &aItem) |
void | readPinNetNames (SCH_SYMBOL &aSymbol, SPICE_ITEM &aItem, int &aNcCounter) |
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 | |
wxString | m_simCommand |
< Custom simulation command (has priority over the schematic sheet simulation commands) More... | |
wxString | m_lastSheetSimCommand |
int | m_options |
SIM_LIB_MGR | m_libMgr |
Holds libraries and models. More... | |
NAME_GENERATOR | m_modelNameGenerator |
Generates unique model names. More... | |
NAME_GENERATOR | m_netNameGenerator |
std::vector< wxString > | m_directives |
Spice directives found in the schematic sheet. More... | |
std::set< wxString > | m_rawIncludes |
include directives found in symbols More... | |
std::set< std::string > | m_nets |
Items representing schematic symbols in Spice world. More... | |
std::list< SPICE_ITEM > | m_items |
wxWindow * | m_dialogParent |
Special netlist exporter flavor that allows one to override simulation commands.
Definition at line 47 of file ngspice_circuit_model.h.
|
inherited |
Enumerator | |
---|---|
OPTION_ADJUST_INCLUDE_PATHS | |
OPTION_ADJUST_PASSIVE_VALS | |
OPTION_SAVE_ALL_VOLTAGES | |
OPTION_SAVE_ALL_CURRENTS | |
OPTION_CUR_SHEET_AS_ROOT | |
OPTION_SIM_COMMAND | |
OPTION_DEFAULT_FLAGS |
Definition at line 52 of file netlist_exporter_spice.h.
|
inline |
Definition at line 50 of file ngspice_circuit_model.h.
|
inlinevirtual |
Definition at line 55 of file ngspice_circuit_model.h.
|
static |
Return simulation type basing on a simulation command directive.
Definition at line 90 of file ngspice_circuit_model.cpp.
References ST_AC, ST_DC, ST_DISTORTION, ST_NOISE, ST_OP, ST_POLE_ZERO, ST_SENSITIVITY, ST_TRANS_FUNC, ST_TRANSIENT, and ST_UNKNOWN.
Referenced by BOOST_AUTO_TEST_CASE(), GetSimType(), SIM_PANEL_BASE::GetType(), IsSimCommand(), SIM_PLOT_FRAME::NewPlotPanel(), SIM_PLOT_FRAME::onSettings(), SIM_PANEL_BASE::setSimCommand(), and SIM_PLOT_FRAME::StartSimulation().
|
staticinherited |
Remove formatting wrappers and replace illegal spice net name characters with underscores.
Definition at line 291 of file netlist_exporter_spice.cpp.
References MARKUP::MARKUP_PARSER::Parse().
Referenced by NETLIST_EXPORTER_SPICE::GenerateItemPinNetName().
|
protectedinherited |
Find a symbol from the DrawList and builds its pin list in m_sortedSymbolPinList.
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 116 of file netlist_exporter_base.cpp.
References SCHEMATIC_IFACE::ConnectionGraph(), NETLIST_EXPORTER_BASE::eraseDuplicatePins(), NETLIST_EXPORTER_BASE::findAllUnitsOfSymbol(), CONNECTION_GRAPH::FindSubgraphByName(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetPins(), SCH_SYMBOL::GetRef(), CONNECTION_SUBGRAPH::m_items, NETLIST_EXPORTER_BASE::m_libParts, CONNECTION_SUBGRAPH::m_no_connect, NETLIST_EXPORTER_BASE::m_schematic, NETLIST_EXPORTER_BASE::m_sortedSymbolPinList, and pin.
Referenced by NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().
|
inherited |
Write the netlist in aFormatter.
Definition at line 121 of file netlist_exporter_spice.cpp.
References dummy, NETLIST_EXPORTER_SPICE::m_items, NETLIST_EXPORTER_SPICE::m_rawIncludes, NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), NETLIST_EXPORTER_SPICE::WriteDirectives(), NETLIST_EXPORTER_SPICE::WriteHead(), NETLIST_EXPORTER_SPICE::writeIncludes(), NETLIST_EXPORTER_SPICE::writeItems(), NETLIST_EXPORTER_SPICE::writeModels(), and NETLIST_EXPORTER_SPICE::WriteTail().
Referenced by GetNetlist(), and NETLIST_EXPORTER_SPICE::WriteNetlist().
|
protectedinherited |
Erase duplicate pins from m_sortedSymbolPinList (i.e.
set pointer in this list to NULL).
(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 184 of file netlist_exporter_base.cpp.
References NETLIST_EXPORTER_BASE::m_sortedSymbolPinList.
Referenced by NETLIST_EXPORTER_BASE::CreatePinList().
|
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 temporary sorted pin list, m_sortedSymbolPinList. if aKeepUnconnectedPins = false, unconnected pins will be removed from list but usually we need all pins in netlists.
Definition at line 217 of file netlist_exporter_base.cpp.
References SCHEMATIC_IFACE::ConnectionGraph(), CONNECTION_GRAPH::FindSubgraphByName(), SCH_SYMBOL::GetPins(), SCH_SYMBOL::GetRef(), SCHEMATIC_IFACE::GetSheets(), CONNECTION_SUBGRAPH::m_items, CONNECTION_SUBGRAPH::m_no_connect, NETLIST_EXPORTER_BASE::m_schematic, NETLIST_EXPORTER_BASE::m_sortedSymbolPinList, pin, and SCH_SYMBOL_T.
Referenced by NETLIST_EXPORTER_BASE::CreatePinList().
|
inherited |
Find and return the item corresponding to aRefName.
Definition at line 351 of file netlist_exporter_spice.cpp.
References NETLIST_EXPORTER_SPICE::GetItems().
Referenced by SIM_PLOT_FRAME::AddTuner(), SIM_PLOT_FRAME::applyTuners(), NETLIST_EXPORTER_SPICE::GetItemName(), and TUNER_SLIDER::TUNER_SLIDER().
|
protectedinherited |
Check if the given symbol should be processed for netlisting.
Prevent processing multi-unit symbols more than once, etc.
aItem | is a symbol to check |
aSheetPath | is the sheet to check the symbol for |
Definition at line 73 of file netlist_exporter_base.cpp.
References SCH_SCREEN::GetLibSymbols(), SCH_SYMBOL::GetRef(), SCH_SYMBOL::GetSchSymbolLibraryName(), LIB_SYMBOL::GetUnitCount(), SCH_SHEET_PATH::LastScreen(), UNIQUE_STRINGS::Lookup(), NETLIST_EXPORTER_BASE::m_libParts, NETLIST_EXPORTER_BASE::m_referencesAlreadyFound, SCH_SYMBOL_T, and EDA_ITEM::Type().
Referenced by NETLIST_EXPORTER_XML::makeSymbols(), NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), NETLIST_EXPORTER_CADSTAR::WriteNetlist(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().
|
protectedvirtualinherited |
Reimplemented in NETLIST_EXPORTER_SPICE_MODEL.
Definition at line 660 of file netlist_exporter_spice.cpp.
References NETLIST_EXPORTER_SPICE::ConvertToSpiceMarkup(), and UnescapeString().
Referenced by NETLIST_EXPORTER_SPICE_MODEL::GenerateItemPinNetName(), and NETLIST_EXPORTER_SPICE::readPinNetNames().
|
inlineinherited |
Definition at line 129 of file netlist_exporter_spice.h.
References NETLIST_EXPORTER_SPICE::m_directives.
Referenced by GetSheetSimCommand().
|
inherited |
Return name of Spice device corresponding to a schematic symbol.
aRefName | is the component reference. |
Definition at line 340 of file netlist_exporter_spice.cpp.
References NETLIST_EXPORTER_SPICE::FindItem(), SPICE_GENERATOR::ItemName(), SPICE_ITEM::model, and SIM_MODEL::SpiceGenerator().
|
inlineinherited |
Return the list of items representing schematic symbols in the Spice world.
Definition at line 122 of file netlist_exporter_spice.h.
References NETLIST_EXPORTER_SPICE::m_items.
Referenced by NETLIST_EXPORTER_SPICE::FindItem(), and DIALOG_SIGNAL_LIST::TransferDataToWindow().
|
inline |
Return the sim command present as a sheet directive when the sim command override was last updated.
Definition at line 119 of file ngspice_circuit_model.h.
References m_lastSheetSimCommand.
|
inline |
Definition at line 70 of file ngspice_circuit_model.h.
References NETLIST_EXPORTER_SPICE::DoWriteNetlist(), and m_options.
Referenced by NGSPICE::Attach().
|
inlineinherited |
Return the list of nets.
Definition at line 106 of file netlist_exporter_spice.h.
References NETLIST_EXPORTER_SPICE::m_nets.
Referenced by DIALOG_SIGNAL_LIST::TransferDataToWindow().
|
protectedinherited |
Return the paths of exported sheets (either all or the current one).
Definition at line 675 of file netlist_exporter_spice.cpp.
References SCHEMATIC_IFACE::CurrentSheet(), SCHEMATIC_IFACE::GetSheets(), SCH_SHEET_PATH::Last(), NETLIST_EXPORTER_BASE::m_schematic, and NETLIST_EXPORTER_SPICE::OPTION_CUR_SHEET_AS_ROOT.
Referenced by NETLIST_EXPORTER_SPICE::ReadDirectives(), NETLIST_EXPORTER_SPICE_MODEL::readPorts(), and NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries().
wxString NGSPICE_CIRCUIT_MODEL::GetSheetSimCommand | ( | ) |
Return simulation command directives placed in schematic sheets (if any).
Definition at line 68 of file ngspice_circuit_model.cpp.
References Format(), NETLIST_EXPORTER_SPICE::GetDirectives(), IsSimCommand(), and NETLIST_EXPORTER_SPICE::ReadDirectives().
Referenced by GetSimCommand(), and SetSimCommandOverride().
|
inline |
Return the command directive that is in use (either from the sheet or from m_simCommand)
Definition at line 91 of file ngspice_circuit_model.h.
References GetSheetSimCommand(), and m_simCommand.
Referenced by GetSimType().
|
inline |
Return the simulation command directive if stored separately (not as a sheet directive).
Definition at line 99 of file ngspice_circuit_model.h.
References m_simCommand.
Referenced by WriteDirectives().
|
inline |
SIM_TYPE NGSPICE_CIRCUIT_MODEL::GetSimType | ( | ) |
Return simulation type basing on the simulation command directives.
Simulation directives set using SetSimCommandOverride() have priority over the ones placed in schematic sheets.
Definition at line 84 of file ngspice_circuit_model.cpp.
References CommandToSimType(), and GetSimCommand().
Referenced by DIALOG_SIGNAL_LIST::TransferDataToWindow().
|
inlinestatic |
Determine if a directive is a simulation command.
Definition at line 133 of file ngspice_circuit_model.h.
References CommandToSimType(), and ST_UNKNOWN.
Referenced by GetSheetSimCommand().
|
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.
aFormatString | holds:
|
aNetlistFile | is the name of the input file for the external program, that is a intermediate netlist file in xml format. |
aFinalFile | is the name of the output file that the user expects. |
aProjectDirectory | is used for P replacement, it should omit the trailing '/'. |
Supported formatting sequences and their meaning:
Definition at line 37 of file netlist_exporter_base.cpp.
Referenced by SCH_EDIT_FRAME::WriteNetListFile().
bool NGSPICE_CIRCUIT_MODEL::ParseDCCommand | ( | const wxString & | aCmd, |
SPICE_DC_PARAMS * | aSource1, | ||
SPICE_DC_PARAMS * | aSource2 | ||
) |
Parse a two-source .dc command directive into its symbols.
aCmd | is the input command string |
Definition at line 116 of file ngspice_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.
|
protectedinherited |
Definition at line 368 of file netlist_exporter_spice.cpp.
References NETLIST_EXPORTER_SPICE::GetSheets(), SCH_TEXTBOX::GetShownText(), NETLIST_EXPORTER_SPICE::m_directives, SCH_TEXT_T, SCH_TEXTBOX_T, and text.
Referenced by GetSheetSimCommand(), and NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries().
|
privateinherited |
Definition at line 482 of file netlist_exporter_spice.cpp.
References _, SPICE_ITEM::baseModelName, SIM_LIB_MGR::CreateModel(), DisplayErrorMessage(), Format(), NAME_GENERATOR::Generate(), SCH_SYMBOL::GetRef(), PATHS::GetUserCachePath(), SPICE_GENERATOR_KIBIS::IbisDevice(), NETLIST_EXPORTER_SPICE::m_dialogParent, NETLIST_EXPORTER_SPICE::m_libMgr, NETLIST_EXPORTER_SPICE::m_modelNameGenerator, NETLIST_EXPORTER_SPICE::m_rawIncludes, NETLIST_EXPORTER_BASE::m_schematic, SIM_LIBRARY::MODEL::model, SPICE_ITEM::model, SPICE_ITEM::modelName, SPICE_GENERATOR::ModelName(), SIM_LIBRARY::MODEL::name, path, SCHEMATIC_IFACE::Prj(), and SIM_MODEL::SpiceGenerator().
Referenced by NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries().
|
privateinherited |
Definition at line 537 of file netlist_exporter_spice.cpp.
References NETLIST_EXPORTER_SPICE::GenerateItemPinNetName(), NETLIST_EXPORTER_SPICE::m_nets, NETLIST_EXPORTER_BASE::m_sortedSymbolPinList, and SPICE_ITEM::pinNetNames.
Referenced by NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries().
|
privateinherited |
Definition at line 530 of file netlist_exporter_spice.cpp.
References NETLIST_EXPORTER_BASE::m_sortedSymbolPinList, pin, and SPICE_ITEM::pinNumbers.
Referenced by NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries().
|
privateinherited |
Definition at line 472 of file netlist_exporter_spice.cpp.
References SCH_SYMBOL::GetRef(), and SPICE_ITEM::refName.
Referenced by NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries().
|
virtualinherited |
Process the schematic and Spice libraries to create net mapping and a list of SPICE_ITEMs.
It is automatically called by WriteNetlist(), but might be used separately, if only net mapping and the list of SPICE_ITEMs are required.
Reimplemented in NETLIST_EXPORTER_SPICE_MODEL.
Definition at line 161 of file netlist_exporter_spice.cpp.
References _, UNIQUE_STRINGS::Clear(), NETLIST_EXPORTER_BASE::CreatePinList(), SPICE_ITEM::fields, NETLIST_EXPORTER_BASE::findNextSymbol(), SCH_SYMBOL::GetFieldCount(), SCH_SYMBOL::GetFields(), SCH_SYMBOL::GetFieldText(), SCH_SYMBOL::GetRef(), NETLIST_EXPORTER_SPICE::GetSheets(), PATHS::GetUserCachePath(), REPORTER::HasMessage(), SIM_MODEL::InferSimModel(), NETLIST_EXPORTER_SPICE::m_items, NETLIST_EXPORTER_BASE::m_libParts, NETLIST_EXPORTER_SPICE::m_nets, NETLIST_EXPORTER_BASE::m_referencesAlreadyFound, IO_ERROR::Problem(), NETLIST_EXPORTER_SPICE::ReadDirectives(), NETLIST_EXPORTER_SPICE::readModel(), NETLIST_EXPORTER_SPICE::readPinNetNames(), NETLIST_EXPORTER_SPICE::readPinNumbers(), NETLIST_EXPORTER_SPICE::readRefName(), REFERENCE_FIELD, REPORTER::Report(), RPT_SEVERITY_ERROR, SCH_SYMBOL_T, SIM_DEVICE_TYPE_FIELD, SIM_ENABLE_FIELD, SIM_PARAMS_FIELD, SIM_PINS_FIELD, SIM_TYPE_FIELD, and SIM_VALUE_GRAMMAR::SPICE.
Referenced by NETLIST_EXPORTER_SPICE::DoWriteNetlist(), and NETLIST_EXPORTER_SPICE_MODEL::ReadSchematicAndLibraries().
|
inline |
Override the simulation command directive.
Definition at line 78 of file ngspice_circuit_model.h.
References GetSheetSimCommand(), m_lastSheetSimCommand, and m_simCommand.
|
inline |
Definition at line 67 of file ngspice_circuit_model.h.
References m_options.
SIM_PLOT_TYPE NGSPICE_CIRCUIT_MODEL::VectorToSignal | ( | const std::string & | aVector, |
wxString & | aSignal | ||
) | const |
Return name of Spice dataset for a specific plot.
aVector | is name of the vector produced by ngspice | |
[out] | aSignal | is output in form: V(R1), Ib(Q2), I(L8) |
Definition at line 33 of file ngspice_circuit_model.cpp.
References SPT_CURRENT, SPT_UNKNOWN, and SPT_VOLTAGE.
|
overrideprotectedvirtual |
Reimplemented from NETLIST_EXPORTER_SPICE.
Definition at line 148 of file ngspice_circuit_model.cpp.
References GetSimCommandOverride(), NETLIST_EXPORTER_SPICE::OPTION_SIM_COMMAND, OUTPUTFORMATTER::Print(), TO_UTF8, and NETLIST_EXPORTER_SPICE::WriteDirectives().
|
virtualinherited |
Write the netlist head (title and so on).
Reimplemented in NETLIST_EXPORTER_SPICE_MODEL.
Definition at line 149 of file netlist_exporter_spice.cpp.
References OUTPUTFORMATTER::Print().
Referenced by NETLIST_EXPORTER_SPICE::DoWriteNetlist().
|
privateinherited |
Definition at line 551 of file netlist_exporter_spice.cpp.
References _, DisplayErrorMessage(), ExpandEnvVarSubstitutions(), Format(), NETLIST_EXPORTER_SPICE::m_dialogParent, NETLIST_EXPORTER_BASE::m_schematic, NETLIST_EXPORTER_SPICE::OPTION_ADJUST_INCLUDE_PATHS, Pgm(), OUTPUTFORMATTER::Print(), SCHEMATIC_IFACE::Prj(), ResolveFile(), and TO_UTF8.
Referenced by NETLIST_EXPORTER_SPICE::writeIncludes().
|
privateinherited |
Definition at line 589 of file netlist_exporter_spice.cpp.
References SIM_LIB_MGR::GetLibraries(), library, NETLIST_EXPORTER_SPICE::m_libMgr, NETLIST_EXPORTER_SPICE::m_rawIncludes, path, and NETLIST_EXPORTER_SPICE::writeInclude().
Referenced by NETLIST_EXPORTER_SPICE::DoWriteNetlist().
|
privateinherited |
Definition at line 614 of file netlist_exporter_spice.cpp.
References NETLIST_EXPORTER_SPICE::m_items, and OUTPUTFORMATTER::Print().
Referenced by NETLIST_EXPORTER_SPICE::DoWriteNetlist().
|
privateinherited |
Definition at line 602 of file netlist_exporter_spice.cpp.
References NETLIST_EXPORTER_SPICE::m_items, and OUTPUTFORMATTER::Print().
Referenced by NETLIST_EXPORTER_SPICE::DoWriteNetlist().
|
overridevirtualinherited |
Write to specified output file.
Reimplemented from NETLIST_EXPORTER_BASE.
Definition at line 112 of file netlist_exporter_spice.cpp.
References NETLIST_EXPORTER_SPICE::DoWriteNetlist(), NETLIST_EXPORTER_SPICE::m_libMgr, and SIM_LIB_MGR::SetReporter().
|
virtualinherited |
Write the tail (.end).
Reimplemented in NETLIST_EXPORTER_SPICE_MODEL.
Definition at line 155 of file netlist_exporter_spice.cpp.
References OUTPUTFORMATTER::Print().
Referenced by NETLIST_EXPORTER_SPICE::DoWriteNetlist().
|
privateinherited |
Definition at line 169 of file netlist_exporter_spice.h.
Referenced by NETLIST_EXPORTER_SPICE::readModel(), and NETLIST_EXPORTER_SPICE::writeInclude().
|
privateinherited |
Spice directives found in the schematic sheet.
Definition at line 162 of file netlist_exporter_spice.h.
Referenced by NETLIST_EXPORTER_SPICE::GetDirectives(), NETLIST_EXPORTER_SPICE::ReadDirectives(), and NETLIST_EXPORTER_SPICE::WriteDirectives().
|
privateinherited |
Definition at line 167 of file netlist_exporter_spice.h.
Referenced by NETLIST_EXPORTER_SPICE::DoWriteNetlist(), NETLIST_EXPORTER_SPICE::GetItems(), NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), NETLIST_EXPORTER_SPICE::writeItems(), and NETLIST_EXPORTER_SPICE::writeModels().
|
private |
Definition at line 151 of file ngspice_circuit_model.h.
Referenced by GetLastSheetSimCommand(), and SetSimCommandOverride().
|
privateinherited |
Holds libraries and models.
Definition at line 157 of file netlist_exporter_spice.h.
Referenced by NETLIST_EXPORTER_SPICE::readModel(), NETLIST_EXPORTER_SPICE::writeIncludes(), and NETLIST_EXPORTER_SPICE::WriteNetlist().
|
protectedinherited |
unique library symbols used. LIB_SYMBOL items are sorted by names
Definition at line 206 of file netlist_exporter_base.h.
Referenced by NETLIST_EXPORTER_BASE::CreatePinList(), NETLIST_EXPORTER_BASE::findNextSymbol(), NETLIST_EXPORTER_XML::makeLibParts(), NETLIST_EXPORTER_XML::makeSymbols(), and NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries().
|
privateinherited |
Generates unique model names.
Generates unique net names (only unique for NC nets for now)
Definition at line 158 of file netlist_exporter_spice.h.
Referenced by NETLIST_EXPORTER_SPICE::readModel().
|
privateinherited |
Definition at line 161 of file netlist_exporter_spice.h.
|
privateinherited |
Items representing schematic symbols in Spice world.
Definition at line 164 of file netlist_exporter_spice.h.
Referenced by NETLIST_EXPORTER_SPICE::GetNets(), NETLIST_EXPORTER_SPICE::readPinNetNames(), and NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries().
|
private |
Definition at line 153 of file ngspice_circuit_model.h.
Referenced by GetNetlist(), GetSimOptions(), and SetSimOptions().
|
privateinherited |
include directives found in symbols
Definition at line 163 of file netlist_exporter_spice.h.
Referenced by NETLIST_EXPORTER_SPICE::DoWriteNetlist(), NETLIST_EXPORTER_SPICE::readModel(), and NETLIST_EXPORTER_SPICE::writeIncludes().
|
protectedinherited |
Used for "multiple symbols per package" symbols to avoid processing a lib symbol more than once.
Definition at line 203 of file netlist_exporter_base.h.
Referenced by NETLIST_EXPORTER_BASE::findNextSymbol(), NETLIST_EXPORTER_XML::makeSymbols(), NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), NETLIST_EXPORTER_CADSTAR::WriteNetlist(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().
|
protectedinherited |
The schematic we're generating a netlist for.
Definition at line 209 of file netlist_exporter_base.h.
Referenced by NETLIST_EXPORTER_XML::addSymbolFields(), NETLIST_EXPORTER_BASE::CreatePinList(), NETLIST_EXPORTER_BASE::findAllUnitsOfSymbol(), NETLIST_EXPORTER_SPICE::GetSheets(), NETLIST_EXPORTER_XML::makeDesignHeader(), NETLIST_EXPORTER_XML::makeLibraries(), NETLIST_EXPORTER_XML::makeListOfNets(), NETLIST_EXPORTER_XML::makeSymbols(), NETLIST_EXPORTER_SPICE::readModel(), NETLIST_EXPORTER_SPICE_MODEL::WriteHead(), NETLIST_EXPORTER_SPICE::writeInclude(), NETLIST_EXPORTER_CADSTAR::writeListOfNets(), NETLIST_EXPORTER_CADSTAR::WriteNetlist(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().
|
private |
< Custom simulation command (has priority over the schematic sheet simulation commands)
Value of schematic sheet simulation command when override was last updated
Definition at line 148 of file ngspice_circuit_model.h.
Referenced by GetSimCommand(), GetSimCommandOverride(), and SetSimCommandOverride().
|
protectedinherited |
Used to temporarily store and filter the list of pins of a schematic symbol when generating schematic symbol data in netlist (comp section).
No ownership of members. TODO(snh): Descope this object
Definition at line 199 of file netlist_exporter_base.h.
Referenced by NETLIST_EXPORTER_BASE::CreatePinList(), NETLIST_EXPORTER_BASE::eraseDuplicatePins(), NETLIST_EXPORTER_BASE::findAllUnitsOfSymbol(), NETLIST_EXPORTER_SPICE::readPinNetNames(), NETLIST_EXPORTER_SPICE::readPinNumbers(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().