KiCad PCB EDA Suite
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
52#define IBIS_REPORTER REPORTER
53
55{
56public:
57 IBIS_ANY( IBIS_REPORTER* aReporter ) { m_reporter = aReporter; };
59
67 void Report( std::string aMsg, SEVERITY aSeverity = RPT_SEVERITY_INFO )
68 {
69 if( m_reporter )
70 m_reporter->Report( aMsg, aSeverity );
71 };
72protected:
78 std::string doubleToString( double aNumber );
79};
80
81
82class IBIS_INPUT : public IBIS_ANY
83{
84public:
85 IBIS_INPUT( IBIS_REPORTER* aReporter ) : IBIS_ANY( aReporter ){};
90 bool virtual Check() { return false; };
91};
92
93
95{
96 TYP = 0,
98 MAX
99};
100
101
103{
104 // All matrices are supposed to be symmetrical, only upper right triangle is given
105 UNDEFINED,
106 BANDED, // Give the main diagonal + [bandwidth] elements on the right
107 SPARSE, // Only give non-zero values.
108 FULL, // Give the whole upper triangle.
109};
110
112{
113public:
114 IBIS_MATRIX( IBIS_REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
115 virtual ~IBIS_MATRIX(){};
116
118 int m_dim = -5;
119 std::vector<double> m_data;
120};
121
123{
124public:
125 IBIS_MATRIX_BANDED( IBIS_REPORTER* aReporter ) : IBIS_MATRIX( aReporter ){};
127 int m_dim = -2;
128 int m_bandwidth = 0;
129 std::vector<double> m_data;
130
131 bool Check() override;
132};
133
135{
136public:
137 IBIS_MATRIX_SPARSE( IBIS_REPORTER* aReporter ) : IBIS_MATRIX( aReporter ){};
139 int m_dim = -3;
140 std::vector<double> m_data;
141
142 bool Check() override;
143};
144
145
147{
148public:
149 IBIS_MATRIX_FULL( IBIS_REPORTER* aReporter ) : IBIS_MATRIX( aReporter ){};
151 int m_dim = -4;
152 std::vector<double> m_data;
153
154 bool Check() override;
155};
156
157
159{
160public:
161 IBIS_SECTION( IBIS_REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
162};
163
164
166{
167public:
168 IbisHeader( IBIS_REPORTER* aReporter ) : IBIS_SECTION( aReporter ){};
169 double m_ibisVersion = -1;
170 double m_fileRevision = -1;
171 std::string m_fileName;
172 std::string m_source;
173 std::string m_date;
174 std::string m_notes;
175 std::string m_disclaimer;
176 std::string m_copyright;
177
178 bool Check() override;
179};
180
181
183{
184public:
185 TypMinMaxValue( IBIS_REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
186 double value[3] = { -1, -1, -1 };
187
188 bool Check() override;
189};
190
191
193{
194public:
196 IBIS_INPUT( aReporter ),
197 m_Rpkg( aReporter ),
198 m_Lpkg( aReporter ),
199 m_Cpkg( aReporter )
200 {};
201
205
206 bool Check() override;
207};
208
209
211{
212public:
214 IBIS_INPUT( aReporter )
215 {};
216
218 {};
219
220 std::string m_pinName;
221 std::string m_signalName;
222 std::string m_modelName;
223 double m_Rpin = nan( NAN_NA );
224 double m_Lpin = nan( NAN_NA );
225 double m_Cpin = nan( NAN_NA );
226
227 int m_Rcol = 0;
228 int m_Lcol = 0;
229 int m_Ccol = 0;
230
231 bool Check() override;
232
233 bool m_dummy = false;
234};
235
236
238{
239public:
241 IBIS_INPUT( aReporter )
242 {};
243
245 {};
246
247 std::string m_pinName;
248 std::string m_PDref;
249 std::string m_PUref;
250 std::string m_GNDClampRef;
251 std::string m_POWERClampRef;
252 std::string m_extRef;
253
254 bool m_virtual = false;
255};
256
257
259{
260public:
262 IBIS_INPUT( aReporter ),
263 tdelay( aReporter )
264 {};
265
267 {};
268
269 std::string pinA;
270 std::string pinB;
271 double Vdiff = 0.2; // ignored for input
272 TypMinMaxValue tdelay = 0; // ignored for outputs
273};
274
275
277{
278public:
280 IBIS_INPUT( aReporter )
281 {};
282
283 std::vector<IbisDiffPinEntry> m_entries;
284};
285
287{
288public:
290 IBIS_INPUT( aReporter ),
291 m_package( aReporter ),
292 m_diffPin( aReporter )
293 {};
294
296 {};
297
298 std::string m_name = "";
299 std::string m_manufacturer = "";
301 std::vector<IbisComponentPin> m_pins;
302 std::vector<IbisComponentPinMapping> m_pinMappings;
303 std::string m_packageModel;
304 std::string m_busLabel;
305 std::string m_dieSupplyPads;
307
308 bool Check() override;
309};
310
311
313{
314public:
315 std::string m_modelName;
317};
318
319
321{
322public:
324 IBIS_INPUT( aReporter )
325 {};
326
328 {};
329
330 std::string m_name;
331 std::vector<IbisModelSelectorEntry> m_models;
332
333 bool Check() override;
334};
335
336
338{
339public:
341 IBIS_INPUT( aReporter ),
342 I( aReporter )
343 {};
344
346 {};
347
348 double V = 0;
350};
351
352
353class IVtable : public IBIS_INPUT
354{
355public:
356 IVtable( IBIS_REPORTER* aReporter ) :
357 IBIS_INPUT( aReporter )
358 {};
359
360 std::vector<IVtableEntry> m_entries;
361
362 bool Check() override;
363
372 double InterpolatedI( double aV, IBIS_CORNER aCorner );
373
386 std::string Spice( int aN, std::string aPort1, std::string aPort2, std::string aModelName,
387 IBIS_CORNER aCorner );
388
389private:
390};
391
393{
394public:
396 IBIS_INPUT( aReporter ),
397 V( aReporter )
398 {};
399
401 {};
402
403 double t = 0;
405};
406
407class VTtable : public IBIS_INPUT
408{
409public:
410 VTtable( IBIS_REPORTER* aReporter ) :
411 IBIS_INPUT( aReporter )
412 {};
413
414 std::vector<VTtableEntry> m_entries;
415};
416
417/*
418Model_type must be one of the following:
419Input, Output, I/O, 3-state, Open_drain, I/O_open_drain, Open_sink, I/O_open_sink,
420Open_source, I/O_open_source, Input_ECL, Output_ECL, I/O_ECL, 3-state_ECL, Terminator,
421Series, and Series_switch.
422*/
423
425{
426 UNDEFINED,
427 INPUT_STD, // Do not use INPUT: it can conflict with a windows header on MSYS2
428 OUTPUT,
429 IO,
433 OPEN_SINK,
437 INPUT_ECL,
439 IO_ECL,
442 SERIES,
444};
445
447{
448 UNDEFINED,
451};
452
453class dvdt
454{
455public:
456 double m_dv = 1;
457 double m_dt = 1;
458};
459
461{
462public:
463 dvdtTypMinMax( IBIS_REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
465
466 bool Check() override;
467};
468
469
470class IbisRamp : public IBIS_INPUT
471{
472public:
473 IbisRamp( IBIS_REPORTER* aReporter ) :
474 IBIS_INPUT( aReporter ),
475 m_falling( aReporter ),
476 m_rising( aReporter )
477 {};
478
481 double m_Rload = 50; // The R_load subparameter is optional if the default 50 ohm load is used
482
483 bool Check() override;
484};
485
487{
488 RISING,
489 FALLING
490};
491
493{
494public:
495 IbisWaveform( IBIS_REPORTER* aReporter ) : IBIS_INPUT( aReporter ), m_table( aReporter ){};
496
499 double m_R_dut = 0;
500 double m_C_dut = 0;
501 double m_L_dut = 0;
502 double m_R_fixture = 0;
503 double m_C_fixture = 0;
504 double m_L_fixture = 0;
505 double m_V_fixture = 0;
506 double m_V_fixture_min = 0;
507 double m_V_fixture_max = 0;
508};
509
511{
512 UNDEFINED,
513 INVERTING,
515};
516
518{
519public:
520 IbisModel( IBIS_REPORTER* aReporter ) :
521 IBIS_INPUT( aReporter ),
522 m_C_comp( aReporter ),
523 m_voltageRange( aReporter ),
524 m_temperatureRange( aReporter ),
525 m_pullupReference( aReporter ),
526 m_pulldownReference( aReporter ),
527 m_GNDClampReference( aReporter ),
528 m_POWERClampReference( aReporter ),
529 m_Rgnd( aReporter ),
530 m_Rpower( aReporter ),
531 m_Rac( aReporter ),
532 m_Cac( aReporter ),
533 m_GNDClamp( aReporter ),
534 m_POWERClamp( aReporter ),
535 m_pullup( aReporter ),
536 m_pulldown( aReporter ),
537 m_ramp( aReporter )
538 {};
539
540 virtual ~IbisModel()
541 {};
542
543 std::string m_name;
545 /* The Polarity, Enable, Vinl, Vinh, Vmeas, Cref, Rref, and Vref subparameters are optional. */
546 /* the default values of Vinl = 0.8 V and Vinh = 2.0 V are assumed. */
547 double m_vinl = 0.8;
548 double m_vinh = 2;
549 double m_vref = 0;
550 double m_rref = 0;
551 double m_cref = 0;
552 double m_vmeas = 0;
555 // End of optional subparameters
556
572 std::vector<IbisWaveform*> m_risingWaveforms;
573 std::vector<IbisWaveform*> m_fallingWaveforms;
575
576 bool Check() override;
577};
578
579
581{
582public:
584 IBIS_INPUT( aReporter )
585 {};
586
588 {};
589
590 std::string m_name;
591 std::string m_manufacturer;
592 std::string m_OEM;
593 std::string m_description;
595 std::vector<std::string> m_pins;
596
597 std::shared_ptr<IBIS_MATRIX> m_resistanceMatrix;
598 std::shared_ptr<IBIS_MATRIX> m_capacitanceMatrix;
599 std::shared_ptr<IBIS_MATRIX> m_inductanceMatrix;
600
601 bool Check() override;
602};
603
604class IbisFile : public IBIS_INPUT
605{
606public:
607 IbisFile( IBIS_REPORTER* aReporter ) :
608 IBIS_INPUT( aReporter ),
609 m_header( aReporter )
610 {};
611
612 virtual ~IbisFile()
613 {};
614
616 std::vector<IbisComponent> m_components;
617 std::vector<IbisModelSelector> m_modelSelectors;
618 std::vector<IbisModel> m_models;
619 std::vector<IbisPackageModel> m_packageModels;
620};
621
622
624{
625 NONE,
626 STRING,
632 MATRIX,
634 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( IBIS_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( 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 readWaveform( IbisWaveform* aDest, IBIS_WAVEFORM_TYPE aType );
776 bool readString( std::string& aDest );
777 bool storeString( std::string& aDest, bool aMultiline );
778 bool readTableLine( std::vector<std::string>& aDest );
779
780 bool readNumericSubparam( std::string aSubparam, double& aDest );
781 bool readIVtableEntry( IVtable& aTable );
782 bool readVTtableEntry( VTtable& aTable );
783 bool readTypMinMaxValue( TypMinMaxValue& aDest );
784 bool readTypMinMaxValueSubparam( std::string aSubparam, TypMinMaxValue& aDest );
785 //bool ReadDieSupplyPads();
786
787 bool readPackage();
788 bool readPin();
789 bool readPinMapping();
790 bool readDiffPin();
791 bool readModelSelector();
792 bool readModel();
794
796 bool changeCommentChar();
797 bool changeContext( std::string& aKeyword );
798
801};
802
803#endif
Store all of the related footprint information found in a netlist.
Definition: pcb_netlist.h:85
std::string doubleToString(double aNumber)
Convert a double to string using scientific notation.
void Report(std::string aMsg, SEVERITY aSeverity=RPT_SEVERITY_INFO)
Print a message.
Definition: ibis_parser.h:67
IBIS_ANY(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:57
IBIS_REPORTER * m_reporter
Definition: ibis_parser.h:58
virtual bool Check()
Check if the data held by the object is valid.
Definition: ibis_parser.h:90
IBIS_INPUT(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:85
IBIS_MATRIX_BANDED(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:125
std::vector< double > m_data
Definition: ibis_parser.h:129
bool Check() override
Check if the data held by the object is valid.
Definition: ibis_parser.cpp:60
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:126
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:150
bool Check() override
Check if the data held by the object is valid.
Definition: ibis_parser.cpp:89
std::vector< double > m_data
Definition: ibis_parser.h:152
IBIS_MATRIX_FULL(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:149
bool Check() override
Check if the data held by the object is valid.
std::vector< double > m_data
Definition: ibis_parser.h:140
IBIS_MATRIX_SPARSE(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:137
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:138
IBIS_MATRIX_TYPE m_type
Definition: ibis_parser.h:117
std::vector< double > m_data
Definition: ibis_parser.h:119
IBIS_MATRIX(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:114
virtual ~IBIS_MATRIX()
Definition: ibis_parser.h:115
IBIS_SECTION(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:161
IVtableEntry(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:340
TypMinMaxValue I
Definition: ibis_parser.h:349
virtual ~IVtableEntry()
Definition: ibis_parser.h:345
bool Check() override
Check if the data held by the object is valid.
IVtable(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:356
double InterpolatedI(double aV, IBIS_CORNER aCorner)
Interpolate the IV table.
std::vector< IVtableEntry > m_entries
Definition: ibis_parser.h:360
std::string Spice(int aN, std::string aPort1, std::string aPort2, std::string aModelName, IBIS_CORNER aCorner)
Interpolate the IV table.
bool Check() override
Check if the data held by the object is valid.
TypMinMaxValue m_Cpkg
Definition: ibis_parser.h:204
TypMinMaxValue m_Lpkg
Definition: ibis_parser.h:203
IbisComponentPackage(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:195
TypMinMaxValue m_Rpkg
Definition: ibis_parser.h:202
std::string m_GNDClampRef
Definition: ibis_parser.h:250
virtual ~IbisComponentPinMapping()
Definition: ibis_parser.h:244
std::string m_POWERClampRef
Definition: ibis_parser.h:251
IbisComponentPinMapping(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:240
bool Check() override
Check if the data held by the object is valid.
virtual ~IbisComponentPin()
Definition: ibis_parser.h:217
IbisComponentPin(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:213
std::string m_signalName
Definition: ibis_parser.h:221
std::string m_pinName
Definition: ibis_parser.h:220
std::string m_modelName
Definition: ibis_parser.h:222
std::string m_manufacturer
Definition: ibis_parser.h:299
std::string m_packageModel
Definition: ibis_parser.h:303
std::vector< IbisComponentPinMapping > m_pinMappings
Definition: ibis_parser.h:302
IbisComponentPackage m_package
Definition: ibis_parser.h:300
std::string m_busLabel
Definition: ibis_parser.h:304
std::string m_dieSupplyPads
Definition: ibis_parser.h:305
bool Check() override
Check if the data held by the object is valid.
IbisComponent(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:289
IbisDiffPin m_diffPin
Definition: ibis_parser.h:306
virtual ~IbisComponent()
Definition: ibis_parser.h:295
std::string m_name
Definition: ibis_parser.h:298
std::vector< IbisComponentPin > m_pins
Definition: ibis_parser.h:301
std::string pinB
Definition: ibis_parser.h:270
virtual ~IbisDiffPinEntry()
Definition: ibis_parser.h:266
TypMinMaxValue tdelay
Definition: ibis_parser.h:272
std::string pinA
Definition: ibis_parser.h:269
IbisDiffPinEntry(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:261
IbisDiffPin(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:279
std::vector< IbisDiffPinEntry > m_entries
Definition: ibis_parser.h:283
virtual ~IbisFile()
Definition: ibis_parser.h:612
std::vector< IbisComponent > m_components
Definition: ibis_parser.h:616
IbisHeader m_header
Definition: ibis_parser.h:615
std::vector< IbisPackageModel > m_packageModels
Definition: ibis_parser.h:619
IbisFile(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:607
std::vector< IbisModel > m_models
Definition: ibis_parser.h:618
std::vector< IbisModelSelector > m_modelSelectors
Definition: ibis_parser.h:617
bool Check() override
Check if the data held by the object is valid.
std::string m_fileName
Definition: ibis_parser.h:171
std::string m_copyright
Definition: ibis_parser.h:176
IbisHeader(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:168
std::string m_notes
Definition: ibis_parser.h:174
double m_ibisVersion
Definition: ibis_parser.h:169
std::string m_date
Definition: ibis_parser.h:173
std::string m_source
Definition: ibis_parser.h:172
double m_fileRevision
Definition: ibis_parser.h:170
std::string m_disclaimer
Definition: ibis_parser.h:175
std::string m_modelName
Definition: ibis_parser.h:315
std::string m_modelDescription
Definition: ibis_parser.h:316
virtual ~IbisModelSelector()
Definition: ibis_parser.h:327
bool Check() override
Check if the data held by the object is valid.
std::string m_name
Definition: ibis_parser.h:330
IbisModelSelector(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:323
std::vector< IbisModelSelectorEntry > m_models
Definition: ibis_parser.h:331
virtual ~IbisModel()
Definition: ibis_parser.h:540
IBIS_MODEL_TYPE m_type
Definition: ibis_parser.h:544
double m_cref
Definition: ibis_parser.h:551
IVtable m_pullup
Definition: ibis_parser.h:570
TypMinMaxValue m_Cac
Definition: ibis_parser.h:567
TypMinMaxValue m_pullupReference
Definition: ibis_parser.h:560
double m_vmeas
Definition: ibis_parser.h:552
IVtable m_pulldown
Definition: ibis_parser.h:571
bool Check() override
Check if the data held by the object is valid.
TypMinMaxValue m_Rac
Definition: ibis_parser.h:566
std::vector< IbisWaveform * > m_risingWaveforms
Definition: ibis_parser.h:572
IVtable m_POWERClamp
Definition: ibis_parser.h:569
TypMinMaxValue m_Rgnd
Definition: ibis_parser.h:564
TypMinMaxValue m_POWERClampReference
Definition: ibis_parser.h:563
IVtable m_GNDClamp
Definition: ibis_parser.h:568
IbisRamp m_ramp
Definition: ibis_parser.h:574
IBIS_MODEL_POLARITY m_polarity
Definition: ibis_parser.h:554
IbisModel(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:520
TypMinMaxValue m_C_comp
Definition: ibis_parser.h:557
double m_rref
Definition: ibis_parser.h:550
IBIS_MODEL_ENABLE m_enable
Definition: ibis_parser.h:553
TypMinMaxValue m_temperatureRange
Definition: ibis_parser.h:559
std::vector< IbisWaveform * > m_fallingWaveforms
Definition: ibis_parser.h:573
TypMinMaxValue m_pulldownReference
Definition: ibis_parser.h:561
double m_vref
Definition: ibis_parser.h:549
TypMinMaxValue m_GNDClampReference
Definition: ibis_parser.h:562
double m_vinh
Definition: ibis_parser.h:548
double m_vinl
Definition: ibis_parser.h:547
TypMinMaxValue m_voltageRange
Definition: ibis_parser.h:558
TypMinMaxValue m_Rpower
Definition: ibis_parser.h:565
std::string m_name
Definition: ibis_parser.h:543
std::vector< std::string > m_pins
Definition: ibis_parser.h:595
std::shared_ptr< IBIS_MATRIX > m_resistanceMatrix
Definition: ibis_parser.h:597
std::string m_OEM
Definition: ibis_parser.h:592
std::shared_ptr< IBIS_MATRIX > m_inductanceMatrix
Definition: ibis_parser.h:599
virtual ~IbisPackageModel()
Definition: ibis_parser.h:587
bool Check() override
Check if the data held by the object is valid.
std::string m_description
Definition: ibis_parser.h:593
std::string m_name
Definition: ibis_parser.h:590
IbisPackageModel(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:583
std::shared_ptr< IBIS_MATRIX > m_capacitanceMatrix
Definition: ibis_parser.h:598
std::string m_manufacturer
Definition: ibis_parser.h:591
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:799
bool readPin()
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:50
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)
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
bool readNumericSubparam(std::string aSubparam, double &aDest)
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 readMatrixBanded(std::string, IBIS_MATRIX_BANDED &aDest)
bool readMatrix(std::shared_ptr< IBIS_MATRIX > aDest)
bool readTypMinMaxValueSubparam(std::string aSubparam, TypMinMaxValue &aDest)
IbisParser(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:656
bool readInt(int &aDest)
bool readPackage()
int m_bufferIndex
Definition: ibis_parser.h:663
IBIS_PARSER_CONTEXT m_context
Definition: ibis_parser.h:800
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 ParseFile(std::string &aFileName)
Parse a file.
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:480
bool Check() override
Check if the data held by the object is valid.
double m_Rload
Definition: ibis_parser.h:481
IbisRamp(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:473
dvdtTypMinMax m_falling
Definition: ibis_parser.h:479
double m_L_fixture
Definition: ibis_parser.h:504
double m_C_dut
Definition: ibis_parser.h:500
double m_V_fixture
Definition: ibis_parser.h:505
VTtable m_table
Definition: ibis_parser.h:497
double m_V_fixture_min
Definition: ibis_parser.h:506
double m_L_dut
Definition: ibis_parser.h:501
IBIS_WAVEFORM_TYPE m_type
Definition: ibis_parser.h:498
double m_V_fixture_max
Definition: ibis_parser.h:507
double m_R_fixture
Definition: ibis_parser.h:502
IbisWaveform(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:495
double m_R_dut
Definition: ibis_parser.h:499
double m_C_fixture
Definition: ibis_parser.h:503
bool Check() override
Check if the data held by the object is valid.
double value[3]
Definition: ibis_parser.h:186
TypMinMaxValue(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:185
virtual ~VTtableEntry()
Definition: ibis_parser.h:400
VTtableEntry(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:395
TypMinMaxValue V
Definition: ibis_parser.h:404
VTtable(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:410
std::vector< VTtableEntry > m_entries
Definition: ibis_parser.h:414
dvdt value[3]
Definition: ibis_parser.h:464
dvdtTypMinMax(IBIS_REPORTER *aReporter)
Definition: ibis_parser.h:463
bool Check() override
Check if the data held by the object is valid.
double m_dv
Definition: ibis_parser.h:456
double m_dt
Definition: ibis_parser.h:457
IBIS_MODEL_TYPE
Definition: ibis_parser.h:425
#define IBIS_REPORTER
Definition: ibis_parser.h:52
IBIS_MODEL_POLARITY
Definition: ibis_parser.h:511
#define NAN_NA
Definition: ibis_parser.h:35
IBIS_PARSER_CONTEXT
Definition: ibis_parser.h:643
IBIS_MATRIX_TYPE
Definition: ibis_parser.h:103
IBIS_CORNER
Definition: ibis_parser.h:95
@ TYP
Definition: ibis_parser.h:96
@ MIN
Definition: ibis_parser.h:97
@ MAX
Definition: ibis_parser.h:98
IBIS_PARSER_CONTINUE
Definition: ibis_parser.h:624
IBIS_WAVEFORM_TYPE
Definition: ibis_parser.h:487
IBIS_MODEL_ENABLE
Definition: ibis_parser.h:447
@ NONE
Definition: kibis.h:53
SEVERITY
@ RPT_SEVERITY_INFO