KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ibis_parser.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2022 Fabien Corona f.corona<at>laposte.net
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * Redistribution and use in source and binary forms, with or without modification,
8 * are permitted provided that the following conditions are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright notice,
11 * this list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright notice,
14 * this list of conditions and the following disclaimer in the documentation
15 * and/or other materials provided with the distribution.
16 *
17 * 3. Neither the name of the copyright holder nor the names of its contributors may be used
18 * to endorse or promote products derived from this software without specific
19 * prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
22 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
23 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 */
31
32
33#ifndef IBIS_PARSER_H
34#define IBIS_PARSER_H
35
36#define NAN_NA "1"
37#define NAN_INVALID "0"
38
39#define IBIS_MAX_VERSION 7.0 // Up to v7.0, IBIS is fully backward compatible
40#define IBIS_MAX_LINE_LENGTH 2048 // official limit is 1024
41
42#include <wx/string.h>
43#include <reporter.h>
45#include <iostream>
46#include <fstream>
47#include <vector>
48#include <map>
49#include <math.h>
50#include <cstring>
51
52
54{
55public:
56 IBIS_BASE( REPORTER* aReporter )
57 {
58 m_Reporter = aReporter;
59 };
60
61 virtual ~IBIS_BASE() = default;
62
70 void Report( const std::string& aMsg, SEVERITY aSeverity = RPT_SEVERITY_INFO ) const
71 {
72 if( m_Reporter )
73 m_Reporter->Report( aMsg, aSeverity );
74 };
75
76public:
78
79protected:
85 static std::string doubleToString( double aNumber );
86};
87
88
89class IBIS_INPUT : public IBIS_BASE
90{
91public:
92 IBIS_INPUT( REPORTER* aReporter ) :
93 IBIS_BASE( aReporter )
94 {};
95
100 bool virtual Check() { return false; };
101};
102
103
105{
106 TYP = 0,
109};
110
111
113{
114 // All matrices are supposed to be symmetrical, only upper right triangle is given
116 BANDED, // Give the main diagonal + [bandwidth] elements on the right
117 SPARSE, // Only give non-zero values.
118 FULL, // Give the whole upper triangle.
119};
120
121
123{
124public:
125 IBIS_MATRIX( REPORTER* aReporter ) :
126 IBIS_INPUT( aReporter )
127 {};
128
129 virtual ~IBIS_MATRIX(){};
130
132 int m_rows = -1;
133 int m_cols = -1;
134 std::vector<double> m_data;
135
136 bool Check() override;
137};
138
139
141{
142public:
143 IBIS_SECTION( REPORTER* aReporter ) :
144 IBIS_INPUT( aReporter )
145 {};
146};
147
148
150{
151public:
152 IbisHeader( REPORTER* aReporter ) :
153 IBIS_SECTION( aReporter )
154 {};
155
156 double m_ibisVersion = -1;
157 double m_fileRevision = -1;
158 std::string m_fileName;
159 std::string m_source;
160 std::string m_date;
161 std::string m_notes;
162 std::string m_disclaimer;
163 std::string m_copyright;
164
165 bool Check() override;
166};
167
168
170{
171public:
172 TypMinMaxValue( REPORTER* aReporter ) :
173 IBIS_INPUT( aReporter )
174 {};
175
176 double value[3] = { nan( NAN_NA ), nan( NAN_NA ), nan( NAN_NA ) };
177
178 bool isNA() const;
179
180 bool Check() override;
181
182 void Add( const TypMinMaxValue& aValue );
183};
184
185
187{
188public:
190 IBIS_INPUT( aReporter ),
191 m_Rpkg( aReporter ),
192 m_Lpkg( aReporter ),
193 m_Cpkg( aReporter )
194 {};
195
199
200 bool Check() override;
201};
202
203
205{
206public:
208 IBIS_INPUT( aReporter )
209 {};
210
212 {};
213
214 std::string m_pinName;
215 std::string m_signalName;
216 std::string m_modelName;
217 double m_Rpin = nan( NAN_NA );
218 double m_Lpin = nan( NAN_NA );
219 double m_Cpin = nan( NAN_NA );
220
221 int m_Rcol = 0;
222 int m_Lcol = 0;
223 int m_Ccol = 0;
224
225 bool Check() override;
226
227 bool m_dummy = false;
228};
229
230
232{
233public:
235 IBIS_INPUT( aReporter )
236 {};
237
239 {};
240
241 std::string m_pinName;
242 std::string m_PDref;
243 std::string m_PUref;
244 std::string m_GNDClampRef;
245 std::string m_POWERClampRef;
246 std::string m_extRef;
247};
248
249
251{
252public:
254 IBIS_INPUT( aReporter ),
255 tdelay( aReporter )
256 {};
257
259 {};
260
261 std::string pinA;
262 std::string pinB;
263 double Vdiff = 0.2; // ignored for input
264 TypMinMaxValue tdelay = 0; // ignored for outputs
265};
266
267
269{
270public:
271 IbisDiffPin( REPORTER* aReporter ) :
272 IBIS_INPUT( aReporter )
273 {};
274
275 std::vector<IbisDiffPinEntry> m_entries;
276};
277
278
281{
282public:
284 IBIS_INPUT( aReporter )
285 {};
286
289
290 std::string m_pin1;
291 std::string m_pin2;
292 std::string m_modelName;
294};
295
296
298{
299public:
300 IbisComponent( REPORTER* aReporter ) :
301 IBIS_INPUT( aReporter ),
302 m_package( aReporter ),
303 m_diffPin( aReporter )
304 {};
305
307 {};
308
309 std::string m_name = "";
310 std::string m_manufacturer = "";
312 std::vector<IbisComponentPin> m_pins;
313 std::vector<IbisComponentPinMapping> m_pinMappings;
314 std::string m_packageModel;
315 std::string m_busLabel;
316 std::string m_dieSupplyPads;
318 std::vector<IbisComponentSeriesPinMapping> m_seriesPinMappings;
319
320 bool Check() override;
321};
322
323
325{
326public:
327 std::string m_modelName;
329};
330
331
333{
334public:
336 IBIS_INPUT( aReporter )
337 {};
338
340 {};
341
342 std::string m_name;
343 std::vector<IbisModelSelectorEntry> m_models;
344
345 bool Check() override;
346};
347
348
350{
351public:
352 IVtableEntry( REPORTER* aReporter ) :
353 IBIS_INPUT( aReporter ),
354 I( aReporter )
355 {};
356
358 {};
359
360 double V = 0;
362};
363
364
365class IVtable : public IBIS_INPUT
366{
367public:
368 IVtable( REPORTER* aReporter ) :
369 IBIS_INPUT( aReporter )
370 {};
371
372 std::vector<IVtableEntry> m_entries;
373
374 bool Check() override;
375
384 double InterpolatedI( double aV, IBIS_CORNER aCorner ) const;
385
399 std::string Spice( int aN, const std::string& aPort1, const std::string& aPort2, bool aNegateI,
400 const std::string& aModelName, IBIS_CORNER aCorner ) const;
401
402private:
403};
404
406{
407public:
408 VTtableEntry( REPORTER* aReporter ) :
409 IBIS_INPUT( aReporter ),
410 V( aReporter )
411 {};
412
414 {};
415
416 double t = 0;
418};
419
420
421class VTtable : public IBIS_INPUT
422{
423public:
424 VTtable( REPORTER* aReporter ) :
425 IBIS_INPUT( aReporter )
426 {};
427
428 std::vector<VTtableEntry> m_entries;
429};
430
431/*
432Model_type must be one of the following:
433Input, Output, I/O, 3-state, Open_drain, I/O_open_drain, Open_sink, I/O_open_sink,
434Open_source, I/O_open_source, Input_ECL, Output_ECL, I/O_ECL, 3-state_ECL, Terminator,
435Series, and Series_switch.
436*/
437
459
466
467
468class dvdt
469{
470public:
471 double m_dv = 1;
472 double m_dt = 1;
473};
474
475
477{
478public:
479 dvdtTypMinMax( REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
481
482 bool Check() override;
483};
484
485
486class IbisRamp : public IBIS_INPUT
487{
488public:
489 IbisRamp( REPORTER* aReporter ) :
490 IBIS_INPUT( aReporter ),
491 m_falling( aReporter ),
492 m_rising( aReporter )
493 {};
494
497 double m_Rload = 50; // The R_load subparameter is optional if the default 50 ohm load is used
498
499 bool Check() override;
500};
501
502
508
509
511{
512public:
513 IbisWaveform( REPORTER* aReporter ) :
514 IBIS_INPUT( aReporter ),
515 m_table( aReporter )
516 {};
517
520 double m_R_dut = 0;
521 double m_C_dut = 0;
522 double m_L_dut = 0;
523 double m_R_fixture = 0;
524 double m_C_fixture = 0;
525 double m_L_fixture = 0;
526 double m_V_fixture = 0;
527 double m_V_fixture_min = 0;
528 double m_V_fixture_max = 0;
529};
530
531
538
539
546
547
549{
550public:
552 m_name( name ),
553 m_mode( mode )
554 {};
555
556 std::string m_name;
558};
559
560
561// One [Series MOSFET] block. Multiple blocks per path = one per Vds.
563{
564public:
565 IbisMosfetEntry( REPORTER* aReporter ) :
566 IBIS_INPUT( aReporter ),
567 m_table( aReporter )
568 {};
569
570 double m_Vds = nan( NAN_NA );
572};
573
574
575// Per-path series RLC + IV. m_seen tracks [On]/[Off] presence for Check().
577{
578public:
579 IbisSeriesData( REPORTER* aReporter ) :
580 IBIS_INPUT( aReporter ),
581 m_Rseries( aReporter ),
582 m_Lseries( aReporter ),
583 m_Cseries( aReporter ),
584 m_RlSeries( aReporter ),
585 m_LcSeries( aReporter ),
586 m_RcSeries( aReporter ),
587 m_seriesCurrent( aReporter )
588 {};
589
597 std::vector<IbisMosfetEntry> m_seriesMosfet;
598 bool m_seen = false;
599
600 bool isPopulated() const;
601};
602
603
605{
606public:
607 IbisModel( REPORTER* aReporter ) :
608 IBIS_INPUT( aReporter ),
609 m_C_comp( aReporter ),
610 m_C_comp_gnd_clamp( aReporter ),
611 m_C_comp_power_clamp( aReporter ),
612 m_C_comp_pullup( aReporter ),
613 m_C_comp_pulldown( aReporter ),
614 m_voltageRange( aReporter ),
615 m_temperatureRange( aReporter ),
616 m_pullupReference( aReporter ),
617 m_pulldownReference( aReporter ),
618 m_GNDClampReference( aReporter ),
619 m_POWERClampReference( aReporter ),
620 m_Rgnd( aReporter ),
621 m_Rpower( aReporter ),
622 m_Rac( aReporter ),
623 m_Cac( aReporter ),
624 m_GNDClamp( aReporter ),
625 m_POWERClamp( aReporter ),
626 m_pullup( aReporter ),
627 m_pulldown( aReporter ),
628 m_ISSO_PU( aReporter ),
629 m_ISSO_PD( aReporter ),
630 m_compositeCurrent( aReporter ),
631 m_ramp( aReporter ),
632 m_series( aReporter ),
633 m_seriesOn( aReporter ),
634 m_seriesOff( aReporter )
635 {};
636
637 virtual ~IbisModel() = default;
638
639 std::string m_name;
641 /* The Polarity, Enable, Vinl, Vinh, Vmeas, Cref, Rref, and Vref subparameters are optional. */
642 /* the default values of Vinl = 0.8 V and Vinh = 2.0 V are assumed. */
643 double m_vinl = 0.8;
644 double m_vinh = 2;
645 double m_vref = 0;
646 double m_rref = 0;
647 double m_cref = 0;
648 double m_vmeas = 0;
651 // End of optional subparameters
652
675 std::vector<IbisWaveform*> m_risingWaveforms;
676 std::vector<IbisWaveform*> m_fallingWaveforms;
678
679 /* Series and Series_switch model data. For Series models, m_series holds
680 * the [R/L/C/Rl/Lc/Rc Series] and [Series Current] values that appear
681 * directly inside [Model]. For Series_switch models, the data inside the
682 * [On] and [Off] sub-blocks goes into m_seriesOn and m_seriesOff. */
686
687 std::vector<IbisSubmodelMode> m_submodels;
688
689 bool Check() override;
690};
691
692
700
701
703{
704public:
705 IbisSubmodel( REPORTER* aReporter ) :
706 IBIS_INPUT( aReporter ),
707 m_VtriggerR( aReporter ),
708 m_VtriggerF( aReporter ),
709 m_offDelay( aReporter ),
710 m_pullup( aReporter ),
711 m_pulldown( aReporter ),
712 m_GNDClamp( aReporter ),
713 m_POWERClamp( aReporter ),
714 m_GNDPulse( aReporter ),
715 m_POWERPulse( aReporter ),
716 m_ramp( aReporter )
717 {};
718
719 virtual ~IbisSubmodel() = default;
720
721 std::string m_name;
733 std::vector<IbisWaveform*> m_risingWaveforms;
734 std::vector<IbisWaveform*> m_fallingWaveforms;
735
736 bool Check() override;
737};
738
739
741{
742public:
744 IBIS_INPUT( aReporter )
745 {};
746
748 {};
749
750 std::string m_name;
751 std::string m_manufacturer;
752 std::string m_OEM;
753 std::string m_description;
755 std::map<std::string, int> m_pins;
756
757 std::shared_ptr<IBIS_MATRIX> m_resistanceMatrix;
758 std::shared_ptr<IBIS_MATRIX> m_capacitanceMatrix;
759 std::shared_ptr<IBIS_MATRIX> m_inductanceMatrix;
760
761 bool Check() override;
762};
763
764
765class IbisFile : public IBIS_INPUT
766{
767public:
768 IbisFile( REPORTER* aReporter ) :
769 IBIS_INPUT( aReporter ),
770 m_header( aReporter )
771 {};
772
773 virtual ~IbisFile()
774 {};
775
777 std::vector<IbisComponent> m_components;
778 std::vector<IbisModelSelector> m_modelSelectors;
779 std::vector<IbisModel> m_models;
780 std::vector<IbisPackageModel> m_packageModels;
781 std::map<std::string, IbisSubmodel> m_submodels;
782};
783
784
811
824
825
826class IbisParser : public IBIS_INPUT
827{
828public:
829 IbisParser( REPORTER* aReporter ) :
830 IBIS_INPUT( aReporter ),
831 m_ibisFile( aReporter )
832 {};
833
834 bool m_parrot = true; // Write back all lines.
835
837 char m_commentChar = '|';
838 std::vector<char> m_buffer;
841 int m_lineIndex = 0;
843
850 std::shared_ptr<IBIS_MATRIX> m_currentMatrix = nullptr;
858
866 bool ParseFile( const std::string& aFileName );
867
868private:
869 std::string* m_continuingString = nullptr;
870
879 bool compareIbisWord( const std::string& a, const std::string& b );
880
886 bool parseHeader( std::string& aKeyword );
887
893 bool parseComponent( std::string& aKeyword );
894
900 bool parseModelSelector( std::string& aKeyword );
901
907 bool parseModel( std::string& aKeyword );
908
911 {
912 if( !m_currentModel )
913 return nullptr;
914
916 }
917
919 bool readSeriesMosfet();
920
926 bool parseSubmodel( std::string& aKeyword );
927
933 bool parsePackageModel( std::string& aKeyword );
934
940 bool parsePackageModelModelData( std::string& aKeyword );
941
947 bool parseAlgorithmicModel( std::string& aKeyword );
948
956 bool parseDouble( double& aDest, std::string& aStr, bool aAllowModifiers = false );
957
964 bool parseDvdt( dvdt& aDest, std::string& aStr );
965
970 bool onNewLine(); // Gets rid of comments ( except on a comment character change command...)
971
976 bool getNextLine();
977
979 void printLine();
980
981 void skipWhitespaces();
982 bool checkEndofLine(); // To be used when there cannot be any character left on the line
984 std::string getKeyword();
985
986 bool readInt( int& aDest );
987 bool readDouble( double& aDest );
988 bool readWord( std::string& aDest );
989 bool readDvdt( dvdt& aDest );
990 bool readMatrixPinIndex( int& aDest );
991 bool readMatrixType( std::shared_ptr<IBIS_MATRIX>& aDest );
992 bool readMatrixBandwidth();
993 bool readMatrixRow();
995 bool readMatrixSparse();
996 bool readMatrixData();
997 bool readRampdvdt( dvdtTypMinMax& aDest );
998 bool readRamp();
999 bool readModelSpec();
1000 bool readSubmodelSpec();
1002 bool readAlgorithmicModel();
1003 bool readAddSubmodel();
1004 bool readWaveform( IbisWaveform* aDest, IBIS_WAVEFORM_TYPE aType );
1005 bool readString( std::string& aDest );
1006 bool storeString( std::string& aDest, bool aMultiline );
1007 bool readTableLine( std::vector<std::string>& aDest );
1008
1009 bool readNumericSubparam( const std::string& aSubparam, double& aDest );
1010 bool readIVtableEntry( IVtable& aTable );
1011 bool readVTtableEntry( VTtable& aTable );
1012 bool readTypMinMaxValue( TypMinMaxValue& aDest );
1013 bool readTypMinMaxValueSubparam( const std::string& aSubparam, TypMinMaxValue& aDest );
1014 //bool ReadDieSupplyPads();
1015
1016 bool readPackage();
1017 bool readPin();
1018 bool readPinMapping();
1019 bool readDiffPin();
1020 bool readSeriesPinMapping();
1021 bool readModelSelector();
1022 bool readModel();
1023 bool readSubmodel();
1024 bool readPackageModelPins();
1025
1027 bool changeCommentChar();
1028 bool changeContext( std::string& aKeyword );
1029
1032};
1033
1034#endif
const char * name
Store all of the related component information found in a netlist.
void Report(const std::string &aMsg, SEVERITY aSeverity=RPT_SEVERITY_INFO) const
Print a message.
Definition ibis_parser.h:70
IBIS_BASE(REPORTER *aReporter)
Definition ibis_parser.h:56
REPORTER * m_Reporter
Definition ibis_parser.h:77
static std::string doubleToString(double aNumber)
Convert a double to string using scientific notation.
virtual ~IBIS_BASE()=default
virtual bool Check()
Check if the data held by the object is valid.
IBIS_INPUT(REPORTER *aReporter)
Definition ibis_parser.h:92
IBIS_MATRIX_TYPE m_type
std::vector< double > m_data
IBIS_MATRIX(REPORTER *aReporter)
bool Check() override
Check if the data held by the object is valid.
virtual ~IBIS_MATRIX()
IBIS_SECTION(REPORTER *aReporter)
IVtableEntry(REPORTER *aReporter)
TypMinMaxValue I
virtual ~IVtableEntry()
bool Check() override
Check if the data held by the object is valid.
double InterpolatedI(double aV, IBIS_CORNER aCorner) const
Interpolate the IV table.
std::string Spice(int aN, const std::string &aPort1, const std::string &aPort2, bool aNegateI, const std::string &aModelName, IBIS_CORNER aCorner) const
Interpolate the IV table.
std::vector< IVtableEntry > m_entries
IVtable(REPORTER *aReporter)
bool Check() override
Check if the data held by the object is valid.
TypMinMaxValue m_Cpkg
TypMinMaxValue m_Lpkg
IbisComponentPackage(REPORTER *aReporter)
TypMinMaxValue m_Rpkg
IbisComponentPinMapping(REPORTER *aReporter)
virtual ~IbisComponentPinMapping()
std::string m_POWERClampRef
bool Check() override
Check if the data held by the object is valid.
virtual ~IbisComponentPin()
std::string m_signalName
std::string m_pinName
std::string m_modelName
IbisComponentPin(REPORTER *aReporter)
IbisComponentSeriesPinMapping(REPORTER *aReporter)
std::string m_manufacturer
std::string m_packageModel
std::vector< IbisComponentPinMapping > m_pinMappings
IbisComponentPackage m_package
std::string m_busLabel
std::string m_dieSupplyPads
bool Check() override
Check if the data held by the object is valid.
IbisDiffPin m_diffPin
virtual ~IbisComponent()
IbisComponent(REPORTER *aReporter)
std::string m_name
std::vector< IbisComponentPin > m_pins
std::vector< IbisComponentSeriesPinMapping > m_seriesPinMappings
IbisDiffPinEntry(REPORTER *aReporter)
std::string pinB
virtual ~IbisDiffPinEntry()
TypMinMaxValue tdelay
std::string pinA
IbisDiffPin(REPORTER *aReporter)
std::vector< IbisDiffPinEntry > m_entries
virtual ~IbisFile()
std::vector< IbisComponent > m_components
IbisHeader m_header
std::map< std::string, IbisSubmodel > m_submodels
std::vector< IbisPackageModel > m_packageModels
std::vector< IbisModel > m_models
IbisFile(REPORTER *aReporter)
std::vector< IbisModelSelector > m_modelSelectors
bool Check() override
Check if the data held by the object is valid.
std::string m_fileName
std::string m_copyright
std::string m_notes
double m_ibisVersion
IbisHeader(REPORTER *aReporter)
std::string m_date
std::string m_source
double m_fileRevision
std::string m_disclaimer
std::string m_modelDescription
virtual ~IbisModelSelector()
bool Check() override
Check if the data held by the object is valid.
std::string m_name
std::vector< IbisModelSelectorEntry > m_models
IbisModelSelector(REPORTER *aReporter)
TypMinMaxValue m_C_comp_pullup
TypMinMaxValue m_C_comp_power_clamp
IBIS_MODEL_TYPE m_type
double m_cref
IVtable m_pullup
TypMinMaxValue m_Cac
IbisSeriesData m_seriesOff
IVtable m_ISSO_PU
TypMinMaxValue m_pullupReference
TypMinMaxValue m_C_comp_pulldown
TypMinMaxValue m_C_comp_gnd_clamp
double m_vmeas
IVtable m_pulldown
bool Check() override
Check if the data held by the object is valid.
TypMinMaxValue m_Rac
std::vector< IbisSubmodelMode > m_submodels
std::vector< IbisWaveform * > m_risingWaveforms
IVtable m_POWERClamp
TypMinMaxValue m_Rgnd
virtual ~IbisModel()=default
TypMinMaxValue m_POWERClampReference
IbisModel(REPORTER *aReporter)
IbisSeriesData m_series
IVtable m_GNDClamp
IbisRamp m_ramp
IbisSeriesData m_seriesOn
IVtable m_ISSO_PD
IVtable m_compositeCurrent
IBIS_MODEL_POLARITY m_polarity
TypMinMaxValue m_C_comp
double m_rref
IBIS_MODEL_ENABLE m_enable
TypMinMaxValue m_temperatureRange
std::vector< IbisWaveform * > m_fallingWaveforms
TypMinMaxValue m_pulldownReference
double m_vref
TypMinMaxValue m_GNDClampReference
double m_vinh
double m_vinl
TypMinMaxValue m_voltageRange
TypMinMaxValue m_Rpower
std::string m_name
IbisMosfetEntry(REPORTER *aReporter)
std::map< std::string, int > m_pins
std::shared_ptr< IBIS_MATRIX > m_resistanceMatrix
IbisPackageModel(REPORTER *aReporter)
std::string m_OEM
std::shared_ptr< IBIS_MATRIX > m_inductanceMatrix
virtual ~IbisPackageModel()
bool Check() override
Check if the data held by the object is valid.
std::string m_description
std::string m_name
std::shared_ptr< IBIS_MATRIX > m_capacitanceMatrix
std::string m_manufacturer
bool parseSubmodel(std::string &aKeyword)
Parse a single keyword in the submodel context.
std::vector< char > m_buffer
char m_commentChar
long m_lineCounter
bool readAlgorithmicModel()
bool readMatrixBandedOrFull()
IBIS_PARSER_CONTINUE m_continue
bool readSubmodelSpec()
bool readModelSpec()
bool changeCommentChar()
Ibis can change the character used for comments.
bool getNextLine()
Load the next line.
bool parseComponent(std::string &aKeyword)
Parse a single keyword in the component context.
bool parseModel(std::string &aKeyword)
Parse a single keyword in the model context.
VTtable * m_currentVTtable
bool readMatrixBandwidth()
bool readMatrixRow()
bool parsePackageModelModelData(std::string &aKeyword)
Parse a single keyword in the package model model data context.
bool isLineEmptyFromCursor()
void printLine()
Print the current line.
bool readModelSelector()
bool changeContext(std::string &aKeyword)
std::string getKeyword()
int m_currentMatrixCol
bool parseDouble(double &aDest, std::string &aStr, bool aAllowModifiers=false)
Parse a double according to the ibis standard.
bool onNewLine()
Parse the current line.
bool readWord(std::string &aDest)
bool readTypMinMaxValue(TypMinMaxValue &aDest)
bool compareIbisWord(const std::string &a, const std::string &b)
compare two strings without being case sensitive
bool readDvdt(dvdt &aDest)
int m_currentMatrixRow
IbisComponent * m_currentComponent
std::shared_ptr< IBIS_MATRIX > m_currentMatrix
IbisSubmodel * m_currentSubmodel
bool readMatrixSparse()
bool ParseFile(const std::string &aFileName)
Parse a file.
bool readMatrixType(std::shared_ptr< IBIS_MATRIX > &aDest)
std::string * m_continuingString
IbisModel * m_currentModel
IbisParser(REPORTER *aReporter)
bool readSeriesPinMapping()
bool parseDvdt(dvdt &aDest, std::string &aStr)
Parse a dV/dt value according to the ibis standard.
IbisPackageModel * m_currentPackageModel
IbisSeriesData * currentSeriesData()
Active series data: [On]/[Off] sub-block when set, else m_series.
bool readDouble(double &aDest)
bool readSubmodel()
IbisModelSelector * m_currentModelSelector
bool checkEndofLine()
bool parsePackageModel(std::string &aKeyword)
Parse a single keyword in the package model context.
bool readSeriesMosfet()
Read one [Series MOSFET] line (Vds subparam or IV row).
bool readString(std::string &aDest)
bool readPinMapping()
bool readTypMinMaxValueSubparam(const std::string &aSubparam, TypMinMaxValue &aDest)
bool parseAlgorithmicModel(std::string &aKeyword)
Parse a single keyword in the algorithmic model context.
bool readNumericSubparam(const std::string &aSubparam, double &aDest)
bool readMatrixPinIndex(int &aDest)
bool readInt(int &aDest)
bool readPackage()
int m_bufferIndex
IBIS_PARSER_CONTEXT m_context
IbisFile m_ibisFile
IVtable * m_currentIVtable
bool readIVtableEntry(IVtable &aTable)
IbisSeriesData * m_currentSeriesData
bool readVTtableEntry(VTtable &aTable)
bool parseModelSelector(std::string &aKeyword)
Parse a single keyword in the model selector context.
bool readDiffPin()
bool readReceiverThresholds()
bool readAddSubmodel()
void skipWhitespaces()
bool storeString(std::string &aDest, bool aMultiline)
bool readPackageModelPins()
IbisMosfetEntry * m_currentMosfetEntry
bool readRampdvdt(dvdtTypMinMax &aDest)
bool readTableLine(std::vector< std::string > &aDest)
bool readMatrixData()
bool parseHeader(std::string &aKeyword)
Parse a single keyword in the header context.
bool readWaveform(IbisWaveform *aDest, IBIS_WAVEFORM_TYPE aType)
IbisWaveform * m_currentWaveform
dvdtTypMinMax m_rising
IbisRamp(REPORTER *aReporter)
bool Check() override
Check if the data held by the object is valid.
double m_Rload
dvdtTypMinMax m_falling
TypMinMaxValue m_Lseries
IbisSeriesData(REPORTER *aReporter)
TypMinMaxValue m_RlSeries
TypMinMaxValue m_LcSeries
TypMinMaxValue m_Cseries
std::vector< IbisMosfetEntry > m_seriesMosfet
bool isPopulated() const
TypMinMaxValue m_RcSeries
TypMinMaxValue m_Rseries
IVtable m_seriesCurrent
IBIS_SUBMODEL_MODE m_mode
IbisSubmodelMode(std::string name, IBIS_SUBMODEL_MODE mode)
std::string m_name
IVtable m_POWERPulse
IVtable m_pulldown
std::vector< IbisWaveform * > m_fallingWaveforms
TypMinMaxValue m_VtriggerR
IVtable m_POWERClamp
std::vector< IbisWaveform * > m_risingWaveforms
bool Check() override
Check if the data held by the object is valid.
IbisSubmodel(REPORTER *aReporter)
IBIS_SUBMODEL_TYPE m_type
IVtable m_GNDClamp
IVtable m_GNDPulse
std::string m_name
IVtable m_pullup
TypMinMaxValue m_offDelay
IbisRamp m_ramp
virtual ~IbisSubmodel()=default
TypMinMaxValue m_VtriggerF
double m_L_fixture
double m_V_fixture
VTtable m_table
double m_V_fixture_min
IBIS_WAVEFORM_TYPE m_type
double m_V_fixture_max
double m_R_fixture
IbisWaveform(REPORTER *aReporter)
double m_C_fixture
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:75
TypMinMaxValue(REPORTER *aReporter)
bool Check() override
Check if the data held by the object is valid.
double value[3]
bool isNA() const
void Add(const TypMinMaxValue &aValue)
virtual ~VTtableEntry()
TypMinMaxValue V
VTtableEntry(REPORTER *aReporter)
VTtable(REPORTER *aReporter)
std::vector< VTtableEntry > m_entries
bool Check() override
Check if the data held by the object is valid.
dvdtTypMinMax(REPORTER *aReporter)
double m_dv
double m_dt
@ NONE
Definition eda_shape.h:76
IBIS_SUBMODEL_TYPE
IBIS_MODEL_TYPE
IBIS_MODEL_POLARITY
#define NAN_NA
Definition ibis_parser.h:36
IBIS_PARSER_CONTEXT
IBIS_MATRIX_TYPE
IBIS_CORNER
@ TYP
@ MIN
@ MAX
IBIS_PARSER_CONTINUE
IBIS_SUBMODEL_MODE
IBIS_WAVEFORM_TYPE
IBIS_MODEL_ENABLE
SEVERITY
@ RPT_SEVERITY_INFO