Un-comment and repair TRRANDOM sources.
Also adds new parameters to AM sources for ngspice-43. Also fixes a bug in the spice parameter parser (which would puke on any parameter name starting with one of the flag parameter strings). Also fixes a bug where the skipped source parameters would get set to "0" instead of their default values. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16393
This commit is contained in:
parent
1649b7dd56
commit
7c5eaed69e
|
@ -196,9 +196,9 @@ SIM_MODEL::INFO SIM_MODEL::TypeInfo( TYPE aType )
|
|||
case TYPE::V_PINKNOISE: return { DEVICE_T::V, "PINKNOISE", "Pink noise (1/f)" };
|
||||
case TYPE::V_BURSTNOISE: return { DEVICE_T::V, "BURSTNOISE", "Burst noise" };
|
||||
case TYPE::V_RANDUNIFORM: return { DEVICE_T::V, "RANDUNIFORM", "Random uniform" };
|
||||
case TYPE::V_RANDNORMAL: return { DEVICE_T::V, "RANDNORMAL", "Random normal" };
|
||||
case TYPE::V_RANDGAUSSIAN: return { DEVICE_T::V, "RANDGAUSSIAN", "Random Gaussian" };
|
||||
case TYPE::V_RANDEXP: return { DEVICE_T::V, "RANDEXP", "Random exponential" };
|
||||
//case TYPE::V_RANDPOISSON: return { DEVICE_T::V, "RANDPOISSON", "Random Poisson" };
|
||||
case TYPE::V_RANDPOISSON: return { DEVICE_T::V, "RANDPOISSON", "Random Poisson" };
|
||||
case TYPE::V_BEHAVIORAL: return { DEVICE_T::V, "=", "Behavioral" };
|
||||
|
||||
case TYPE::I: return { DEVICE_T::I, "DC", "DC", };
|
||||
|
@ -214,9 +214,9 @@ SIM_MODEL::INFO SIM_MODEL::TypeInfo( TYPE aType )
|
|||
case TYPE::I_PINKNOISE: return { DEVICE_T::I, "PINKNOISE", "Pink noise (1/f)" };
|
||||
case TYPE::I_BURSTNOISE: return { DEVICE_T::I, "BURSTNOISE", "Burst noise" };
|
||||
case TYPE::I_RANDUNIFORM: return { DEVICE_T::I, "RANDUNIFORM", "Random uniform" };
|
||||
case TYPE::I_RANDNORMAL: return { DEVICE_T::I, "RANDNORMAL", "Random normal" };
|
||||
case TYPE::I_RANDGAUSSIAN: return { DEVICE_T::I, "RANDGAUSSIAN", "Random Gaussian" };
|
||||
case TYPE::I_RANDEXP: return { DEVICE_T::I, "RANDEXP", "Random exponential" };
|
||||
//case TYPE::I_RANDPOISSON: return { DEVICE_T::I, "RANDPOISSON", "Random Poisson" };
|
||||
case TYPE::I_RANDPOISSON: return { DEVICE_T::I, "RANDPOISSON", "Random Poisson" };
|
||||
case TYPE::I_BEHAVIORAL: return { DEVICE_T::I, "=", "Behavioral" };
|
||||
|
||||
case TYPE::SUBCKT: return { DEVICE_T::SUBCKT, "", "Subcircuit" };
|
||||
|
@ -333,9 +333,9 @@ SIM_MODEL::SPICE_INFO SIM_MODEL::SpiceInfo( TYPE aType )
|
|||
case TYPE::V_PINKNOISE: return { "V", "", "TRNOISE" };
|
||||
case TYPE::V_BURSTNOISE: return { "V", "", "TRNOISE" };
|
||||
case TYPE::V_RANDUNIFORM: return { "V", "", "TRRANDOM" };
|
||||
case TYPE::V_RANDNORMAL: return { "V", "", "TRRANDOM" };
|
||||
case TYPE::V_RANDGAUSSIAN: return { "V", "", "TRRANDOM" };
|
||||
case TYPE::V_RANDEXP: return { "V", "", "TRRANDOM" };
|
||||
//case TYPE::V_RANDPOISSON: return { "V", "", "TRRANDOM" };
|
||||
case TYPE::V_RANDPOISSON: return { "V", "", "TRRANDOM" };
|
||||
case TYPE::V_BEHAVIORAL: return { "B" };
|
||||
|
||||
case TYPE::I: return { "I", "", "DC" };
|
||||
|
@ -351,9 +351,9 @@ SIM_MODEL::SPICE_INFO SIM_MODEL::SpiceInfo( TYPE aType )
|
|||
case TYPE::I_PINKNOISE: return { "I", "", "TRNOISE" };
|
||||
case TYPE::I_BURSTNOISE: return { "I", "", "TRNOISE" };
|
||||
case TYPE::I_RANDUNIFORM: return { "I", "", "TRRANDOM" };
|
||||
case TYPE::I_RANDNORMAL: return { "I", "", "TRRANDOM" };
|
||||
case TYPE::I_RANDGAUSSIAN: return { "I", "", "TRRANDOM" };
|
||||
case TYPE::I_RANDEXP: return { "I", "", "TRRANDOM" };
|
||||
//case TYPE::I_RANDPOISSON: return { "I", "", "TRRANDOM" };
|
||||
case TYPE::I_RANDPOISSON: return { "I", "", "TRRANDOM" };
|
||||
case TYPE::I_BEHAVIORAL: return { "B" };
|
||||
|
||||
case TYPE::SUBCKT: return { "X" };
|
||||
|
@ -931,12 +931,12 @@ std::unique_ptr<SIM_MODEL> SIM_MODEL::Create( TYPE aType )
|
|||
case TYPE::I_BURSTNOISE:
|
||||
case TYPE::V_RANDUNIFORM:
|
||||
case TYPE::I_RANDUNIFORM:
|
||||
case TYPE::V_RANDNORMAL:
|
||||
case TYPE::I_RANDNORMAL:
|
||||
case TYPE::V_RANDGAUSSIAN:
|
||||
case TYPE::I_RANDGAUSSIAN:
|
||||
case TYPE::V_RANDEXP:
|
||||
case TYPE::I_RANDEXP:
|
||||
//case TYPE::V_RANDPOISSON:
|
||||
//case TYPE::I_RANDPOISSON:
|
||||
case TYPE::V_RANDPOISSON:
|
||||
case TYPE::I_RANDPOISSON:
|
||||
return std::make_unique<SIM_MODEL_SOURCE>( aType );
|
||||
|
||||
case TYPE::SUBCKT:
|
||||
|
@ -1475,26 +1475,63 @@ template bool SIM_MODEL::InferSimModel<LIB_SYMBOL, LIB_FIELD>( LIB_SYMBOL& aSymb
|
|||
template <typename T_symbol, typename T_field>
|
||||
void SIM_MODEL::MigrateSimModel( T_symbol& aSymbol, const PROJECT* aProject )
|
||||
{
|
||||
if( aSymbol.FindField( SIM_DEVICE_TYPE_FIELD )
|
||||
|| aSymbol.FindField( SIM_TYPE_FIELD )
|
||||
|| aSymbol.FindField( SIM_PINS_FIELD )
|
||||
|| aSymbol.FindField( SIM_PARAMS_FIELD ) )
|
||||
T_field* existing_deviceTypeField = aSymbol.FindField( SIM_DEVICE_TYPE_FIELD );
|
||||
T_field* existing_typeField = aSymbol.FindField( SIM_TYPE_FIELD );
|
||||
T_field* existing_pinsField = aSymbol.FindField( SIM_PINS_FIELD );
|
||||
T_field* existing_paramsField = aSymbol.FindField( SIM_PARAMS_FIELD );
|
||||
|
||||
wxString existing_type;
|
||||
|
||||
if( existing_typeField )
|
||||
existing_type = existing_typeField->GetShownText( false ).Upper();
|
||||
|
||||
if( existing_deviceTypeField
|
||||
|| existing_typeField
|
||||
|| existing_pinsField
|
||||
|| existing_paramsField )
|
||||
{
|
||||
// Has a V7 model field.
|
||||
// Has a current (V7+) model field.
|
||||
|
||||
// Up until 7.0RC2 we used '+' and '-' for potentiometer pins, which doesn't match
|
||||
// SPICE. Here we remap them to 'r0' and 'r1'.
|
||||
if( T_field* deviceType = aSymbol.FindField( SIM_TYPE_FIELD ) )
|
||||
if( existing_type == wxS( "POT" ) )
|
||||
{
|
||||
if( deviceType->GetShownText( false ).Lower() == wxS( "pot" ) )
|
||||
if( existing_pinsField )
|
||||
{
|
||||
if( T_field* pins = aSymbol.FindField( SIM_PINS_FIELD ) )
|
||||
{
|
||||
wxString pinMap = pins->GetText();
|
||||
pinMap.Replace( wxS( "=+" ), wxS( "=r1" ) );
|
||||
pinMap.Replace( wxS( "=-" ), wxS( "=r0" ) );
|
||||
pins->SetText( pinMap );
|
||||
}
|
||||
wxString pinMap = existing_pinsField->GetText();
|
||||
pinMap.Replace( wxS( "=+" ), wxS( "=r1" ) );
|
||||
pinMap.Replace( wxS( "=-" ), wxS( "=r0" ) );
|
||||
existing_pinsField->SetText( pinMap );
|
||||
}
|
||||
}
|
||||
|
||||
// Up until 8.0RC1 random voltage/current sources were a bit of a mess.
|
||||
if( existing_type.StartsWith( wxS( "RAND" ) ) )
|
||||
{
|
||||
// Re-fetch value without resolving references. If it's an indirect value then we
|
||||
// can't migrate it.
|
||||
existing_type = existing_typeField->GetText().Upper();
|
||||
|
||||
if( existing_type.Replace( wxS( "NORMAL" ), wxS( "GAUSSIAN" ) ) )
|
||||
existing_typeField->SetText( existing_type );
|
||||
|
||||
if( existing_paramsField )
|
||||
{
|
||||
wxString params = existing_paramsField->GetText().Lower();
|
||||
size_t count = 0;
|
||||
|
||||
// We used to support 'min' and 'max' instead of 'range' and 'offset', but we
|
||||
// wrote all 4 to the netlist which would cause ngspice to barf, so no one has
|
||||
// working documents with min and max specified. Just delete them if they're
|
||||
// uninitialized.
|
||||
count += params.Replace( wxS( "min=0 " ), wxEmptyString );
|
||||
count += params.Replace( wxS( "max=0 " ), wxEmptyString );
|
||||
|
||||
// We used to use 'dt', but the correct ngspice name is 'ts'.
|
||||
count += params.Replace( wxS( "dt=" ), wxS( "ts=" ) );
|
||||
|
||||
if( count )
|
||||
existing_paramsField->SetText( params );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -248,9 +248,9 @@ public:
|
|||
V_PINKNOISE,
|
||||
V_BURSTNOISE,
|
||||
V_RANDUNIFORM,
|
||||
V_RANDNORMAL,
|
||||
V_RANDGAUSSIAN,
|
||||
V_RANDEXP,
|
||||
//V_RANDPOISSON,
|
||||
V_RANDPOISSON,
|
||||
V_BEHAVIORAL,
|
||||
|
||||
I,
|
||||
|
@ -266,9 +266,9 @@ public:
|
|||
I_PINKNOISE,
|
||||
I_BURSTNOISE,
|
||||
I_RANDUNIFORM,
|
||||
I_RANDNORMAL,
|
||||
I_RANDGAUSSIAN,
|
||||
I_RANDEXP,
|
||||
//I_RANDPOISSON,
|
||||
I_RANDPOISSON,
|
||||
I_BEHAVIORAL,
|
||||
|
||||
SUBCKT,
|
||||
|
|
|
@ -66,13 +66,13 @@ namespace SIM_MODEL_SERIALIZER_GRAMMAR
|
|||
TAO_PEGTL_ISTRING( "thermal" ), // VDMOS
|
||||
TAO_PEGTL_ISTRING( "xpart" )> {}; // BSIM1
|
||||
|
||||
struct fieldParamValuePair : sor<flagParam,
|
||||
if_must<param,
|
||||
struct fieldParamValuePair : sor<if_must<param,
|
||||
opt<sep>,
|
||||
one<'='>,
|
||||
opt<sep>,
|
||||
sor<quotedString,
|
||||
unquotedString>>> {};
|
||||
unquotedString>>,
|
||||
flagParam> {};
|
||||
struct fieldParamValuePairs : list<fieldParamValuePair, sep> {};
|
||||
struct fieldParamValuePairsGrammar : must<opt<sep>,
|
||||
opt<fieldParamValuePairs>,
|
||||
|
|
|
@ -112,8 +112,6 @@ std::string SPICE_GENERATOR_SOURCE::ItemLine( const SPICE_ITEM& aItem ) const
|
|||
break;
|
||||
}
|
||||
|
||||
// TODO: dt should be tstep by default.
|
||||
|
||||
case SIM_MODEL::TYPE::V_WHITENOISE:
|
||||
case SIM_MODEL::TYPE::I_WHITENOISE:
|
||||
args.append( getParamValueString( "rms", "0" ) + " " );
|
||||
|
@ -142,56 +140,39 @@ std::string SPICE_GENERATOR_SOURCE::ItemLine( const SPICE_ITEM& aItem ) const
|
|||
case SIM_MODEL::TYPE::I_RANDUNIFORM:
|
||||
{
|
||||
args.append( "1 " );
|
||||
args.append( getParamValueString( "dt", "0" ) + " " );
|
||||
args.append( getParamValueString( "ts", "0" ) + " " );
|
||||
args.append( getParamValueString( "td", "0" ) + " " );
|
||||
std::string min = getParamValueString( "min", "0" );
|
||||
std::string max = getParamValueString( "max", "0" );
|
||||
|
||||
args.append( min + " " );
|
||||
args.append( max + " " );
|
||||
|
||||
double minVal = std::stod( min );
|
||||
double maxVal = std::stod( max );
|
||||
|
||||
double rangeVal = maxVal - minVal;
|
||||
double offsetVal = ( maxVal + minVal ) / 2;
|
||||
|
||||
std::string range = std::to_string( rangeVal );
|
||||
std::string offset = std::to_string( offsetVal );
|
||||
|
||||
args.append( range + " " );
|
||||
args.append( offset + " " );
|
||||
args.append( getParamValueString( "range", "1" ) + " " );
|
||||
args.append( getParamValueString( "offset", "0" ) + " " );
|
||||
break;
|
||||
}
|
||||
|
||||
case SIM_MODEL::TYPE::V_RANDNORMAL:
|
||||
case SIM_MODEL::TYPE::I_RANDNORMAL:
|
||||
case SIM_MODEL::TYPE::V_RANDGAUSSIAN:
|
||||
case SIM_MODEL::TYPE::I_RANDGAUSSIAN:
|
||||
args.append( "2 " );
|
||||
args.append( getParamValueString( "dt", "0" ) + " " );
|
||||
args.append( getParamValueString( "ts", "0" ) + " " );
|
||||
args.append( getParamValueString( "td", "0" ) + " " );
|
||||
args.append( getParamValueString( "stddev", "0" ) + " " );
|
||||
args.append( getParamValueString( "stddev", "1" ) + " " );
|
||||
args.append( getParamValueString( "mean", "0" ) + " " );
|
||||
break;
|
||||
|
||||
case SIM_MODEL::TYPE::V_RANDEXP:
|
||||
case SIM_MODEL::TYPE::I_RANDEXP:
|
||||
args.append( "3 " );
|
||||
args.append( getParamValueString( "dt", "0" ) + " " );
|
||||
args.append( getParamValueString( "ts", "0" ) + " " );
|
||||
args.append( getParamValueString( "td", "0" ) + " " );
|
||||
args.append( getParamValueString( "mean", "0" ) + " " );
|
||||
args.append( getParamValueString( "mean", "1" ) + " " );
|
||||
args.append( getParamValueString( "offset", "0" ) + " " );
|
||||
break;
|
||||
|
||||
/*
|
||||
case SIM_MODEL::TYPE::V_RANDPOISSON:
|
||||
case SIM_MODEL::TYPE::I_RANDPOISSON:
|
||||
args.append( "4 " );
|
||||
args.append( getParamValueString( "dt", "0" ) + " " );
|
||||
args.append( getParamValueString( "ts", "0" ) + " " );
|
||||
args.append( getParamValueString( "td", "0" ) + " " );
|
||||
args.append( getParamValueString( "lambda", "0" ) + " " );
|
||||
args.append( getParamValueString( "lambda", "1" ) + " " );
|
||||
args.append( getParamValueString( "offset", "0" ) + " " );
|
||||
break;
|
||||
*/
|
||||
|
||||
default:
|
||||
for( const SIM_MODEL::PARAM& param : m_model.GetParams() )
|
||||
|
@ -300,9 +281,7 @@ void SIM_MODEL_SOURCE::doSetParamValue( int aParamIndex, const std::string& aVal
|
|||
// them out automatically. If a value is nulled, delete everything after it.
|
||||
if( aValue.empty() )
|
||||
{
|
||||
for( int paramIndex = static_cast<int>( aParamIndex );
|
||||
paramIndex < GetParamCount();
|
||||
++paramIndex )
|
||||
for( int paramIndex = aParamIndex; paramIndex < GetParamCount(); ++paramIndex )
|
||||
{
|
||||
m_params.at( aParamIndex ).value = "";
|
||||
}
|
||||
|
@ -313,8 +292,10 @@ void SIM_MODEL_SOURCE::doSetParamValue( int aParamIndex, const std::string& aVal
|
|||
{
|
||||
if( GetParam( paramIndex ).value == "" )
|
||||
{
|
||||
m_params.at( aParamIndex ).value = "0";
|
||||
SIM_MODEL::SetParamValue( paramIndex, "0" );
|
||||
std::string defaultValue = m_params.at( aParamIndex ).info.defaultValue;
|
||||
|
||||
m_params.at( aParamIndex ).value = defaultValue;
|
||||
SIM_MODEL::SetParamValue( paramIndex, defaultValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -374,38 +355,38 @@ const std::vector<SIM_MODEL::PARAM::INFO>& SIM_MODEL_SOURCE::makeParamInfos( TYP
|
|||
|
||||
switch( aType )
|
||||
{
|
||||
case TYPE::V: return vdc;
|
||||
case TYPE::I: return idc;
|
||||
case TYPE::V_SIN: return vsin;
|
||||
case TYPE::I_SIN: return isin;
|
||||
case TYPE::V_PULSE: return vpulse;
|
||||
case TYPE::I_PULSE: return ipulse;
|
||||
case TYPE::V_EXP: return vexp;
|
||||
case TYPE::I_EXP: return iexp;
|
||||
case TYPE::V_AM: return vam;
|
||||
case TYPE::I_AM: return iam;
|
||||
case TYPE::V_SFFM: return vsffm;
|
||||
case TYPE::I_SFFM: return isffm;
|
||||
case TYPE::V_VCL: return vcvs;
|
||||
case TYPE::V_CCL: return ccvs;
|
||||
case TYPE::V_PWL: return vpwl;
|
||||
case TYPE::I_VCL: return vccs;
|
||||
case TYPE::I_CCL: return cccs;
|
||||
case TYPE::I_PWL: return ipwl;
|
||||
case TYPE::V_WHITENOISE: return vwhitenoise;
|
||||
case TYPE::I_WHITENOISE: return iwhitenoise;
|
||||
case TYPE::V_PINKNOISE: return vpinknoise;
|
||||
case TYPE::I_PINKNOISE: return ipinknoise;
|
||||
case TYPE::V_BURSTNOISE: return vburstnoise;
|
||||
case TYPE::I_BURSTNOISE: return iburstnoise;
|
||||
case TYPE::V_RANDUNIFORM: return vrandomuniform;
|
||||
case TYPE::I_RANDUNIFORM: return irandomuniform;
|
||||
case TYPE::V_RANDNORMAL: return vrandomnormal;
|
||||
case TYPE::I_RANDNORMAL: return irandomnormal;
|
||||
case TYPE::V_RANDEXP: return vrandomexp;
|
||||
case TYPE::I_RANDEXP: return irandomexp;
|
||||
//case TYPE::V_RANDPOISSON: return vrandompoisson;
|
||||
//case TYPE::I_RANDPOISSON: return irandompoisson;
|
||||
case TYPE::V: return vdc;
|
||||
case TYPE::I: return idc;
|
||||
case TYPE::V_SIN: return vsin;
|
||||
case TYPE::I_SIN: return isin;
|
||||
case TYPE::V_PULSE: return vpulse;
|
||||
case TYPE::I_PULSE: return ipulse;
|
||||
case TYPE::V_EXP: return vexp;
|
||||
case TYPE::I_EXP: return iexp;
|
||||
case TYPE::V_AM: return vam;
|
||||
case TYPE::I_AM: return iam;
|
||||
case TYPE::V_SFFM: return vsffm;
|
||||
case TYPE::I_SFFM: return isffm;
|
||||
case TYPE::V_VCL: return vcvs;
|
||||
case TYPE::V_CCL: return ccvs;
|
||||
case TYPE::V_PWL: return vpwl;
|
||||
case TYPE::I_VCL: return vccs;
|
||||
case TYPE::I_CCL: return cccs;
|
||||
case TYPE::I_PWL: return ipwl;
|
||||
case TYPE::V_WHITENOISE: return vwhitenoise;
|
||||
case TYPE::I_WHITENOISE: return iwhitenoise;
|
||||
case TYPE::V_PINKNOISE: return vpinknoise;
|
||||
case TYPE::I_PINKNOISE: return ipinknoise;
|
||||
case TYPE::V_BURSTNOISE: return vburstnoise;
|
||||
case TYPE::I_BURSTNOISE: return iburstnoise;
|
||||
case TYPE::V_RANDUNIFORM: return vrandomuniform;
|
||||
case TYPE::I_RANDUNIFORM: return irandomuniform;
|
||||
case TYPE::V_RANDGAUSSIAN: return vrandomnormal;
|
||||
case TYPE::I_RANDGAUSSIAN: return irandomnormal;
|
||||
case TYPE::V_RANDEXP: return vrandomexp;
|
||||
case TYPE::I_RANDEXP: return irandomexp;
|
||||
case TYPE::V_RANDPOISSON: return vrandompoisson;
|
||||
case TYPE::I_RANDPOISSON: return irandompoisson;
|
||||
default:
|
||||
wxFAIL_MSG( "Unhandled SIM_MODEL type in SIM_MODEL_SOURCE" );
|
||||
static std::vector<SIM_MODEL::PARAM::INFO> empty;
|
||||
|
@ -660,14 +641,48 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeAMParamInfos( const st
|
|||
paramInfo.description = "Modulating frequency";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "md";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "1.0";
|
||||
paramInfo.description = "Modulation depth";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "fc";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "Hz";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "";
|
||||
paramInfo.defaultValue = "1/tstop";
|
||||
paramInfo.description = "Carrier frequency";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "td";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Delay";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "phases";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "°";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Modulation signal phase";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "phasec";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "°";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Carrier signal phase";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -734,6 +749,8 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeSFFMParamInfos( const
|
|||
paramInfo.description = "Signal phase";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
|
@ -957,28 +974,12 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomUniformParamInfo
|
|||
std::vector<PARAM::INFO> paramInfos;
|
||||
PARAM::INFO paramInfo;
|
||||
|
||||
paramInfo.name = "min";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "-0.5";
|
||||
paramInfo.description = "Min. value";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "max";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0.5";
|
||||
paramInfo.description = "Max. value";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "dt";
|
||||
paramInfo.name = "ts";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Time step";
|
||||
paramInfo.defaultValue = "";
|
||||
paramInfo.description = "Individual voltage duration";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "td";
|
||||
|
@ -989,6 +990,22 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomUniformParamInfo
|
|||
paramInfo.description = "Delay";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "range";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "1";
|
||||
paramInfo.description = "Range";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "offset";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Offset";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
|
@ -1001,12 +1018,20 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomNormalParamInfos
|
|||
std::vector<PARAM::INFO> paramInfos;
|
||||
PARAM::INFO paramInfo;
|
||||
|
||||
paramInfo.name = "mean";
|
||||
paramInfo.name = "ts";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "";
|
||||
paramInfo.description = "Individual voltage duration";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "td";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Mean";
|
||||
paramInfo.description = "Delay";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "stddev";
|
||||
|
@ -1017,20 +1042,12 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomNormalParamInfos
|
|||
paramInfo.description = "Standard deviation";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "dt";
|
||||
paramInfo.name = "mean";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Time step";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "td";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Delay";
|
||||
paramInfo.description = "Mean";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
|
@ -1045,12 +1062,20 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomExpParamInfos( c
|
|||
std::vector<PARAM::INFO> paramInfos;
|
||||
PARAM::INFO paramInfo;
|
||||
|
||||
paramInfo.name = "offset";
|
||||
paramInfo.name = "ts";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "";
|
||||
paramInfo.description = "Individual voltage duration";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "td";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Offset";
|
||||
paramInfo.description = "Delay";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "mean";
|
||||
|
@ -1061,20 +1086,12 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomExpParamInfos( c
|
|||
paramInfo.description = "Mean";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "dt";
|
||||
paramInfo.name = "offset";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Time step";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "td";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Delay";
|
||||
paramInfo.description = "Offset";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
|
@ -1089,28 +1106,12 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomPoissonParamInfo
|
|||
std::vector<PARAM::INFO> paramInfos;
|
||||
PARAM::INFO paramInfo;
|
||||
|
||||
paramInfo.name = "offset";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Offset";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "lambda";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "1";
|
||||
paramInfo.description = "Mean";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "dt";
|
||||
paramInfo.name = "ts";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = "s";
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Time step";
|
||||
paramInfo.defaultValue = "";
|
||||
paramInfo.description = "Individual voltage duration";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "td";
|
||||
|
@ -1121,6 +1122,22 @@ std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomPoissonParamInfo
|
|||
paramInfo.description = "Delay";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "lambda";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "1";
|
||||
paramInfo.description = "Lambda";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
paramInfo.name = "offset";
|
||||
paramInfo.type = SIM_VALUE::TYPE_FLOAT;
|
||||
paramInfo.unit = aUnit;
|
||||
paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
|
||||
paramInfo.defaultValue = "0";
|
||||
paramInfo.description = "Offset";
|
||||
paramInfos.push_back( paramInfo );
|
||||
|
||||
appendAcParamInfos( paramInfos, aUnit );
|
||||
appendSpParamInfos( paramInfos, aUnit );
|
||||
return paramInfos;
|
||||
|
|
Loading…
Reference in New Issue