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 <math.h>
49#include <cstring>
50
51
53{
54public:
55 IBIS_BASE( REPORTER* aReporter )
56 {
57 m_Reporter = aReporter;
58 };
59
67 void Report( const std::string& aMsg, SEVERITY aSeverity = RPT_SEVERITY_INFO ) const
68 {
69 if( m_Reporter )
70 m_Reporter->Report( aMsg, aSeverity );
71 };
72
73public:
75
76protected:
82 static std::string doubleToString( double aNumber );
83};
84
85
86class IBIS_INPUT : public IBIS_BASE
87{
88public:
89 IBIS_INPUT( REPORTER* aReporter ) :
90 IBIS_BASE( aReporter )
91 {};
92
97 bool virtual Check() { return false; };
98};
99
100
102{
103 TYP = 0,
105 MAX
107
108
110{
111 // All matrices are supposed to be symmetrical, only upper right triangle is given
112 UNDEFINED,
113 BANDED, // Give the main diagonal + [bandwidth] elements on the right
114 SPARSE, // Only give non-zero values.
115 FULL, // Give the whole upper triangle.
116};
117
118
120{
121public:
122 IBIS_MATRIX( REPORTER* aReporter ) :
123 IBIS_INPUT( aReporter )
124 {};
125
126 virtual ~IBIS_MATRIX(){};
127
128 IBIS_MATRIX_TYPE m_type = IBIS_MATRIX_TYPE::UNDEFINED;
129 int m_dim = -5;
130 std::vector<double> m_data;
131};
132
133
135{
136public:
138 IBIS_MATRIX( aReporter )
139 {};
140
141 IBIS_MATRIX_TYPE m_type = IBIS_MATRIX_TYPE::BANDED;
142 int m_dim = -2;
143 int m_bandwidth = 0;
144 std::vector<double> m_data;
145
146 bool Check() override;
147};
148
149
151{
152public:
154 IBIS_MATRIX( aReporter )
155 {};
156
157 IBIS_MATRIX_TYPE m_type = IBIS_MATRIX_TYPE::BANDED;
158 int m_dim = -3;
159 std::vector<double> m_data;
160
161 bool Check() override;
162};
163
164
166{
167public:
169 IBIS_MATRIX( aReporter )
170 {};
171
172 IBIS_MATRIX_TYPE m_type = IBIS_MATRIX_TYPE::FULL;
173 int m_dim = -4;
174 std::vector<double> m_data;
175
176 bool Check() override;
177};
178
179
181{
182public:
183 IBIS_SECTION( REPORTER* aReporter ) :
184 IBIS_INPUT( aReporter )
185 {};
186};
187
188
190{
191public:
192 IbisHeader( REPORTER* aReporter ) :
193 IBIS_SECTION( aReporter )
194 {};
195
196 double m_ibisVersion = -1;
197 double m_fileRevision = -1;
198 std::string m_fileName;
199 std::string m_source;
200 std::string m_date;
201 std::string m_notes;
202 std::string m_disclaimer;
203 std::string m_copyright;
204
205 bool Check() override;
206};
207
208
210{
211public:
212 TypMinMaxValue( REPORTER* aReporter ) :
213 IBIS_INPUT( aReporter )
214 {};
215
216 double value[3] = { -1, -1, -1 };
217
218 bool Check() override;
219};
220
221
223{
224public:
226 IBIS_INPUT( aReporter ),
227 m_Rpkg( aReporter ),
228 m_Lpkg( aReporter ),
229 m_Cpkg( aReporter )
230 {};
231
235
236 bool Check() override;
237};
238
239
241{
242public:
244 IBIS_INPUT( aReporter )
245 {};
246
248 {};
249
250 std::string m_pinName;
251 std::string m_signalName;
252 std::string m_modelName;
253 double m_Rpin = nan( NAN_NA );
254 double m_Lpin = nan( NAN_NA );
255 double m_Cpin = nan( NAN_NA );
256
257 int m_Rcol = 0;
258 int m_Lcol = 0;
259 int m_Ccol = 0;
260
261 bool Check() override;
262
263 bool m_dummy = false;
264};
265
266
268{
269public:
271 IBIS_INPUT( aReporter )
272 {};
273
275 {};
276
277 std::string m_pinName;
278 std::string m_PDref;
279 std::string m_PUref;
280 std::string m_GNDClampRef;
281 std::string m_POWERClampRef;
282 std::string m_extRef;
283};
284
285
287{
288public:
290 IBIS_INPUT( aReporter ),
291 tdelay( aReporter )
292 {};
293
295 {};
296
297 std::string pinA;
298 std::string pinB;
299 double Vdiff = 0.2; // ignored for input
300 TypMinMaxValue tdelay = 0; // ignored for outputs
301};
302
303
305{
306public:
307 IbisDiffPin( REPORTER* aReporter ) :
308 IBIS_INPUT( aReporter )
309 {};
310
311 std::vector<IbisDiffPinEntry> m_entries;
312};
313
315{
316public:
317 IbisComponent( REPORTER* aReporter ) :
318 IBIS_INPUT( aReporter ),
319 m_package( aReporter ),
320 m_diffPin( aReporter )
321 {};
322
324 {};
325
326 std::string m_name = "";
327 std::string m_manufacturer = "";
329 std::vector<IbisComponentPin> m_pins;
330 std::vector<IbisComponentPinMapping> m_pinMappings;
331 std::string m_packageModel;
332 std::string m_busLabel;
333 std::string m_dieSupplyPads;
335
336 bool Check() override;
337};
338
339
341{
342public:
343 std::string m_modelName;
345};
346
347
349{
350public:
352 IBIS_INPUT( aReporter )
353 {};
354
356 {};
357
358 std::string m_name;
359 std::vector<IbisModelSelectorEntry> m_models;
360
361 bool Check() override;
362};
363
364
366{
367public:
368 IVtableEntry( REPORTER* aReporter ) :
369 IBIS_INPUT( aReporter ),
370 I( aReporter )
371 {};
372
374 {};
375
376 double V = 0;
378};
379
380
381class IVtable : public IBIS_INPUT
382{
383public:
384 IVtable( REPORTER* aReporter ) :
385 IBIS_INPUT( aReporter )
386 {};
387
388 std::vector<IVtableEntry> m_entries;
389
390 bool Check() override;
391
400 double InterpolatedI( double aV, IBIS_CORNER aCorner ) const;
401
414 std::string Spice( int aN, const std::string& aPort1, const std::string& aPort2,
415 const std::string& aModelName, IBIS_CORNER aCorner ) const;
416
417private:
418};
419
421{
422public:
423 VTtableEntry( REPORTER* aReporter ) :
424 IBIS_INPUT( aReporter ),
425 V( aReporter )
426 {};
427
429 {};
430
431 double t = 0;
433};
434
435
436class VTtable : public IBIS_INPUT
437{
438public:
439 VTtable( REPORTER* aReporter ) :
440 IBIS_INPUT( aReporter )
441 {};
442
443 std::vector<VTtableEntry> m_entries;
444};
445
446/*
447Model_type must be one of the following:
448Input, Output, I/O, 3-state, Open_drain, I/O_open_drain, Open_sink, I/O_open_sink,
449Open_source, I/O_open_source, Input_ECL, Output_ECL, I/O_ECL, 3-state_ECL, Terminator,
450Series, and Series_switch.
451*/
452
454{
455 UNDEFINED,
456 INPUT_STD, // Do not use INPUT: it can conflict with a windows header on MSYS2
457 OUTPUT,
458 IO,
462 OPEN_SINK,
466 INPUT_ECL,
468 IO_ECL,
471 SERIES,
473};
474
476{
477 UNDEFINED,
480};
481
482
483class dvdt
484{
485public:
486 double m_dv = 1;
487 double m_dt = 1;
488};
489
490
492{
493public:
494 dvdtTypMinMax( REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
496
497 bool Check() override;
498};
499
500
501class IbisRamp : public IBIS_INPUT
502{
503public:
504 IbisRamp( REPORTER* aReporter ) :
505 IBIS_INPUT( aReporter ),
506 m_falling( aReporter ),
507 m_rising( aReporter )
508 {};
509
512 double m_Rload = 50; // The R_load subparameter is optional if the default 50 ohm load is used
513
514 bool Check() override;
515};
516
517
519{
520 RISING,
521 FALLING
522};
523
524
526{
527public:
528 IbisWaveform( REPORTER* aReporter ) :
529 IBIS_INPUT( aReporter ),
530 m_table( aReporter )
531 {};
532
534 IBIS_WAVEFORM_TYPE m_type = IBIS_WAVEFORM_TYPE::RISING;
535 double m_R_dut = 0;
536 double m_C_dut = 0;
537 double m_L_dut = 0;
538 double m_R_fixture = 0;
539 double m_C_fixture = 0;
540 double m_L_fixture = 0;
541 double m_V_fixture = 0;
542 double m_V_fixture_min = 0;
543 double m_V_fixture_max = 0;
544};
545
546
548{
549 UNDEFINED,
550 INVERTING,
552};
553
554
556{
557public:
558 IbisModel( REPORTER* aReporter ) :
559 IBIS_INPUT( aReporter ),
560 m_C_comp( aReporter ),
561 m_voltageRange( aReporter ),
562 m_temperatureRange( aReporter ),
563 m_pullupReference( aReporter ),
564 m_pulldownReference( aReporter ),
565 m_GNDClampReference( aReporter ),
566 m_POWERClampReference( aReporter ),
567 m_Rgnd( aReporter ),
568 m_Rpower( aReporter ),
569 m_Rac( aReporter ),
570 m_Cac( aReporter ),
571 m_GNDClamp( aReporter ),
572 m_POWERClamp( aReporter ),
573 m_pullup( aReporter ),
574 m_pulldown( aReporter ),
575 m_ramp( aReporter )
576 {};
577
578 virtual ~IbisModel()
579 {};
580
581 std::string m_name;
582 IBIS_MODEL_TYPE m_type = IBIS_MODEL_TYPE::UNDEFINED;
583 /* The Polarity, Enable, Vinl, Vinh, Vmeas, Cref, Rref, and Vref subparameters are optional. */
584 /* the default values of Vinl = 0.8 V and Vinh = 2.0 V are assumed. */
585 double m_vinl = 0.8;
586 double m_vinh = 2;
587 double m_vref = 0;
588 double m_rref = 0;
589 double m_cref = 0;
590 double m_vmeas = 0;
591 IBIS_MODEL_ENABLE m_enable = IBIS_MODEL_ENABLE::UNDEFINED;
592 IBIS_MODEL_POLARITY m_polarity = IBIS_MODEL_POLARITY::UNDEFINED;
593 // End of optional subparameters
594
610 std::vector<IbisWaveform*> m_risingWaveforms;
611 std::vector<IbisWaveform*> m_fallingWaveforms;
613
614 bool Check() override;
615};
616
617
619{
620public:
622 IBIS_INPUT( aReporter )
623 {};
624
626 {};
627
628 std::string m_name;
629 std::string m_manufacturer;
630 std::string m_OEM;
631 std::string m_description;
633 std::vector<std::string> m_pins;
634
635 std::shared_ptr<IBIS_MATRIX> m_resistanceMatrix;
636 std::shared_ptr<IBIS_MATRIX> m_capacitanceMatrix;
637 std::shared_ptr<IBIS_MATRIX> m_inductanceMatrix;
638
639 bool Check() override;
640};
641
642
643class IbisFile : public IBIS_INPUT
644{
645public:
646 IbisFile( REPORTER* aReporter ) :
647 IBIS_INPUT( aReporter ),
648 m_header( aReporter )
649 {};
650
651 virtual ~IbisFile()
652 {};
653
655 std::vector<IbisComponent> m_components;
656 std::vector<IbisModelSelector> m_modelSelectors;
657 std::vector<IbisModel> m_models;
658 std::vector<IbisPackageModel> m_packageModels;
659};
660
661
663{
664 NONE,
665 STRING,
671 MATRIX,
673 MODEL,
675 IV_TABLE,
676 VT_TABLE,
677 RAMP,
678 WAVEFORM,
680};
681
683{
684 HEADER,
685 COMPONENT,
687 MODEL,
690 END
691};
692
693
694class IbisParser : public IBIS_INPUT
695{
696public:
697 IbisParser( REPORTER* aReporter ) :
698 IBIS_INPUT( aReporter ),
699 m_ibisFile( aReporter )
700 {};
701
702 bool m_parrot = true; // Write back all lines.
703
705 char m_commentChar = '|';
706 std::vector<char> m_buffer;
709 int m_lineIndex = 0;
711
717 std::shared_ptr<IBIS_MATRIX> m_currentMatrix = nullptr;
723
731 bool ParseFile( const std::string& aFileName );
732
733private:
734 std::string* m_continuingString = nullptr;
735
744 bool compareIbisWord( const std::string& a, const std::string& b );
745
751 bool parseHeader( std::string& aKeyword );
752
758 bool parseComponent( std::string& aKeyword );
759
765 bool parseModelSelector( std::string& aKeyword );
766
772 bool parseModel( std::string& aKeyword );
773
779 bool parsePackageModel( std::string& aKeyword );
780
786 bool parsePackageModelModelData( std::string& );
787
795 bool parseDouble( double& aDest, std::string& aStr, bool aAllowModifiers = false );
796
801 bool onNewLine(); // Gets rid of comments ( except on a comment character change command...)
802
807 bool getNextLine();
808
810 void printLine();
811
812 void skipWhitespaces();
813 bool checkEndofLine(); // To be used when there cannot be any character left on the line
815 std::string getKeyword();
816
817 bool readInt( int& aDest );
818 bool readDouble( double& aDest );
819 bool readWord( std::string& aDest );
820 bool readDvdt( std::string& aString, dvdt& aDest );
821 bool readMatrix( std::shared_ptr<IBIS_MATRIX> aDest );
822 bool readMatrixBanded( std::string, IBIS_MATRIX_BANDED& aDest );
823 bool readMatrixFull( std::string, IBIS_MATRIX_FULL& aDest );
824 bool readMatrixSparse( std::string, IBIS_MATRIX_SPARSE& aDest );
825 bool readRampdvdt( dvdtTypMinMax& aDest );
826 bool readRamp();
827 bool readModelSpec();
828 bool readWaveform( IbisWaveform* aDest, IBIS_WAVEFORM_TYPE aType );
829 bool readString( std::string& aDest );
830 bool storeString( std::string& aDest, bool aMultiline );
831 bool readTableLine( std::vector<std::string>& aDest );
832
833 bool readNumericSubparam( const std::string& aSubparam, double& aDest );
834 bool readIVtableEntry( IVtable& aTable );
835 bool readVTtableEntry( VTtable& aTable );
836 bool readTypMinMaxValue( TypMinMaxValue& aDest );
837 bool readTypMinMaxValueSubparam( const std::string& aSubparam, TypMinMaxValue& aDest );
838 //bool ReadDieSupplyPads();
839
840 bool readPackage();
841 bool readPin();
842 bool readPinMapping();
843 bool readDiffPin();
844 bool readModelSelector();
845 bool readModel();
847
849 bool changeCommentChar();
850 bool changeContext( std::string& aKeyword );
851
852 IBIS_PARSER_CONTINUE m_continue = IBIS_PARSER_CONTINUE::NONE;
853 IBIS_PARSER_CONTEXT m_context = IBIS_PARSER_CONTEXT::HEADER;
854};
855
856#endif
void Report(const std::string &aMsg, SEVERITY aSeverity=RPT_SEVERITY_INFO) const
Print a message.
Definition: ibis_parser.h:67
IBIS_BASE(REPORTER *aReporter)
Definition: ibis_parser.h:55
REPORTER * m_Reporter
Definition: ibis_parser.h:74
static std::string doubleToString(double aNumber)
Convert a double to string using scientific notation.
virtual bool Check()
Check if the data held by the object is valid.
Definition: ibis_parser.h:97
IBIS_INPUT(REPORTER *aReporter)
Definition: ibis_parser.h:89
IBIS_MATRIX_BANDED(REPORTER *aReporter)
Definition: ibis_parser.h:137
std::vector< double > m_data
Definition: ibis_parser.h:144
bool Check() override
Check if the data held by the object is valid.
Definition: ibis_parser.cpp:62
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:141
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:172
bool Check() override
Check if the data held by the object is valid.
Definition: ibis_parser.cpp:91
IBIS_MATRIX_FULL(REPORTER *aReporter)
Definition: ibis_parser.h:168
std::vector< double > m_data
Definition: ibis_parser.h:174
IBIS_MATRIX_SPARSE(REPORTER *aReporter)
Definition: ibis_parser.h:153
bool Check() override
Check if the data held by the object is valid.
std::vector< double > m_data
Definition: ibis_parser.h:159
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:157
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:128
std::vector< double > m_data
Definition: ibis_parser.h:130
IBIS_MATRIX(REPORTER *aReporter)
Definition: ibis_parser.h:122
virtual ~IBIS_MATRIX()
Definition: ibis_parser.h:126
IBIS_SECTION(REPORTER *aReporter)
Definition: ibis_parser.h:183
IVtableEntry(REPORTER *aReporter)
Definition: ibis_parser.h:368
TypMinMaxValue I
Definition: ibis_parser.h:377
virtual ~IVtableEntry()
Definition: ibis_parser.h:373
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::vector< IVtableEntry > m_entries
Definition: ibis_parser.h:388
IVtable(REPORTER *aReporter)
Definition: ibis_parser.h:384
std::string Spice(int aN, const std::string &aPort1, const std::string &aPort2, const std::string &aModelName, IBIS_CORNER aCorner) const
Interpolate the IV table.
bool Check() override
Check if the data held by the object is valid.
TypMinMaxValue m_Cpkg
Definition: ibis_parser.h:234
TypMinMaxValue m_Lpkg
Definition: ibis_parser.h:233
IbisComponentPackage(REPORTER *aReporter)
Definition: ibis_parser.h:225
TypMinMaxValue m_Rpkg
Definition: ibis_parser.h:232
std::string m_GNDClampRef
Definition: ibis_parser.h:280
IbisComponentPinMapping(REPORTER *aReporter)
Definition: ibis_parser.h:270
virtual ~IbisComponentPinMapping()
Definition: ibis_parser.h:274
std::string m_POWERClampRef
Definition: ibis_parser.h:281
bool Check() override
Check if the data held by the object is valid.
virtual ~IbisComponentPin()
Definition: ibis_parser.h:247
std::string m_signalName
Definition: ibis_parser.h:251
std::string m_pinName
Definition: ibis_parser.h:250
std::string m_modelName
Definition: ibis_parser.h:252
IbisComponentPin(REPORTER *aReporter)
Definition: ibis_parser.h:243
std::string m_manufacturer
Definition: ibis_parser.h:327
std::string m_packageModel
Definition: ibis_parser.h:331
std::vector< IbisComponentPinMapping > m_pinMappings
Definition: ibis_parser.h:330
IbisComponentPackage m_package
Definition: ibis_parser.h:328
std::string m_busLabel
Definition: ibis_parser.h:332
std::string m_dieSupplyPads
Definition: ibis_parser.h:333
bool Check() override
Check if the data held by the object is valid.
IbisDiffPin m_diffPin
Definition: ibis_parser.h:334
virtual ~IbisComponent()
Definition: ibis_parser.h:323
IbisComponent(REPORTER *aReporter)
Definition: ibis_parser.h:317
std::string m_name
Definition: ibis_parser.h:326
std::vector< IbisComponentPin > m_pins
Definition: ibis_parser.h:329
IbisDiffPinEntry(REPORTER *aReporter)
Definition: ibis_parser.h:289
std::string pinB
Definition: ibis_parser.h:298
virtual ~IbisDiffPinEntry()
Definition: ibis_parser.h:294
TypMinMaxValue tdelay
Definition: ibis_parser.h:300
std::string pinA
Definition: ibis_parser.h:297
IbisDiffPin(REPORTER *aReporter)
Definition: ibis_parser.h:307
std::vector< IbisDiffPinEntry > m_entries
Definition: ibis_parser.h:311
virtual ~IbisFile()
Definition: ibis_parser.h:651
std::vector< IbisComponent > m_components
Definition: ibis_parser.h:655
IbisHeader m_header
Definition: ibis_parser.h:654
std::vector< IbisPackageModel > m_packageModels
Definition: ibis_parser.h:658
std::vector< IbisModel > m_models
Definition: ibis_parser.h:657
IbisFile(REPORTER *aReporter)
Definition: ibis_parser.h:646
std::vector< IbisModelSelector > m_modelSelectors
Definition: ibis_parser.h:656
bool Check() override
Check if the data held by the object is valid.
std::string m_fileName
Definition: ibis_parser.h:198
std::string m_copyright
Definition: ibis_parser.h:203
std::string m_notes
Definition: ibis_parser.h:201
double m_ibisVersion
Definition: ibis_parser.h:196
IbisHeader(REPORTER *aReporter)
Definition: ibis_parser.h:192
std::string m_date
Definition: ibis_parser.h:200
std::string m_source
Definition: ibis_parser.h:199
double m_fileRevision
Definition: ibis_parser.h:197
std::string m_disclaimer
Definition: ibis_parser.h:202
std::string m_modelName
Definition: ibis_parser.h:343
std::string m_modelDescription
Definition: ibis_parser.h:344
virtual ~IbisModelSelector()
Definition: ibis_parser.h:355
bool Check() override
Check if the data held by the object is valid.
std::string m_name
Definition: ibis_parser.h:358
std::vector< IbisModelSelectorEntry > m_models
Definition: ibis_parser.h:359
IbisModelSelector(REPORTER *aReporter)
Definition: ibis_parser.h:351
virtual ~IbisModel()
Definition: ibis_parser.h:578
IBIS_MODEL_TYPE m_type
Definition: ibis_parser.h:582
double m_cref
Definition: ibis_parser.h:589
IVtable m_pullup
Definition: ibis_parser.h:608
TypMinMaxValue m_Cac
Definition: ibis_parser.h:605
TypMinMaxValue m_pullupReference
Definition: ibis_parser.h:598
double m_vmeas
Definition: ibis_parser.h:590
IVtable m_pulldown
Definition: ibis_parser.h:609
bool Check() override
Check if the data held by the object is valid.
TypMinMaxValue m_Rac
Definition: ibis_parser.h:604
std::vector< IbisWaveform * > m_risingWaveforms
Definition: ibis_parser.h:610
IVtable m_POWERClamp
Definition: ibis_parser.h:607
TypMinMaxValue m_Rgnd
Definition: ibis_parser.h:602
TypMinMaxValue m_POWERClampReference
Definition: ibis_parser.h:601
IbisModel(REPORTER *aReporter)
Definition: ibis_parser.h:558
IVtable m_GNDClamp
Definition: ibis_parser.h:606
IbisRamp m_ramp
Definition: ibis_parser.h:612
IBIS_MODEL_POLARITY m_polarity
Definition: ibis_parser.h:592
TypMinMaxValue m_C_comp
Definition: ibis_parser.h:595
double m_rref
Definition: ibis_parser.h:588
IBIS_MODEL_ENABLE m_enable
Definition: ibis_parser.h:591
TypMinMaxValue m_temperatureRange
Definition: ibis_parser.h:597
std::vector< IbisWaveform * > m_fallingWaveforms
Definition: ibis_parser.h:611
TypMinMaxValue m_pulldownReference
Definition: ibis_parser.h:599
double m_vref
Definition: ibis_parser.h:587
TypMinMaxValue m_GNDClampReference
Definition: ibis_parser.h:600
double m_vinh
Definition: ibis_parser.h:586
double m_vinl
Definition: ibis_parser.h:585
TypMinMaxValue m_voltageRange
Definition: ibis_parser.h:596
TypMinMaxValue m_Rpower
Definition: ibis_parser.h:603
std::string m_name
Definition: ibis_parser.h:581
std::vector< std::string > m_pins
Definition: ibis_parser.h:633
std::shared_ptr< IBIS_MATRIX > m_resistanceMatrix
Definition: ibis_parser.h:635
IbisPackageModel(REPORTER *aReporter)
Definition: ibis_parser.h:621
std::string m_OEM
Definition: ibis_parser.h:630
std::shared_ptr< IBIS_MATRIX > m_inductanceMatrix
Definition: ibis_parser.h:637
virtual ~IbisPackageModel()
Definition: ibis_parser.h:625
bool Check() override
Check if the data held by the object is valid.
std::string m_description
Definition: ibis_parser.h:631
std::string m_name
Definition: ibis_parser.h:628
std::shared_ptr< IBIS_MATRIX > m_capacitanceMatrix
Definition: ibis_parser.h:636
std::string m_manufacturer
Definition: ibis_parser.h:629
std::vector< char > m_buffer
Definition: ibis_parser.h:706
char m_commentChar
Definition: ibis_parser.h:705
long m_lineCounter
Definition: ibis_parser.h:704
IBIS_PARSER_CONTINUE m_continue
Definition: ibis_parser.h:852
bool readPin()
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 selector context.
bool readMatrixFull(std::string, IBIS_MATRIX_FULL &aDest)
VTtable * m_currentVTtable
Definition: ibis_parser.h:721
bool isLineEmptyFromCursor()
void printLine()
Print the current line.
bool readModelSelector()
bool changeContext(std::string &aKeyword)
int m_currentMatrixRowIndex
Definition: ibis_parser.h:719
std::string getKeyword()
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
Definition: ibis_parser.cpp:51
int m_currentMatrixRow
Definition: ibis_parser.h:718
IbisComponent * m_currentComponent
Definition: ibis_parser.h:713
std::shared_ptr< IBIS_MATRIX > m_currentMatrix
Definition: ibis_parser.h:717
int m_lineLength
Definition: ibis_parser.h:710
int m_lineIndex
Definition: ibis_parser.h:709
bool readDvdt(std::string &aString, dvdt &aDest)
bool ParseFile(const std::string &aFileName)
Parse a file.
std::string * m_continuingString
Definition: ibis_parser.h:734
IbisModel * m_currentModel
Definition: ibis_parser.h:715
bool m_parrot
Definition: ibis_parser.h:702
bool readModel()
int m_lineOffset
Definition: ibis_parser.h:708
IbisParser(REPORTER *aReporter)
Definition: ibis_parser.h:697
bool parsePackageModelModelData(std::string &)
Parse a single keyword in the package model context.
IbisPackageModel * m_currentPackageModel
Definition: ibis_parser.h:716
bool readDouble(double &aDest)
IbisModelSelector * m_currentModelSelector
Definition: ibis_parser.h:714
bool readRamp()
bool checkEndofLine()
bool parsePackageModel(std::string &aKeyword)
Parse a single keyword in the model context.
bool readString(std::string &aDest)
bool readPinMapping()
bool readTypMinMaxValueSubparam(const std::string &aSubparam, TypMinMaxValue &aDest)
bool readMatrixBanded(std::string, IBIS_MATRIX_BANDED &aDest)
bool readNumericSubparam(const std::string &aSubparam, double &aDest)
bool readMatrix(std::shared_ptr< IBIS_MATRIX > aDest)
bool readInt(int &aDest)
bool readPackage()
int m_bufferIndex
Definition: ibis_parser.h:707
IBIS_PARSER_CONTEXT m_context
Definition: ibis_parser.h:853
IbisFile m_ibisFile
Definition: ibis_parser.h:712
IVtable * m_currentIVtable
Definition: ibis_parser.h:720
bool readIVtableEntry(IVtable &aTable)
bool readVTtableEntry(VTtable &aTable)
bool parseModelSelector(std::string &aKeyword)
Parse a single keyword in the component context.
bool readDiffPin()
void skipWhitespaces()
bool storeString(std::string &aDest, bool aMultiline)
bool readPackageModelPins()
bool readRampdvdt(dvdtTypMinMax &aDest)
bool readTableLine(std::vector< std::string > &aDest)
bool readMatrixSparse(std::string, IBIS_MATRIX_SPARSE &aDest)
bool parseHeader(std::string &aKeyword)
Parse a single keyword in the header context.
bool readWaveform(IbisWaveform *aDest, IBIS_WAVEFORM_TYPE aType)
IbisWaveform * m_currentWaveform
Definition: ibis_parser.h:722
dvdtTypMinMax m_rising
Definition: ibis_parser.h:511
IbisRamp(REPORTER *aReporter)
Definition: ibis_parser.h:504
bool Check() override
Check if the data held by the object is valid.
double m_Rload
Definition: ibis_parser.h:512
dvdtTypMinMax m_falling
Definition: ibis_parser.h:510
double m_L_fixture
Definition: ibis_parser.h:540
double m_C_dut
Definition: ibis_parser.h:536
double m_V_fixture
Definition: ibis_parser.h:541
VTtable m_table
Definition: ibis_parser.h:533
double m_V_fixture_min
Definition: ibis_parser.h:542
double m_L_dut
Definition: ibis_parser.h:537
IBIS_WAVEFORM_TYPE m_type
Definition: ibis_parser.h:534
double m_V_fixture_max
Definition: ibis_parser.h:543
double m_R_fixture
Definition: ibis_parser.h:538
IbisWaveform(REPORTER *aReporter)
Definition: ibis_parser.h:528
double m_R_dut
Definition: ibis_parser.h:535
double m_C_fixture
Definition: ibis_parser.h:539
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:72
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
TypMinMaxValue(REPORTER *aReporter)
Definition: ibis_parser.h:212
bool Check() override
Check if the data held by the object is valid.
double value[3]
Definition: ibis_parser.h:216
virtual ~VTtableEntry()
Definition: ibis_parser.h:428
TypMinMaxValue V
Definition: ibis_parser.h:432
VTtableEntry(REPORTER *aReporter)
Definition: ibis_parser.h:423
VTtable(REPORTER *aReporter)
Definition: ibis_parser.h:439
std::vector< VTtableEntry > m_entries
Definition: ibis_parser.h:443
dvdt value[3]
Definition: ibis_parser.h:495
bool Check() override
Check if the data held by the object is valid.
dvdtTypMinMax(REPORTER *aReporter)
Definition: ibis_parser.h:494
double m_dv
Definition: ibis_parser.h:486
double m_dt
Definition: ibis_parser.h:487
IBIS_MODEL_TYPE
Definition: ibis_parser.h:454
IBIS_MODEL_POLARITY
Definition: ibis_parser.h:548
#define NAN_NA
Definition: ibis_parser.h:36
IBIS_PARSER_CONTEXT
Definition: ibis_parser.h:683
IBIS_MATRIX_TYPE
Definition: ibis_parser.h:110
IBIS_CORNER
Definition: ibis_parser.h:102
@ TYP
Definition: ibis_parser.h:103
@ MIN
Definition: ibis_parser.h:104
@ MAX
Definition: ibis_parser.h:105
IBIS_PARSER_CONTINUE
Definition: ibis_parser.h:663
IBIS_WAVEFORM_TYPE
Definition: ibis_parser.h:519
IBIS_MODEL_ENABLE
Definition: ibis_parser.h:476
SEVERITY
@ RPT_SEVERITY_INFO