Skip to content

Commit 8ca71dc

Browse files
committed
IBISParser: added checks for a few things we didn't yet handle such as "M" unit suffix
1 parent 7638b9a commit 8ca71dc

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

scopehal/IBISParser.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* libscopehal v0.1 *
44
* *
5-
* Copyright (c) 2012-2022 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2023 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -380,7 +380,7 @@ bool IBISParser::Load(string fname)
380380
{}
381381

382382
//Ignore pin table
383-
else if( (scmd == "Pin") || (scmd == "Diff Pin") | (scmd == "Series Pin Mapping"))
383+
else if( (scmd == "Pin") || (scmd == "Diff Pin") || (scmd == "Diff pin") || (scmd == "Series Pin Mapping"))
384384
{
385385
data_block = BLOCK_NONE;
386386
model = NULL;
@@ -412,7 +412,7 @@ bool IBISParser::Load(string fname)
412412
&model->m_voltages[CORNER_MIN],
413413
&model->m_voltages[CORNER_MAX]);
414414
}
415-
else if(scmd == "Power Clamp Reference")
415+
else if( (scmd == "Power Clamp Reference") || (scmd == "POWER Clamp Reference") )
416416
{
417417
//ignore for now
418418
}
@@ -560,6 +560,10 @@ bool IBISParser::Load(string fname)
560560
}
561561

562562
//Fixture properties in waveforms
563+
else if(skeyword == "C_fixture")
564+
{}
565+
else if(skeyword == "L_fixture")
566+
{}
563567
else if(skeyword == "R_fixture")
564568
{
565569
char fres[128];
@@ -688,6 +692,9 @@ float IBISParser::ParseNumber(const char* str)
688692

689693
switch(scale)
690694
{
695+
case 'M':
696+
return ret * 1e6;
697+
691698
case 'k':
692699
return ret * 1e3;
693700

0 commit comments

Comments
 (0)