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
562{
563public:
564 IbisModel( REPORTER* aReporter ) :
565 IBIS_INPUT( aReporter ),
566 m_C_comp( aReporter ),
567 m_C_comp_gnd_clamp( aReporter ),
568 m_C_comp_power_clamp( aReporter ),
569 m_C_comp_pullup( aReporter ),
570 m_C_comp_pulldown( aReporter ),
571 m_voltageRange( aReporter ),
572 m_temperatureRange( aReporter ),
573 m_pullupReference( aReporter ),
574 m_pulldownReference( aReporter ),
575 m_GNDClampReference( aReporter ),
576 m_POWERClampReference( aReporter ),
577 m_Rgnd( aReporter ),
578 m_Rpower( aReporter ),
579 m_Rac( aReporter ),
580 m_Cac( aReporter ),
581 m_GNDClamp( aReporter ),
582 m_POWERClamp( aReporter ),
583 m_pullup( aReporter ),
584 m_pulldown( aReporter ),
585 m_ISSO_PU( aReporter ),
586 m_ISSO_PD( aReporter ),
587 m_compositeCurrent( aReporter ),
588 m_ramp( aReporter )
589 {};
590
591 virtual ~IbisModel() = default;
592
593 std::string m_name;
595 /* The Polarity, Enable, Vinl, Vinh, Vmeas, Cref, Rref, and Vref subparameters are optional. */
596 /* the default values of Vinl = 0.8 V and Vinh = 2.0 V are assumed. */
597 double m_vinl = 0.8;
598 double m_vinh = 2;
599 double m_vref = 0;
600 double m_rref = 0;
601 double m_cref = 0;
602 double m_vmeas = 0;
605 // End of optional subparameters
606
629 std::vector<IbisWaveform*> m_risingWaveforms;
630 std::vector<IbisWaveform*> m_fallingWaveforms;
632
633 std::vector<IbisSubmodelMode> m_submodels;
634
635 bool Check() override;
636};
637
638
646
647
649{
650public:
651 IbisSubmodel( REPORTER* aReporter ) :
652 IBIS_INPUT( aReporter ),
653 m_VtriggerR( aReporter ),
654 m_VtriggerF( aReporter ),
655 m_offDelay( aReporter ),
656 m_pullup( aReporter ),
657 m_pulldown( aReporter ),
658 m_GNDClamp( aReporter ),
659 m_POWERClamp( aReporter ),
660 m_GNDPulse( aReporter ),
661 m_POWERPulse( aReporter ),
662 m_ramp( aReporter )
663 {};
664
665 virtual ~IbisSubmodel() = default;
666
667 std::string m_name;
679 std::vector<IbisWaveform*> m_risingWaveforms;
680 std::vector<IbisWaveform*> m_fallingWaveforms;
681
682 bool Check() override;
683};
684
685
687{
688public:
690 IBIS_INPUT( aReporter )
691 {};
692
694 {};
695
696 std::string m_name;
697 std::string m_manufacturer;
698 std::string m_OEM;
699 std::string m_description;
701 std::map<std::string, int> m_pins;
702
703 std::shared_ptr<IBIS_MATRIX> m_resistanceMatrix;
704 std::shared_ptr<IBIS_MATRIX> m_capacitanceMatrix;
705 std::shared_ptr<IBIS_MATRIX> m_inductanceMatrix;
706
707 bool Check() override;
708};
709
710
711class IbisFile : public IBIS_INPUT
712{
713public:
714 IbisFile( REPORTER* aReporter ) :
715 IBIS_INPUT( aReporter ),
716 m_header( aReporter )
717 {};
718
719 virtual ~IbisFile()
720 {};
721
723 std::vector<IbisComponent> m_components;
724 std::vector<IbisModelSelector> m_modelSelectors;
725 std::vector<IbisModel> m_models;
726 std::vector<IbisPackageModel> m_packageModels;
727 std::map<std::string, IbisSubmodel> m_submodels;
728};
729
730
756
769
770
771class IbisParser : public IBIS_INPUT
772{
773public:
774 IbisParser( REPORTER* aReporter ) :
775 IBIS_INPUT( aReporter ),
776 m_ibisFile( aReporter )
777 {};
778
779 bool m_parrot = true; // Write back all lines.
780
782 char m_commentChar = '|';
783 std::vector<char> m_buffer;
786 int m_lineIndex = 0;
788
795 std::shared_ptr<IBIS_MATRIX> m_currentMatrix = nullptr;
801
809 bool ParseFile( const std::string& aFileName );
810
811private:
812 std::string* m_continuingString = nullptr;
813
822 bool compareIbisWord( const std::string& a, const std::string& b );
823
829 bool parseHeader( std::string& aKeyword );
830
836 bool parseComponent( std::string& aKeyword );
837
843 bool parseModelSelector( std::string& aKeyword );
844
850 bool parseModel( std::string& aKeyword );
851
857 bool parseSubmodel( std::string& aKeyword );
858
864 bool parsePackageModel( std::string& aKeyword );
865
871 bool parsePackageModelModelData( std::string& aKeyword );
872
878 bool parseAlgorithmicModel( std::string& aKeyword );
879
887 bool parseDouble( double& aDest, std::string& aStr, bool aAllowModifiers = false );
888
895 bool parseDvdt( dvdt& aDest, std::string& aStr );
896
901 bool onNewLine(); // Gets rid of comments ( except on a comment character change command...)
902
907 bool getNextLine();
908
910 void printLine();
911
912 void skipWhitespaces();
913 bool checkEndofLine(); // To be used when there cannot be any character left on the line
915 std::string getKeyword();
916
917 bool readInt( int& aDest );
918 bool readDouble( double& aDest );
919 bool readWord( std::string& aDest );
920 bool readDvdt( dvdt& aDest );
921 bool readMatrixPinIndex( int& aDest );
922 bool readMatrixType( std::shared_ptr<IBIS_MATRIX>& aDest );
923 bool readMatrixBandwidth();
924 bool readMatrixRow();
926 bool readMatrixSparse();
927 bool readMatrixData();
928 bool readRampdvdt( dvdtTypMinMax& aDest );
929 bool readRamp();
930 bool readModelSpec();
931 bool readSubmodelSpec();
934 bool readAddSubmodel();
935 bool readWaveform( IbisWaveform* aDest, IBIS_WAVEFORM_TYPE aType );
936 bool readString( std::string& aDest );
937 bool storeString( std::string& aDest, bool aMultiline );
938 bool readTableLine( std::vector<std::string>& aDest );
939
940 bool readNumericSubparam( const std::string& aSubparam, double& aDest );
941 bool readIVtableEntry( IVtable& aTable );
942 bool readVTtableEntry( VTtable& aTable );
943 bool readTypMinMaxValue( TypMinMaxValue& aDest );
944 bool readTypMinMaxValueSubparam( const std::string& aSubparam, TypMinMaxValue& aDest );
945 //bool ReadDieSupplyPads();
946
947 bool readPackage();
948 bool readPin();
949 bool readPinMapping();
950 bool readDiffPin();
952 bool readModelSelector();
953 bool readModel();
954 bool readSubmodel();
956
958 bool changeCommentChar();
959 bool changeContext( std::string& aKeyword );
960
963};
964
965#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
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)
IVtable m_GNDClamp
IbisRamp m_ramp
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
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
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 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)
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()
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
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:72
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