sim - fix a QA case for XSPICE

This commit is contained in:
Fabien Corona 2023-02-20 19:40:59 +01:00
parent 869447fedd
commit 3751b250c6
1 changed files with 5 additions and 4 deletions

View File

@ -621,11 +621,12 @@ void NETLIST_EXPORTER_SPICE::WriteDirectives( OUTPUTFORMATTER& aFormatter,
{
// ngspice (v39) does not support power measurement for XSPICE devices
// XPSICE devices are marked with 'A'
if( ( item.model->GetPinCount() >= 2 ) && ( item.refName.size() > 0 )
&& ( item.refName[0] != 'A' ) )
std::string itemName = item.model->SpiceGenerator().ItemName( item );
if( ( item.model->GetPinCount() >= 2 ) && ( itemName.size() > 0 )
&& ( itemName.c_str()[0] != 'A' ) )
{
aFormatter.Print( 0, ".probe p(%s)\n",
item.model->SpiceGenerator().ItemName( item ).c_str() );
aFormatter.Print( 0, ".probe p(%s)\n", itemName.c_str() );
}
}
}