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 *
6 * Redistribution and use in source and binary forms, with or without modification,
7 * are permitted provided that the following conditions are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright notice,
10 * this list of conditions and the following disclaimer.
11 *
12 * 2. Redistributions in binary form must reproduce the above copyright notice,
13 * this list of conditions and the following disclaimer in the documentation
14 * and/or other materials provided with the distribution.
15 *
16 * 3. Neither the name of the copyright holder nor the names of its contributors may be used
17 * to endorse or promote products derived from this software without specific
18 * prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
21 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
31
32#ifndef IBIS_PARSER_H
33#define IBIS_PARSER_H
34
35#define NAN_NA "1"
36#define NAN_INVALID "0"
37
38#define IBIS_MAX_VERSION 7.0 // Up to v7.0, IBIS is fully backward compatible
39#define IBIS_MAX_LINE_LENGTH 2048 // official limit is 1024
40
41#include <wx/string.h>
42#include <reporter.h>
44//#include "common.h"
45#include <iostream>
46#include <fstream>
47#include <vector>
48#include <math.h>
49#include <cstring>
50
51
53{
54public:
55 IBIS_ANY( REPORTER* aReporter ) { m_reporter = aReporter; };
57
65 void Report( std::string aMsg, SEVERITY aSeverity = RPT_SEVERITY_INFO ) const
66 {
67 if( m_reporter )
68 m_reporter->Report( aMsg, aSeverity );
69 };
70
71protected:
77 static std::string doubleToString( double aNumber );
78};
79
80
81class IBIS_INPUT : public IBIS_ANY
82{
83public:
84 IBIS_INPUT( REPORTER* aReporter ) : IBIS_ANY( aReporter ){};
89 bool virtual Check() { return false; };
90};
91
92
94{
95 TYP = 0,
97 MAX
98};
99
100
102{
103 // All matrices are supposed to be symmetrical, only upper right triangle is given
104 UNDEFINED,
105 BANDED, // Give the main diagonal + [bandwidth] elements on the right
106 SPARSE, // Only give non-zero values.
107 FULL, // Give the whole upper triangle.
108};
109
111{
112public:
113 IBIS_MATRIX( REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
114 virtual ~IBIS_MATRIX(){};
115
116 IBIS_MATRIX_TYPE m_type = IBIS_MATRIX_TYPE::UNDEFINED;
117 int m_dim = -5;
118 std::vector<double> m_data;
119};
120
122{
123public:
124 IBIS_MATRIX_BANDED( REPORTER* aReporter ) : IBIS_MATRIX( aReporter ){};
125 IBIS_MATRIX_TYPE m_type = IBIS_MATRIX_TYPE::BANDED;
126 int m_dim = -2;
127 int m_bandwidth = 0;
128 std::vector<double> m_data;
129
130 bool Check() override;
131};
132
134{
135public:
136 IBIS_MATRIX_SPARSE( REPORTER* aReporter ) : IBIS_MATRIX( aReporter ){};
137 IBIS_MATRIX_TYPE m_type = IBIS_MATRIX_TYPE::BANDED;
138 int m_dim = -3;
139 std::vector<double> m_data;
140
141 bool Check() override;
142};
143
144
146{
147public:
148 IBIS_MATRIX_FULL( REPORTER* aReporter ) : IBIS_MATRIX( aReporter ){};
149 IBIS_MATRIX_TYPE m_type = IBIS_MATRIX_TYPE::FULL;
150 int m_dim = -4;
151 std::vector<double> m_data;
152
153 bool Check() override;
154};
155
156
158{
159public:
160 IBIS_SECTION( REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
161};
162
163
165{
166public:
167 IbisHeader( REPORTER* aReporter ) : IBIS_SECTION( aReporter ){};
168 double m_ibisVersion = -1;
169 double m_fileRevision = -1;
170 std::string m_fileName;
171 std::string m_source;
172 std::string m_date;
173 std::string m_notes;
174 std::string m_disclaimer;
175 std::string m_copyright;
176
177 bool Check() override;
178};
179
180
182{
183public:
184 TypMinMaxValue( REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
185 double value[3] = { -1, -1, -1 };
186
187 bool Check() override;
188};
189
190
192{
193public:
195 IBIS_INPUT( aReporter ),
196 m_Rpkg( aReporter ),
197 m_Lpkg( aReporter ),
198 m_Cpkg( aReporter )
199 {};
200
204
205 bool Check() override;
206};
207
208
210{
211public:
213 IBIS_INPUT( aReporter )
214 {};
215
217 {};
218
219 std::string m_pinName;
220 std::string m_signalName;
221 std::string m_modelName;
222 double m_Rpin = nan( NAN_NA );
223 double m_Lpin = nan( NAN_NA );
224 double m_Cpin = nan( NAN_NA );
225
226 int m_Rcol = 0;
227 int m_Lcol = 0;
228 int m_Ccol = 0;
229
230 bool Check() override;
231
232 bool m_dummy = false;
233};
234
235
237{
238public:
240 IBIS_INPUT( aReporter )
241 {};
242
244 {};
245
246 std::string m_pinName;
247 std::string m_PDref;
248 std::string m_PUref;
249 std::string m_GNDClampRef;
250 std::string m_POWERClampRef;
251 std::string m_extRef;
252
253 bool m_virtual = false;
254};
255
256
258{
259public:
261 IBIS_INPUT( aReporter ),
262 tdelay( aReporter )
263 {};
264
266 {};
267
268 std::string pinA;
269 std::string pinB;
270 double Vdiff = 0.2; // ignored for input
271 TypMinMaxValue tdelay = 0; // ignored for outputs
272};
273
274
276{
277public:
278 IbisDiffPin( REPORTER* aReporter ) :
279 IBIS_INPUT( aReporter )
280 {};
281
282 std::vector<IbisDiffPinEntry> m_entries;
283};
284
286{
287public:
288 IbisComponent( REPORTER* aReporter ) :
289 IBIS_INPUT( aReporter ),
290 m_package( aReporter ),
291 m_diffPin( aReporter )
292 {};
293
295 {};
296
297 std::string m_name = "";
298 std::string m_manufacturer = "";
300 std::vector<IbisComponentPin> m_pins;
301 std::vector<IbisComponentPinMapping> m_pinMappings;
302 std::string m_packageModel;
303 std::string m_busLabel;
304 std::string m_dieSupplyPads;
306
307 bool Check() override;
308};
309
310
312{
313public:
314 std::string m_modelName;
316};
317
318
320{
321public:
323 IBIS_INPUT( aReporter )
324 {};
325
327 {};
328
329 std::string m_name;
330 std::vector<IbisModelSelectorEntry> m_models;
331
332 bool Check() override;
333};
334
335
337{
338public:
339 IVtableEntry( REPORTER* aReporter ) :
340 IBIS_INPUT( aReporter ),
341 I( aReporter )
342 {};
343
345 {};
346
347 double V = 0;
349};
350
351
352class IVtable : public IBIS_INPUT
353{
354public:
355 IVtable( REPORTER* aReporter ) :
356 IBIS_INPUT( aReporter )
357 {};
358
359 std::vector<IVtableEntry> m_entries;
360
361 bool Check() override;
362
371 double InterpolatedI( double aV, IBIS_CORNER aCorner ) const;
372
385 std::string Spice( int aN, const std::string& aPort1, const std::string& aPort2,
386 const std::string& aModelName, IBIS_CORNER aCorner ) const;
387
388private:
389};
390
392{
393public:
394 VTtableEntry( REPORTER* aReporter ) :
395 IBIS_INPUT( aReporter ),
396 V( aReporter )
397 {};
398
400 {};
401
402 double t = 0;
404};
405
406class VTtable : public IBIS_INPUT
407{
408public:
409 VTtable( REPORTER* aReporter ) :
410 IBIS_INPUT( aReporter )
411 {};
412
413 std::vector<VTtableEntry> m_entries;
414};
415
416/*
417Model_type must be one of the following:
418Input, Output, I/O, 3-state, Open_drain, I/O_open_drain, Open_sink, I/O_open_sink,
419Open_source, I/O_open_source, Input_ECL, Output_ECL, I/O_ECL, 3-state_ECL, Terminator,
420Series, and Series_switch.
421*/
422
424{
425 UNDEFINED,
426 INPUT_STD, // Do not use INPUT: it can conflict with a windows header on MSYS2
427 OUTPUT,
428 IO,
432 OPEN_SINK,
436 INPUT_ECL,
438 IO_ECL,
441 SERIES,
443};
444
446{
447 UNDEFINED,
450};
451
452class dvdt
453{
454public:
455 double m_dv = 1;
456 double m_dt = 1;
457};
458
460{
461public:
462 dvdtTypMinMax( REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
464
465 bool Check() override;
466};
467
468
469class IbisRamp : public IBIS_INPUT
470{
471public:
472 IbisRamp( REPORTER* aReporter ) :
473 IBIS_INPUT( aReporter ),
474 m_falling( aReporter ),
475 m_rising( aReporter )
476 {};
477
480 double m_Rload = 50; // The R_load subparameter is optional if the default 50 ohm load is used
481
482 bool Check() override;
483};
484
486{
487 RISING,
488 FALLING
489};
490
492{
493public:
494 IbisWaveform( REPORTER* aReporter ) : IBIS_INPUT( aReporter ), m_table( aReporter ){};
495
497 IBIS_WAVEFORM_TYPE m_type = IBIS_WAVEFORM_TYPE::RISING;
498 double m_R_dut = 0;
499 double m_C_dut = 0;
500 double m_L_dut = 0;
501 double m_R_fixture = 0;
502 double m_C_fixture = 0;
503 double m_L_fixture = 0;
504 double m_V_fixture = 0;
505 double m_V_fixture_min = 0;
506 double m_V_fixture_max = 0;
507};
508
510{
511 UNDEFINED,
512 INVERTING,
514};
515
517{
518public:
519 IbisModel( REPORTER* aReporter ) :
520 IBIS_INPUT( aReporter ),
521 m_C_comp( aReporter ),
522 m_voltageRange( aReporter ),
523 m_temperatureRange( aReporter ),
524 m_pullupReference( aReporter ),
525 m_pulldownReference( aReporter ),
526 m_GNDClampReference( aReporter ),
527 m_POWERClampReference( aReporter ),
528 m_Rgnd( aReporter ),
529 m_Rpower( aReporter ),
530 m_Rac( aReporter ),
531 m_Cac( aReporter ),
532 m_GNDClamp( aReporter ),
533 m_POWERClamp( aReporter ),
534 m_pullup( aReporter ),
535 m_pulldown( aReporter ),
536 m_ramp( aReporter )
537 {};
538
539 virtual ~IbisModel()
540 {};
541
542 std::string m_name;
543 IBIS_MODEL_TYPE m_type = IBIS_MODEL_TYPE::UNDEFINED;
544 /* The Polarity, Enable, Vinl, Vinh, Vmeas, Cref, Rref, and Vref subparameters are optional. */
545 /* the default values of Vinl = 0.8 V and Vinh = 2.0 V are assumed. */
546 double m_vinl = 0.8;
547 double m_vinh = 2;
548 double m_vref = 0;
549 double m_rref = 0;
550 double m_cref = 0;
551 double m_vmeas = 0;
552 IBIS_MODEL_ENABLE m_enable = IBIS_MODEL_ENABLE::UNDEFINED;
553 IBIS_MODEL_POLARITY m_polarity = IBIS_MODEL_POLARITY::UNDEFINED;
554 // End of optional subparameters
555
571 std::vector<IbisWaveform*> m_risingWaveforms;
572 std::vector<IbisWaveform*> m_fallingWaveforms;
574
575 bool Check() override;
576};
577
578
580{
581public:
583 IBIS_INPUT( aReporter )
584 {};
585
587 {};
588
589 std::string m_name;
590 std::string m_manufacturer;
591 std::string m_OEM;
592 std::string m_description;
594 std::vector<std::string> m_pins;
595
596 std::shared_ptr<IBIS_MATRIX> m_resistanceMatrix;
597 std::shared_ptr<IBIS_MATRIX> m_capacitanceMatrix;
598 std::shared_ptr<IBIS_MATRIX> m_inductanceMatrix;
599
600 bool Check() override;
601};
602
603class IbisFile : public IBIS_INPUT
604{
605public:
606 IbisFile( REPORTER* aReporter ) :
607 IBIS_INPUT( aReporter ),
608 m_header( aReporter )
609 {};
610
611 virtual ~IbisFile()
612 {};
613
615 std::vector<IbisComponent> m_components;
616 std::vector<IbisModelSelector> m_modelSelectors;
617 std::vector<IbisModel> m_models;
618 std::vector<IbisPackageModel> m_packageModels;
619};
620
621
623{
624 NONE,
625 STRING,
631 MATRIX,
633 MODEL,
635 IV_TABLE,
636 VT_TABLE,
637 RAMP,
638 WAVEFORM,
640};
641
643{
644 HEADER,
645 COMPONENT,
647 MODEL,
650 END
651};
652
653class IbisParser : public IBIS_INPUT
654{
655public:
656 IbisParser( REPORTER* aReporter ) : IBIS_INPUT( aReporter ), m_ibisFile( aReporter ){};
657
658 bool m_parrot = true; // Write back all lines.
659
661 char m_commentChar = '|';
662 std::vector<char> m_buffer;
665 int m_lineIndex = 0;
667
673 std::shared_ptr<IBIS_MATRIX> m_currentMatrix = nullptr;
679
687 bool ParseFile( const std::string& aFileName );
688
689private:
690 std::string* m_continuingString = nullptr;
691
700 bool compareIbisWord( const std::string& a, const std::string& b );
701
707 bool parseHeader( std::string& aKeyword );
713 bool parseComponent( std::string& aKeyword );
719 bool parseModelSelector( std::string& aKeyword );
725 bool parseModel( std::string& aKeyword );
731 bool parsePackageModel( std::string& aKeyword );
737 bool parsePackageModelModelData( std::string& );
745 bool parseDouble( double& aDest, std::string& aStr, bool aAllowModifiers = false );
746
751 bool onNewLine(); // Gets rid of comments ( except on a comment character change command...)
756 bool getNextLine();
758 void printLine();
759
760 void skipWhitespaces();
761 bool checkEndofLine(); // To be used when there cannot be any character left on the line
763 std::string getKeyword();
764
765 bool readInt( int& aDest );
766 bool readDouble( double& aDest );
767 bool readWord( std::string& aDest );
768 bool readDvdt( std::string& aString, dvdt& aDest );
769 bool readMatrix( std::shared_ptr<IBIS_MATRIX> aDest );
770 bool readMatrixBanded( std::string, IBIS_MATRIX_BANDED& aDest );
771 bool readMatrixFull( std::string, IBIS_MATRIX_FULL& aDest );
772 bool readMatrixSparse( std::string, IBIS_MATRIX_SPARSE& aDest );
773 bool readRampdvdt( dvdtTypMinMax& aDest );
774 bool readRamp();
775 bool readModelSpec();
776 bool readWaveform( IbisWaveform* aDest, IBIS_WAVEFORM_TYPE aType );
777 bool readString( std::string& aDest );
778 bool storeString( std::string& aDest, bool aMultiline );
779 bool readTableLine( std::vector<std::string>& aDest );
780
781 bool readNumericSubparam( const std::string& aSubparam, double& aDest );
782 bool readIVtableEntry( IVtable& aTable );
783 bool readVTtableEntry( VTtable& aTable );
784 bool readTypMinMaxValue( TypMinMaxValue& aDest );
785 bool readTypMinMaxValueSubparam( const std::string& aSubparam, TypMinMaxValue& aDest );
786 //bool ReadDieSupplyPads();
787
788 bool readPackage();
789 bool readPin();
790 bool readPinMapping();
791 bool readDiffPin();
792 bool readModelSelector();
793 bool readModel();
795
797 bool changeCommentChar();
798 bool changeContext( std::string& aKeyword );
799
800 IBIS_PARSER_CONTINUE m_continue = IBIS_PARSER_CONTINUE::NONE;
801 IBIS_PARSER_CONTEXT m_context = IBIS_PARSER_CONTEXT::HEADER;
802};
803
804#endif
REPORTER * m_reporter
Definition: ibis_parser.h:56
void Report(std::string aMsg, SEVERITY aSeverity=RPT_SEVERITY_INFO) const
Print a message.
Definition: ibis_parser.h:65
static std::string doubleToString(double aNumber)
Convert a double to string using scientific notation.
IBIS_ANY(REPORTER *aReporter)
Definition: ibis_parser.h:55
virtual bool Check()
Check if the data held by the object is valid.
Definition: ibis_parser.h:89
IBIS_INPUT(REPORTER *aReporter)
Definition: ibis_parser.h:84
IBIS_MATRIX_BANDED(REPORTER *aReporter)
Definition: ibis_parser.h:124
std::vector< double > m_data
Definition: ibis_parser.h:128
bool Check() override
Check if the data held by the object is valid.
Definition: ibis_parser.cpp:61
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:125
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:149
bool Check() override
Check if the data held by the object is valid.
Definition: ibis_parser.cpp:90
IBIS_MATRIX_FULL(REPORTER *aReporter)
Definition: ibis_parser.h:148
std::vector< double > m_data
Definition: ibis_parser.h:151
IBIS_MATRIX_SPARSE(REPORTER *aReporter)
Definition: ibis_parser.h:136
bool Check() override
Check if the data held by the object is valid.
std::vector< double > m_data
Definition: ibis_parser.h:139
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:137
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:116
std::vector< double > m_data
Definition: ibis_parser.h:118
IBIS_MATRIX(REPORTER *aReporter)
Definition: ibis_parser.h:113
virtual ~IBIS_MATRIX()
Definition: ibis_parser.h:114
IBIS_SECTION(REPORTER *aReporter)
Definition: ibis_parser.h:160
IVtableEntry(REPORTER *aReporter)
Definition: ibis_parser.h:339
TypMinMaxValue I
Definition: ibis_parser.h:348
virtual ~IVtableEntry()
Definition: ibis_parser.h:344
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:359
IVtable(REPORTER *aReporter)
Definition: ibis_parser.h:355
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:203
TypMinMaxValue m_Lpkg
Definition: ibis_parser.h:202
IbisComponentPackage(REPORTER *aReporter)
Definition: ibis_parser.h:194
TypMinMaxValue m_Rpkg
Definition: ibis_parser.h:201
std::string m_GNDClampRef
Definition: ibis_parser.h:249
IbisComponentPinMapping(REPORTER *aReporter)
Definition: ibis_parser.h:239
virtual ~IbisComponentPinMapping()
Definition: ibis_parser.h:243
std::string m_POWERClampRef
Definition: ibis_parser.h:250
bool Check() override
Check if the data held by the object is valid.
virtual ~IbisComponentPin()
Definition: ibis_parser.h:216
std::string m_signalName
Definition: ibis_parser.h:220
std::string m_pinName
Definition: ibis_parser.h:219
std::string m_modelName
Definition: ibis_parser.h:221
IbisComponentPin(REPORTER *aReporter)
Definition: ibis_parser.h:212
std::string m_manufacturer
Definition: ibis_parser.h:298
std::string m_packageModel
Definition: ibis_parser.h:302
std::vector< IbisComponentPinMapping > m_pinMappings
Definition: ibis_parser.h:301
IbisComponentPackage m_package
Definition: ibis_parser.h:299
std::string m_busLabel
Definition: ibis_parser.h:303
std::string m_dieSupplyPads
Definition: ibis_parser.h:304
bool Check() override
Check if the data held by the object is valid.
IbisDiffPin m_diffPin
Definition: ibis_parser.h:305
virtual ~IbisComponent()
Definition: ibis_parser.h:294
IbisComponent(REPORTER *aReporter)
Definition: ibis_parser.h:288
std::string m_name
Definition: ibis_parser.h:297
std::vector< IbisComponentPin > m_pins
Definition: ibis_parser.h:300
IbisDiffPinEntry(REPORTER *aReporter)
Definition: ibis_parser.h:260
std::string pinB
Definition: ibis_parser.h:269
virtual ~IbisDiffPinEntry()
Definition: ibis_parser.h:265
TypMinMaxValue tdelay
Definition: ibis_parser.h:271
std::string pinA
Definition: ibis_parser.h:268
IbisDiffPin(REPORTER *aReporter)
Definition: ibis_parser.h:278
std::vector< IbisDiffPinEntry > m_entries
Definition: ibis_parser.h:282
virtual ~IbisFile()
Definition: ibis_parser.h:611
std::vector< IbisComponent > m_components
Definition: ibis_parser.h:615
IbisHeader m_header
Definition: ibis_parser.h:614
std::vector< IbisPackageModel > m_packageModels
Definition: ibis_parser.h:618
std::vector< IbisModel > m_models
Definition: ibis_parser.h:617
IbisFile(REPORTER *aReporter)
Definition: ibis_parser.h:606
std::vector< IbisModelSelector > m_modelSelectors
Definition: ibis_parser.h:616
bool Check() override
Check if the data held by the object is valid.
std::string m_fileName
Definition: ibis_parser.h:170
std::string m_copyright
Definition: ibis_parser.h:175
std::string m_notes
Definition: ibis_parser.h:173
double m_ibisVersion
Definition: ibis_parser.h:168
IbisHeader(REPORTER *aReporter)
Definition: ibis_parser.h:167
std::string m_date
Definition: ibis_parser.h:172
std::string m_source
Definition: ibis_parser.h:171
double m_fileRevision
Definition: ibis_parser.h:169
std::string m_disclaimer
Definition: ibis_parser.h:174
std::string m_modelName
Definition: ibis_parser.h:314
std::string m_modelDescription
Definition: ibis_parser.h:315
virtual ~IbisModelSelector()
Definition: ibis_parser.h:326
bool Check() override
Check if the data held by the object is valid.
std::string m_name
Definition: ibis_parser.h:329
std::vector< IbisModelSelectorEntry > m_models
Definition: ibis_parser.h:330
IbisModelSelector(REPORTER *aReporter)
Definition: ibis_parser.h:322
virtual ~IbisModel()
Definition: ibis_parser.h:539
IBIS_MODEL_TYPE m_type
Definition: ibis_parser.h:543
double m_cref
Definition: ibis_parser.h:550
IVtable m_pullup
Definition: ibis_parser.h:569
TypMinMaxValue m_Cac
Definition: ibis_parser.h:566
TypMinMaxValue m_pullupReference
Definition: ibis_parser.h:559
double m_vmeas
Definition: ibis_parser.h:551
IVtable m_pulldown
Definition: ibis_parser.h:570
bool Check() override
Check if the data held by the object is valid.
TypMinMaxValue m_Rac
Definition: ibis_parser.h:565
std::vector< IbisWaveform * > m_risingWaveforms
Definition: ibis_parser.h:571
IVtable m_POWERClamp
Definition: ibis_parser.h:568
TypMinMaxValue m_Rgnd
Definition: ibis_parser.h:563
TypMinMaxValue m_POWERClampReference
Definition: ibis_parser.h:562
IbisModel(REPORTER *aReporter)
Definition: ibis_parser.h:519
IVtable m_GNDClamp
Definition: ibis_parser.h:567
IbisRamp m_ramp
Definition: ibis_parser.h:573
IBIS_MODEL_POLARITY m_polarity
Definition: ibis_parser.h:553
TypMinMaxValue m_C_comp
Definition: ibis_parser.h:556
double m_rref
Definition: ibis_parser.h:549
IBIS_MODEL_ENABLE m_enable
Definition: ibis_parser.h:552
TypMinMaxValue m_temperatureRange
Definition: ibis_parser.h:558
std::vector< IbisWaveform * > m_fallingWaveforms
Definition: ibis_parser.h:572
TypMinMaxValue m_pulldownReference
Definition: ibis_parser.h:560
double m_vref
Definition: ibis_parser.h:548
TypMinMaxValue m_GNDClampReference
Definition: ibis_parser.h:561
double m_vinh
Definition: ibis_parser.h:547
double m_vinl
Definition: ibis_parser.h:546
TypMinMaxValue m_voltageRange
Definition: ibis_parser.h:557
TypMinMaxValue m_Rpower
Definition: ibis_parser.h:564
std::string m_name
Definition: ibis_parser.h:542
std::vector< std::string > m_pins
Definition: ibis_parser.h:594
std::shared_ptr< IBIS_MATRIX > m_resistanceMatrix
Definition: ibis_parser.h:596
IbisPackageModel(REPORTER *aReporter)
Definition: ibis_parser.h:582
std::string m_OEM
Definition: ibis_parser.h:591
std::shared_ptr< IBIS_MATRIX > m_inductanceMatrix
Definition: ibis_parser.h:598
virtual ~IbisPackageModel()
Definition: ibis_parser.h:586
bool Check() override
Check if the data held by the object is valid.
std::string m_description
Definition: ibis_parser.h:592
std::string m_name
Definition: ibis_parser.h:589
std::shared_ptr< IBIS_MATRIX > m_capacitanceMatrix
Definition: ibis_parser.h:597
std::string m_manufacturer
Definition: ibis_parser.h:590
std::vector< char > m_buffer
Definition: ibis_parser.h:662
char m_commentChar
Definition: ibis_parser.h:661
long m_lineCounter
Definition: ibis_parser.h:660
IBIS_PARSER_CONTINUE m_continue
Definition: ibis_parser.h:800
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:677
bool isLineEmptyFromCursor()
void printLine()
Print the current line.
bool readModelSelector()
bool changeContext(std::string &aKeyword)
int m_currentMatrixRowIndex
Definition: ibis_parser.h:675
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:674
IbisComponent * m_currentComponent
Definition: ibis_parser.h:669
std::shared_ptr< IBIS_MATRIX > m_currentMatrix
Definition: ibis_parser.h:673
int m_lineLength
Definition: ibis_parser.h:666
int m_lineIndex
Definition: ibis_parser.h:665
bool readDvdt(std::string &aString, dvdt &aDest)
bool ParseFile(const std::string &aFileName)
Parse a file.
std::string * m_continuingString
Definition: ibis_parser.h:690
IbisModel * m_currentModel
Definition: ibis_parser.h:671
bool m_parrot
Definition: ibis_parser.h:658
bool readModel()
int m_lineOffset
Definition: ibis_parser.h:664
IbisParser(REPORTER *aReporter)
Definition: ibis_parser.h:656
bool parsePackageModelModelData(std::string &)
Parse a single keyword in the package model context.
IbisPackageModel * m_currentPackageModel
Definition: ibis_parser.h:672
bool readDouble(double &aDest)
IbisModelSelector * m_currentModelSelector
Definition: ibis_parser.h:670
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:663
IBIS_PARSER_CONTEXT m_context
Definition: ibis_parser.h:801
IbisFile m_ibisFile
Definition: ibis_parser.h:668
IVtable * m_currentIVtable
Definition: ibis_parser.h:676
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:678
dvdtTypMinMax m_rising
Definition: ibis_parser.h:479
IbisRamp(REPORTER *aReporter)
Definition: ibis_parser.h:472
bool Check() override
Check if the data held by the object is valid.
double m_Rload
Definition: ibis_parser.h:480
dvdtTypMinMax m_falling
Definition: ibis_parser.h:478
double m_L_fixture
Definition: ibis_parser.h:503
double m_C_dut
Definition: ibis_parser.h:499
double m_V_fixture
Definition: ibis_parser.h:504
VTtable m_table
Definition: ibis_parser.h:496
double m_V_fixture_min
Definition: ibis_parser.h:505
double m_L_dut
Definition: ibis_parser.h:500
IBIS_WAVEFORM_TYPE m_type
Definition: ibis_parser.h:497
double m_V_fixture_max
Definition: ibis_parser.h:506
double m_R_fixture
Definition: ibis_parser.h:501
IbisWaveform(REPORTER *aReporter)
Definition: ibis_parser.h:494
double m_R_dut
Definition: ibis_parser.h:498
double m_C_fixture
Definition: ibis_parser.h:502
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:184
bool Check() override
Check if the data held by the object is valid.
double value[3]
Definition: ibis_parser.h:185
virtual ~VTtableEntry()
Definition: ibis_parser.h:399
TypMinMaxValue V
Definition: ibis_parser.h:403
VTtableEntry(REPORTER *aReporter)
Definition: ibis_parser.h:394
VTtable(REPORTER *aReporter)
Definition: ibis_parser.h:409
std::vector< VTtableEntry > m_entries
Definition: ibis_parser.h:413
dvdt value[3]
Definition: ibis_parser.h:463
bool Check() override
Check if the data held by the object is valid.
dvdtTypMinMax(REPORTER *aReporter)
Definition: ibis_parser.h:462
double m_dv
Definition: ibis_parser.h:455
double m_dt
Definition: ibis_parser.h:456
IBIS_MODEL_TYPE
Definition: ibis_parser.h:424
IBIS_MODEL_POLARITY
Definition: ibis_parser.h:510
#define NAN_NA
Definition: ibis_parser.h:35
IBIS_PARSER_CONTEXT
Definition: ibis_parser.h:643
IBIS_MATRIX_TYPE
Definition: ibis_parser.h:102
IBIS_CORNER
Definition: ibis_parser.h:94
@ TYP
Definition: ibis_parser.h:95
@ MIN
Definition: ibis_parser.h:96
@ MAX
Definition: ibis_parser.h:97
IBIS_PARSER_CONTINUE
Definition: ibis_parser.h:623
IBIS_WAVEFORM_TYPE
Definition: ibis_parser.h:486
IBIS_MODEL_ENABLE
Definition: ibis_parser.h:446
SEVERITY
@ RPT_SEVERITY_INFO