Ibis parser: fix a collision name with a windows header (msys2 specific)

This is recurrent conflict. (fixed by changing INPUT to INPUT_SDT).
This commit is contained in:
jean-pierre charras 2022-11-08 17:34:29 +01:00
parent 2cfe78170c
commit ffd578ef70
3 changed files with 11 additions and 11 deletions

View File

@ -536,7 +536,7 @@ bool IbisModel::Check()
Report( _( "Invalid GND clamp." ), RPT_SEVERITY_ERROR );
status = false;
}
if( m_type != IBIS_MODEL_TYPE::INPUT_ECL && m_type != IBIS_MODEL_TYPE::INPUT
if( m_type != IBIS_MODEL_TYPE::INPUT_ECL && m_type != IBIS_MODEL_TYPE::INPUT_STD
&& m_type != IBIS_MODEL_TYPE::TERMINATOR && m_type != IBIS_MODEL_TYPE::SERIES
&& m_type != IBIS_MODEL_TYPE::SERIES_SWITCH )
{
@ -1830,7 +1830,7 @@ bool IbisParser::readModel()
if( readWord( subparam ) )
{
if( !strcmp( subparam.c_str(), "Input" ) )
m_currentModel->m_type = IBIS_MODEL_TYPE::INPUT;
m_currentModel->m_type = IBIS_MODEL_TYPE::INPUT_STD;
else if( !strcmp( subparam.c_str(), "Output" ) )
m_currentModel->m_type = IBIS_MODEL_TYPE::OUTPUT;
else if( !strcmp( subparam.c_str(), "I/O" ) )

View File

@ -388,7 +388,7 @@ Series, and Series_switch.
enum class IBIS_MODEL_TYPE
{
UNDEFINED,
INPUT,
INPUT_STD, // Do not use INPUT: it can conflict with a windows header on MSYS2
OUTPUT,
IO,
THREE_STATE,

View File

@ -511,21 +511,21 @@ std::string KIBIS_MODEL::generateSquareWave( std::string aNode1, std::string aNo
int i = 0;
int prevBit = 2;
int prevBit = 2;
for( std::pair<int, double> bit : aBits )
{
IbisWaveform* WF;
double timing = bit.second;
if ( bit.first != prevBit )
{
if( bit.first == 1 )
WF = &risingWF;
else
WF = &fallingWF;
stimuliIndex.push_back( i );
simul += "Vstimuli";
@ -1280,7 +1280,7 @@ bool KIBIS_PIN::writeSpiceDevice( std::string* aDest, std::string aName, KIBIS_M
switch( aModel.m_type )
{
case IBIS_MODEL_TYPE::INPUT:
case IBIS_MODEL_TYPE::INPUT_STD:
case IBIS_MODEL_TYPE::IO:
case IBIS_MODEL_TYPE::IO_OPEN_DRAIN:
case IBIS_MODEL_TYPE::IO_OPEN_SINK:
@ -1506,27 +1506,27 @@ std::vector<std::pair<int, double>> KIBIS_WAVEFORM_PRBS::GenerateBitSequence()
//110 = x^3+x^2+1
uint8_t seed = 0x12; // Any non zero state
uint8_t lfsr = seed;
if ( m_bitrate == 0 )
return bitSequence;
double period = 1/m_bitrate;
double t = 0;
m_bits = abs( m_bits ); // Just to be sure.
int bits = 0;
do
{
uint8_t lsb = lfsr & 0x01;
bitSequence.emplace_back( ( inverted ^ lsb ? 1 : 0 ), t );
lfsr = lfsr >> 1;
if ( lsb )
lfsr ^= polynomial;
t += period;
} while ( ++bits < m_bits );
return bitSequence;
}