KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sim_model_multiunit.h File Reference
#include <utility>
#include <vector>
#include <wx/string.h>
#include <sim/sim_model_spice.h>
#include <sim/spice_generator.h>

Go to the source code of this file.

Classes

struct  UNIT_PIN_MAP
 One functional unit's pin map, gathered from its Sim.Pins field. More...
 
struct  SIM_DECOMPOSITION
 Per-component decomposition descriptor stored in the Sim.Decomposition field. More...
 
class  SPICE_GENERATOR_MULTIUNIT
 SPICE generator for the synthesized repeat-per-unit wrapper. More...
 
class  SIM_MODEL_MULTIUNIT
 Wraps a resolved single-unit base model and presents it as one component-level SPICE device. More...
 
struct  SIM_MODEL_MULTIUNIT::INSTANCE
 

Functions

std::vector< std::pair< wxString, wxString > > ParseSimPinsTokens (const wxString &aPins, const wxString &aRef)
 Parse one unit's Sim.Pins text into (symbolPinNumber -> modelPinName) pairs, preserving the written order.
 

Function Documentation

◆ ParseSimPinsTokens()

std::vector< std::pair< wxString, wxString > > ParseSimPinsTokens ( const wxString & aPins,
const wxString & aRef )

Parse one unit's Sim.Pins text into (symbolPinNumber -> modelPinName) pairs, preserving the written order.

Parameters
aPinsThe raw Sim.Pins field value (whitespace-separated num=name tokens).
aRefThe owning symbol reference, used only for error messages.
Exceptions
IO_ERRORon a malformed token (missing/edge =) or a within-unit conflict (the same symbol pin mapped to two different model pins). Mapping different symbol pins to the same model pin within a unit is allowed.

Definition at line 95 of file sim_model_multiunit.cpp.

References _, and THROW_IO_ERROR.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and NETLIST_EXPORTER_SPICE::collectUnitPinMaps().