ADDED: S-parameters simulation
This commit is contained in:
parent
d563d66b86
commit
886a7c2c04
|
@ -70,6 +70,10 @@ DIALOG_SIM_COMMAND::DIALOG_SIM_COMMAND( wxWindow* aParent,
|
|||
m_acFreqStart->SetValidator( m_spiceValidator );
|
||||
m_acFreqStop->SetValidator( m_spiceValidator );
|
||||
|
||||
m_spPointsNumber->SetValidator( m_posIntValidator );
|
||||
m_spFreqStart->SetValidator( m_spiceValidator );
|
||||
m_spFreqStop->SetValidator( m_spiceValidator );
|
||||
|
||||
m_dcStart1->SetValidator( m_spiceValidator );
|
||||
m_dcStop1->SetValidator( m_spiceValidator );
|
||||
m_dcIncr1->SetValidator( m_spiceValidator );
|
||||
|
@ -232,6 +236,17 @@ bool DIALOG_SIM_COMMAND::TransferDataFromWindow()
|
|||
SPICE_VALUE( m_acFreqStart->GetValue() ).ToSpiceString(),
|
||||
SPICE_VALUE( m_acFreqStop->GetValue() ).ToSpiceString() );
|
||||
}
|
||||
else if( page == m_pgSP ) // S-params analysis
|
||||
{
|
||||
if( !m_pgSP->Validate() )
|
||||
return false;
|
||||
|
||||
m_simCommand.Printf( ".sp %s %s %s %s %s", scaleToString( m_spScale->GetSelection() ),
|
||||
m_spPointsNumber->GetValue(),
|
||||
SPICE_VALUE( m_spFreqStart->GetValue() ).ToSpiceString(),
|
||||
SPICE_VALUE( m_spFreqStop->GetValue() ).ToSpiceString(),
|
||||
m_spDoNoise ? "1" : "" );
|
||||
}
|
||||
else if( page == m_pgDC ) // DC transfer analysis
|
||||
{
|
||||
wxString simCmd = wxString( ".dc " );
|
||||
|
@ -437,6 +452,30 @@ void DIALOG_SIM_COMMAND::parseCommand( const wxString& aCommand )
|
|||
m_acFreqStart->SetValue( SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() );
|
||||
m_acFreqStop->SetValue( SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() );
|
||||
}
|
||||
else if( token == ".sp" )
|
||||
{
|
||||
m_simPages->SetSelection( m_simPages->FindPage( m_pgSP ) );
|
||||
|
||||
token = tokenizer.GetNextToken().Lower();
|
||||
|
||||
for( SCALE_TYPE candidate : { DECADE, OCTAVE, LINEAR } )
|
||||
{
|
||||
if( scaleToString( candidate ) == token )
|
||||
{
|
||||
m_spScale->SetSelection( candidate );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_spPointsNumber->SetValue( tokenizer.GetNextToken() );
|
||||
m_spFreqStart->SetValue( SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() );
|
||||
m_spFreqStop->SetValue( SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() );
|
||||
|
||||
if( tokenizer.HasMoreTokens() )
|
||||
m_spDoNoise->SetValue(
|
||||
SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() == "1" ? true
|
||||
: false );
|
||||
}
|
||||
else if( token == ".dc" )
|
||||
{
|
||||
m_simPages->SetSelection( m_simPages->FindPage( m_pgDC ) );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-88b0f50)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -76,6 +76,68 @@ DIALOG_SIM_COMMAND_BASE::DIALOG_SIM_COMMAND_BASE( wxWindow* parent, wxWindowID i
|
|||
m_pgAC->Layout();
|
||||
bSizer3->Fit( m_pgAC );
|
||||
m_simPages->AddPage( m_pgAC, _("AC"), false );
|
||||
m_pgSP = new wxPanel( m_simPages, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer31;
|
||||
bSizer31 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxString m_spScaleChoices[] = { _("Decade"), _("Octave"), _("Linear") };
|
||||
int m_spScaleNChoices = sizeof( m_spScaleChoices ) / sizeof( wxString );
|
||||
m_spScale = new wxRadioBox( m_pgSP, wxID_ANY, _("Frequency scale"), wxDefaultPosition, wxDefaultSize, m_spScaleNChoices, m_spScaleChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_spScale->SetSelection( 0 );
|
||||
m_spScale->Hide();
|
||||
|
||||
bSizer31->Add( m_spScale, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizer12;
|
||||
fgSizer12 = new wxFlexGridSizer( 0, 3, 5, 0 );
|
||||
fgSizer12->SetFlexibleDirection( wxHORIZONTAL );
|
||||
fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticText12 = new wxStaticText( m_pgSP, wxID_ANY, _("Number of points per decade:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText12->Wrap( -1 );
|
||||
fgSizer12->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_spPointsNumber = new wxTextCtrl( m_pgSP, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer12->Add( m_spPointsNumber, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticText22 = new wxStaticText( m_pgSP, wxID_ANY, _("Start frequency:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText22->Wrap( -1 );
|
||||
fgSizer12->Add( m_staticText22, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_spFreqStart = new wxTextCtrl( m_pgSP, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_spFreqStart->SetMinSize( wxSize( 100,-1 ) );
|
||||
|
||||
fgSizer12->Add( m_spFreqStart, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticText191 = new wxStaticText( m_pgSP, wxID_ANY, _("Hz"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText191->Wrap( -1 );
|
||||
fgSizer12->Add( m_staticText191, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
||||
|
||||
m_staticText32 = new wxStaticText( m_pgSP, wxID_ANY, _("Stop frequency:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText32->Wrap( -1 );
|
||||
fgSizer12->Add( m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_spFreqStop = new wxTextCtrl( m_pgSP, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer12->Add( m_spFreqStop, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticText1101 = new wxStaticText( m_pgSP, wxID_ANY, _("Hz"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1101->Wrap( -1 );
|
||||
fgSizer12->Add( m_staticText1101, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
||||
|
||||
m_spDoNoise = new wxCheckBox( m_pgSP, wxID_ANY, _("Compute noise current correlation matrix"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer12->Add( m_spDoNoise, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bSizer31->Add( fgSizer12, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
m_pgSP->SetSizer( bSizer31 );
|
||||
m_pgSP->Layout();
|
||||
bSizer31->Fit( m_pgSP );
|
||||
m_simPages->AddPage( m_pgSP, _("S-params"), false );
|
||||
m_pgDC = new wxPanel( m_simPages, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer82;
|
||||
bSizer82 = new wxBoxSizer( wxVERTICAL );
|
||||
|
|
|
@ -773,6 +773,724 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="notebookpage" expanded="1">
|
||||
<property name="bitmap"></property>
|
||||
<property name="label">S-params</property>
|
||||
<property name="select">0</property>
|
||||
<object class="wxPanel" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_pgSP</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer31</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Decade" "Octave" "Linear"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">1</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Frequency scale</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_spScale</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxFlexGridSizer" expanded="1">
|
||||
<property name="cols">3</property>
|
||||
<property name="flexible_direction">wxHORIZONTAL</property>
|
||||
<property name="growablecols"></property>
|
||||
<property name="growablerows"></property>
|
||||
<property name="hgap">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">fgSizer12</property>
|
||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">0</property>
|
||||
<property name="vgap">5</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Number of points per decade:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText12</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_spPointsNumber</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NUMERIC</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Start frequency:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText22</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">100,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_spFreqStart</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NUMERIC</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Hz</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText191</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Stop frequency:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText32</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_spFreqStop</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NUMERIC</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Hz</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText1101</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Compute noise current correlation matrix</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_spDoNoise</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="notebookpage" expanded="1">
|
||||
<property name="bitmap"></property>
|
||||
<property name="label">DC Transfer</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-88b0f50)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -54,6 +54,17 @@ class DIALOG_SIM_COMMAND_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_staticText3;
|
||||
wxTextCtrl* m_acFreqStop;
|
||||
wxStaticText* m_staticText110;
|
||||
wxPanel* m_pgSP;
|
||||
wxRadioBox* m_spScale;
|
||||
wxStaticText* m_staticText12;
|
||||
wxTextCtrl* m_spPointsNumber;
|
||||
wxStaticText* m_staticText22;
|
||||
wxTextCtrl* m_spFreqStart;
|
||||
wxStaticText* m_staticText191;
|
||||
wxStaticText* m_staticText32;
|
||||
wxTextCtrl* m_spFreqStop;
|
||||
wxStaticText* m_staticText1101;
|
||||
wxCheckBox* m_spDoNoise;
|
||||
wxPanel* m_pgDC;
|
||||
wxCheckBox* m_dcEnable2;
|
||||
wxChoice* m_dcSourceType1;
|
||||
|
|
|
@ -521,6 +521,9 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::updateModelParamsTab( SIM_MODEL* aMode
|
|||
m_paramGrid->Append( new wxPropertyCategory( "DC" ) );
|
||||
m_paramGrid->HideProperty( "DC" );
|
||||
|
||||
m_paramGrid->Append( new wxPropertyCategory( "S-Parameters" ) );
|
||||
m_paramGrid->HideProperty( "S-Parameters" );
|
||||
|
||||
m_paramGrid->Append( new wxPropertyCategory( "Capacitance" ) );
|
||||
m_paramGrid->HideProperty( "Capacitance" );
|
||||
|
||||
|
@ -773,6 +776,11 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::addParamPropertyIfRelevant( SIM_MODEL*
|
|||
m_paramGrid->AppendIn( "DC", newParamProperty( aModel, aParamIndex ) );
|
||||
break;
|
||||
|
||||
case CATEGORY::S_PARAM:
|
||||
m_paramGrid->HideProperty( "S-Parameters", false );
|
||||
m_paramGrid->AppendIn( "S-Parameters", newParamProperty( aModel, aParamIndex ) );
|
||||
break;
|
||||
|
||||
case CATEGORY::CAPACITANCE:
|
||||
m_paramGrid->HideProperty( "Capacitance", false );
|
||||
m_paramGrid->AppendIn( "Capacitance", newParamProperty( aModel, aParamIndex ) );
|
||||
|
|
|
@ -329,6 +329,7 @@ wxString NGSPICE::GetXAxis( SIM_TYPE aType ) const
|
|||
switch( aType )
|
||||
{
|
||||
case ST_AC:
|
||||
case ST_S_PARAM:
|
||||
return wxS( "frequency" );
|
||||
|
||||
case ST_NOISE:
|
||||
|
|
|
@ -114,6 +114,8 @@ SIM_TYPE NGSPICE_CIRCUIT_MODEL::CommandToSimType( const wxString& aCmd )
|
|||
return ST_POLE_ZERO;
|
||||
else if( cmd.StartsWith( wxT( ".sens" ) ) )
|
||||
return ST_SENSITIVITY;
|
||||
else if( cmd.StartsWith( wxT( ".sp" ) ) )
|
||||
return ST_S_PARAM;
|
||||
else if( cmd.StartsWith( wxT( ".tf" ) ) )
|
||||
return ST_TRANS_FUNC;
|
||||
else
|
||||
|
|
|
@ -324,6 +324,7 @@ public:
|
|||
NOISE,
|
||||
DISTRIBUTED_QUANTITIES,
|
||||
LIMITING_VALUES,
|
||||
S_PARAM,
|
||||
ADVANCED,
|
||||
FLAGS,
|
||||
WAVEFORM,
|
||||
|
|
|
@ -243,7 +243,25 @@ std::string SPICE_GENERATOR_SOURCE::ItemLine( const SPICE_ITEM& aItem ) const
|
|||
ph = SIM_VALUE::ToSpice( ph_param->value );
|
||||
|
||||
emptyLine = false;
|
||||
item.modelName += fmt::format( "AC {} {}", ac, ph );
|
||||
item.modelName += fmt::format( "AC {} {} ", ac, ph );
|
||||
}
|
||||
|
||||
std::string portnum = "";
|
||||
|
||||
if( const SIM_MODEL::PARAM* portnum_param = m_model.FindParam( "portnum" ) )
|
||||
portnum = SIM_VALUE::ToSpice( portnum_param->value );
|
||||
|
||||
if( portnum != "" )
|
||||
{
|
||||
item.modelName += fmt::format( "portnum {} ", portnum );
|
||||
|
||||
std::string z0 = "";
|
||||
|
||||
if( const SIM_MODEL::PARAM* z0_param = m_model.FindParam( "z0" ) )
|
||||
z0 = SIM_VALUE::ToSpice( z0_param->value );
|
||||
|
||||
if( z0 != "" )
|
||||
item.modelName += fmt::format( "z0 {} ", z0 );
|
||||
}
|
||||
|
||||
if( emptyLine )
|
||||
|
@ -414,6 +432,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeDcParamInfos( const st
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -473,6 +492,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeSinParamInfos( const s
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -548,6 +568,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makePulseParamInfos( const
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -607,6 +628,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeExpParamInfos( const s
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -841,6 +863,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makePwlParamInfos( const s
|
|||
paramInfos.push_back( paramInfo );*/
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -868,6 +891,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeWhiteNoiseParamInfos(
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -903,6 +927,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makePinkNoiseParamInfos( c
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -938,6 +963,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeBurstNoiseParamInfos(
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -981,6 +1007,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomUniformParamInfo
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -1024,6 +1051,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomNormalParamInfos
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -1067,6 +1095,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomExpParamInfos( c
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -1110,6 +1139,7 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomPoissonParamInfo
|
|||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -1134,6 +1164,31 @@ void SIM_MODEL_SOURCE::appendAcParamInfos( std::vector<PARAM::INFO>& aParamInfos
|
|||
aParamInfos.push_back( paramInfo );
|
||||
}
|
||||
|
||||
void SIM_MODEL_SOURCE::appendSpParamInfos( std::vector<PARAM::INFO>& aParamInfos,
|
||||
const std::string& aUnit )
|
||||
{
|
||||
PARAM::INFO paramInfo;
|
||||
|
||||
if( !strcmp( aUnit.c_str(), "V" ) )
|
||||
{
|
||||
paramInfo.name = "portnum";
|
||||
paramInfo.type = SIM_VALUE::TYPE_INT;
|
||||
paramInfo.unit = "";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::S_PARAM;
|
||||
paramInfo.defaultValue = "";
|
||||
paramInfo.description = "Port number";
|
||||
aParamInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "z0";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "Ohm";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::S_PARAM;
|
||||
paramInfo.defaultValue = "";
|
||||
paramInfo.description = "Internal impedance";
|
||||
aParamInfos.push_back( paramInfo );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::string> SIM_MODEL_SOURCE::GetPinNames() const
|
||||
{
|
||||
|
|
|
@ -115,6 +115,8 @@ private:
|
|||
const std::string& aUnit );
|
||||
|
||||
static void appendAcParamInfos( std::vector<PARAM::INFO>& aParamInfos, const std::string& aUnit );
|
||||
static void appendSpParamInfos( std::vector<PARAM::INFO>& aParamInfos, const std::string& aUnit );
|
||||
|
||||
};
|
||||
|
||||
#endif // SIM_MODEL_SOURCE_H
|
||||
|
|
|
@ -517,6 +517,28 @@ void SIM_PLOT_PANEL::updateAxes( int aNewTraceType )
|
|||
m_axis_y2->SetName( _( "Phase" ) );
|
||||
break;
|
||||
|
||||
case ST_S_PARAM:
|
||||
if( !m_axis_x )
|
||||
{
|
||||
m_axis_x = new LOG_SCALE<mpScaleXLog>( wxEmptyString, wxT( "Hz" ), mpALIGN_BOTTOM );
|
||||
m_axis_x->SetNameAlign( mpALIGN_BOTTOM );
|
||||
m_plotWin->AddLayer( m_axis_x );
|
||||
|
||||
m_axis_y1 = new LIN_SCALE<mpScaleY>( wxEmptyString, wxT( "" ), mpALIGN_LEFT );
|
||||
m_axis_y1->SetNameAlign( mpALIGN_LEFT );
|
||||
m_plotWin->AddLayer( m_axis_y1 );
|
||||
|
||||
m_axis_y2 = new LIN_SCALE<mpScaleY>( wxEmptyString, wxT( "°" ), mpALIGN_RIGHT );
|
||||
m_axis_y2->SetNameAlign( mpALIGN_RIGHT );
|
||||
m_axis_y2->SetMasterScale( m_axis_y1 );
|
||||
m_plotWin->AddLayer( m_axis_y2 );
|
||||
}
|
||||
|
||||
m_axis_x->SetName( _( "Frequency" ) );
|
||||
m_axis_y1->SetName( _( "Ampltiude" ) );
|
||||
m_axis_y2->SetName( _( "Phase" ) );
|
||||
break;
|
||||
|
||||
case ST_DC:
|
||||
prepareDCAxes( aNewTraceType );
|
||||
break;
|
||||
|
|
|
@ -58,6 +58,7 @@ bool SIM_PLOT_PANEL_BASE::IsPlottable( SIM_TYPE aSimType )
|
|||
{
|
||||
case ST_AC:
|
||||
case ST_DC:
|
||||
case ST_S_PARAM:
|
||||
case ST_TRANSIENT:
|
||||
case ST_NOISE:
|
||||
return true;
|
||||
|
|
|
@ -39,7 +39,8 @@ enum SIM_TYPE
|
|||
ST_POLE_ZERO,
|
||||
ST_SENSITIVITY,
|
||||
ST_TRANS_FUNC,
|
||||
ST_TRANSIENT
|
||||
ST_TRANSIENT,
|
||||
ST_S_PARAM
|
||||
};
|
||||
|
||||
///< Possible trace types
|
||||
|
@ -51,6 +52,7 @@ enum SIM_TRACE_TYPE
|
|||
SPT_AC_PHASE = 0x0004,
|
||||
SPT_AC_MAG = 0x0008,
|
||||
SPT_POWER = 0x0010,
|
||||
SPT_SP_AMP = 0x0020,
|
||||
SPT_Y_AXIS_MASK = 0x00FF,
|
||||
|
||||
// X axis
|
||||
|
|
|
@ -726,6 +726,11 @@ void SIMULATOR_PANEL::rebuildSignalsList()
|
|||
m_signals.push_back( aSignalName + _( " (gain)" ) );
|
||||
m_signals.push_back( aSignalName + _( " (phase)" ) );
|
||||
}
|
||||
else if( simType == ST_S_PARAM )
|
||||
{
|
||||
m_signals.push_back( aSignalName + _( " (amplitude)" ) );
|
||||
m_signals.push_back( aSignalName + _( " (phase)" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_signals.push_back( aSignalName );
|
||||
|
@ -778,6 +783,33 @@ void SIMULATOR_PANEL::rebuildSignalsList()
|
|||
addSignal( wxS( "onoise_spectrum" ) );
|
||||
}
|
||||
|
||||
if( simType == ST_S_PARAM )
|
||||
{
|
||||
std::vector<std::string> portnums;
|
||||
|
||||
for( const SPICE_ITEM& item : circuitModel()->GetItems() )
|
||||
{
|
||||
wxString name = item.model->SpiceGenerator().ItemName( item );
|
||||
|
||||
// We are only looking for voltage sources in .SP mode
|
||||
if( !name.StartsWith( "V" ) )
|
||||
continue;
|
||||
|
||||
const SIM_MODEL::PARAM* portNum = item.model->FindParam( "portnum" );
|
||||
|
||||
if( portNum )
|
||||
portnums.push_back( SIM_VALUE::ToSpice( portNum->value ) );
|
||||
}
|
||||
|
||||
for( const std::string& portnum1 : portnums )
|
||||
{
|
||||
for( const std::string& portnum2 : portnums )
|
||||
{
|
||||
addSignal( wxString::Format( wxS( "S_%s_%s" ), portnum1, portnum2 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add .PROBE directives
|
||||
for( const wxString& directive : circuitModel()->GetDirectives() )
|
||||
{
|
||||
|
@ -875,6 +907,7 @@ wxString vectorNameFromSignalId( int aUserDefinedSignalId )
|
|||
wxString SIMULATOR_PANEL::vectorNameFromSignalName( const wxString& aSignalName, int* aTraceType )
|
||||
{
|
||||
std::map<wxString, int> suffixes;
|
||||
suffixes[_( " (amplitude)" )] = SPT_SP_AMP;
|
||||
suffixes[ _( " (gain)" ) ] = SPT_AC_MAG;
|
||||
suffixes[ _( " (phase)" ) ] = SPT_AC_PHASE;
|
||||
|
||||
|
@ -1174,6 +1207,7 @@ void SIMULATOR_PANEL::UpdateMeasurement( int aRow )
|
|||
units += wxS( ".s" );
|
||||
break;
|
||||
case SIM_TYPE::ST_AC:
|
||||
case SIM_TYPE::ST_S_PARAM:
|
||||
case SIM_TYPE::ST_DISTORTION:
|
||||
case SIM_TYPE::ST_NOISE:
|
||||
case SIM_TYPE::ST_SENSITIVITY: // If there is a vector, it is frequency
|
||||
|
@ -1379,6 +1413,11 @@ void SIMULATOR_PANEL::AddTrace( const wxString& aName, SIM_TRACE_TYPE aType )
|
|||
updateTrace( aName, aType | SPT_AC_MAG, plotPanel );
|
||||
updateTrace( aName, aType | SPT_AC_PHASE, plotPanel );
|
||||
}
|
||||
if( simType == ST_S_PARAM )
|
||||
{
|
||||
updateTrace( aName, aType | SPT_AC_MAG, plotPanel );
|
||||
updateTrace( aName, aType | SPT_AC_PHASE, plotPanel );
|
||||
}
|
||||
else
|
||||
{
|
||||
updateTrace( aName, aType, plotPanel );
|
||||
|
@ -1410,6 +1449,11 @@ void SIMULATOR_PANEL::SetUserDefinedSignals( const std::map<int, wxString>& aNew
|
|||
for( int subType : { SPT_AC_MAG, SPT_AC_PHASE } )
|
||||
plotPanel->DeleteTrace( vectorName, traceType | subType );
|
||||
}
|
||||
else if( plotPanel->GetType() == ST_S_PARAM )
|
||||
{
|
||||
for( int subType : { SPT_SP_AMP, SPT_AC_PHASE } )
|
||||
plotPanel->DeleteTrace( vectorName, traceType | subType );
|
||||
}
|
||||
else
|
||||
{
|
||||
plotPanel->DeleteTrace( vectorName, traceType );
|
||||
|
@ -1425,6 +1469,14 @@ void SIMULATOR_PANEL::SetUserDefinedSignals( const std::map<int, wxString>& aNew
|
|||
trace->SetName( aNewSignals.at( id ) );
|
||||
}
|
||||
}
|
||||
else if( plotPanel->GetType() == ST_S_PARAM )
|
||||
{
|
||||
for( int subType : { SPT_SP_AMP, SPT_AC_PHASE } )
|
||||
{
|
||||
if( TRACE* trace = plotPanel->GetTrace( vectorName, traceType | subType ) )
|
||||
trace->SetName( aNewSignals.at( id ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( TRACE* trace = plotPanel->GetTrace( vectorName, traceType ) )
|
||||
|
@ -1490,6 +1542,15 @@ void SIMULATOR_PANEL::updateTrace( const wxString& aVectorName, int aTraceType,
|
|||
wxFAIL_MSG( wxT( "Plot type missing AC_PHASE or AC_MAG bit" ) );
|
||||
|
||||
break;
|
||||
case ST_S_PARAM:
|
||||
if( aTraceType & SPT_SP_AMP )
|
||||
data_y = simulator()->GetMagPlot( (const char*) simVectorName.c_str() );
|
||||
else if( aTraceType & SPT_AC_PHASE )
|
||||
data_y = simulator()->GetPhasePlot( (const char*) simVectorName.c_str() );
|
||||
else
|
||||
wxFAIL_MSG( wxT( "Plot type missing AC_PHASE or SPT_SP_AMP bit" ) );
|
||||
|
||||
break;
|
||||
|
||||
case ST_NOISE:
|
||||
case ST_DC:
|
||||
|
@ -2157,6 +2218,7 @@ SIM_TRACE_TYPE SIMULATOR_PANEL::getXAxisType( SIM_TYPE aType ) const
|
|||
{
|
||||
/// @todo SPT_LOG_FREQUENCY
|
||||
case ST_AC: return SPT_LIN_FREQUENCY;
|
||||
case ST_S_PARAM: return SPT_LIN_FREQUENCY;
|
||||
case ST_DC: return SPT_SWEEP;
|
||||
case ST_TRANSIENT: return SPT_TIME;
|
||||
case ST_NOISE: return SPT_LIN_FREQUENCY;
|
||||
|
@ -2500,6 +2562,14 @@ void SIMULATOR_PANEL::OnSimRefresh( bool aFinal )
|
|||
traceMap[ trace ] = { vectorName, traceType };
|
||||
}
|
||||
}
|
||||
if( simType == ST_S_PARAM )
|
||||
{
|
||||
for( int subType : { SPT_SP_AMP, SPT_AC_PHASE } )
|
||||
{
|
||||
if( TRACE* trace = plotPanel->GetTrace( vectorName, traceType | subType ) )
|
||||
traceMap[trace] = { vectorName, traceType };
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( TRACE* trace = plotPanel->GetTrace( vectorName, traceType ) )
|
||||
|
|
|
@ -87,6 +87,7 @@ wxString SPICE_SIMULATOR::TypeToName( SIM_TYPE aType, bool aShortName )
|
|||
case ST_TRANS_FUNC:
|
||||
return aShortName ? wxString( wxT( "TF" ) )
|
||||
: _( "Transfer function" );
|
||||
case ST_S_PARAM: return aShortName ? wxString( wxT( "SP" ) ) : _( "S-Parameters" );
|
||||
|
||||
default:
|
||||
case ST_UNKNOWN:
|
||||
|
|
Loading…
Reference in New Issue