mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-13 17:53:11 +02:00
Compare commits
10 Commits
8e55942a2e
...
8ce2bd4b7e
Author | SHA1 | Date | |
---|---|---|---|
|
8ce2bd4b7e | ||
|
5dc6d43f43 | ||
|
98dd5a68eb | ||
|
cec87c4096 | ||
|
9778ca739b | ||
|
8cffe509fa | ||
|
47a8701a01 | ||
|
0269851994 | ||
|
2757067986 | ||
|
62d8cfbf9f |
@ -26,6 +26,7 @@
|
||||
#include "render_3d_opengl.h"
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <pcb_track.h>
|
||||
#include "../../3d_math.h"
|
||||
#include "convert_basic_shapes_to_polygon.h"
|
||||
#include <lset.h>
|
||||
@ -726,6 +727,54 @@ void RENDER_3D_OPENGL::generateCylinder( const SFVEC2F& aCenter, float aInnerRad
|
||||
}
|
||||
|
||||
|
||||
void RENDER_3D_OPENGL::generateDisk( const SFVEC2F& aCenter, float aRadius, float aZ,
|
||||
unsigned int aNr_sides_per_circle, TRIANGLE_DISPLAY_LIST* aDstLayer,
|
||||
bool aTop )
|
||||
{
|
||||
const float delta = 2.0f * glm::pi<float>() / (float) aNr_sides_per_circle;
|
||||
|
||||
for( unsigned int i = 0; i < aNr_sides_per_circle; ++i )
|
||||
{
|
||||
float a0 = delta * i;
|
||||
float a1 = delta * ( i + 1 );
|
||||
const SFVEC3F p0( aCenter.x + cosf( a0 ) * aRadius,
|
||||
aCenter.y + sinf( a0 ) * aRadius, aZ );
|
||||
const SFVEC3F p1( aCenter.x + cosf( a1 ) * aRadius,
|
||||
aCenter.y + sinf( a1 ) * aRadius, aZ );
|
||||
const SFVEC3F c( aCenter.x, aCenter.y, aZ );
|
||||
|
||||
if( aTop )
|
||||
aDstLayer->m_layer_top_triangles->AddTriangle( p1, p0, c );
|
||||
else
|
||||
aDstLayer->m_layer_bot_triangles->AddTriangle( p0, p1, c );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RENDER_3D_OPENGL::generateDimple( const SFVEC2F& aCenter, float aRadius, float aZ,
|
||||
float aDepth, unsigned int aNr_sides_per_circle,
|
||||
TRIANGLE_DISPLAY_LIST* aDstLayer, bool aTop )
|
||||
{
|
||||
const float delta = 2.0f * glm::pi<float>() / (float) aNr_sides_per_circle;
|
||||
const SFVEC3F c( aCenter.x, aCenter.y, aTop ? aZ - aDepth : aZ + aDepth );
|
||||
|
||||
for( unsigned int i = 0; i < aNr_sides_per_circle; ++i )
|
||||
{
|
||||
float a0 = delta * i;
|
||||
float a1 = delta * ( i + 1 );
|
||||
const SFVEC3F p0( aCenter.x + cosf( a0 ) * aRadius,
|
||||
aCenter.y + sinf( a0 ) * aRadius, aZ );
|
||||
const SFVEC3F p1( aCenter.x + cosf( a1 ) * aRadius,
|
||||
aCenter.y + sinf( a1 ) * aRadius, aZ );
|
||||
|
||||
if( aTop )
|
||||
aDstLayer->m_layer_top_triangles->AddTriangle( p0, p1, c );
|
||||
else
|
||||
aDstLayer->m_layer_bot_triangles->AddTriangle( p1, p0, c );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RENDER_3D_OPENGL::generateViasAndPads()
|
||||
{
|
||||
if( !m_boardAdapter.GetBoard() )
|
||||
@ -882,6 +931,63 @@ void RENDER_3D_OPENGL::generateViasAndPads()
|
||||
delete layerTriangles;
|
||||
}
|
||||
}
|
||||
|
||||
TRIANGLE_DISPLAY_LIST* frontCover = new TRIANGLE_DISPLAY_LIST( m_boardAdapter.GetViaCount() );
|
||||
TRIANGLE_DISPLAY_LIST* backCover = new TRIANGLE_DISPLAY_LIST( m_boardAdapter.GetViaCount() );
|
||||
|
||||
for( const PCB_TRACK* track : m_boardAdapter.GetBoard()->Tracks() )
|
||||
{
|
||||
if( track->Type() != PCB_VIA_T )
|
||||
continue;
|
||||
|
||||
const PCB_VIA* via = static_cast<const PCB_VIA*>( track );
|
||||
|
||||
const float holediameter = via->GetDrillValue() * m_boardAdapter.BiuTo3dUnits();
|
||||
const float hole_radius = holediameter / 2.0f + 2.0 * platingThickness3d;
|
||||
const SFVEC2F center( via->GetStart().x * m_boardAdapter.BiuTo3dUnits(),
|
||||
-via->GetStart().y * m_boardAdapter.BiuTo3dUnits() );
|
||||
unsigned int seg = m_boardAdapter.GetCircleSegmentCount( via->GetDrillValue() );
|
||||
|
||||
PCB_LAYER_ID top_layer, bottom_layer;
|
||||
via->LayerPair( &top_layer, &bottom_layer );
|
||||
float ztop, zbot, dummy;
|
||||
getLayerZPos( top_layer, ztop, dummy );
|
||||
getLayerZPos( bottom_layer, dummy, zbot );
|
||||
|
||||
bool frontCovering = via->GetFrontCoveringMode() == COVERING_MODE::COVERED || via->IsTented( F_Mask );
|
||||
bool backCovering = via->GetBackCoveringMode() == COVERING_MODE::COVERED || via->IsTented( B_Mask );
|
||||
bool frontPlugged = via->GetFrontPluggingMode() == PLUGGING_MODE::PLUGGED;
|
||||
bool backPlugged = via->GetBackPluggingMode() == PLUGGING_MODE::PLUGGED;
|
||||
bool filled = via->GetFillingMode() == FILLING_MODE::FILLED
|
||||
|| via->GetCappingMode() == CAPPING_MODE::CAPPED;
|
||||
|
||||
const float depth = hole_radius * 0.3f;
|
||||
|
||||
if( frontCovering )
|
||||
{
|
||||
if( filled || !frontPlugged )
|
||||
generateDisk( center, hole_radius, ztop, seg, frontCover, true );
|
||||
else
|
||||
generateDimple( center, hole_radius, ztop, depth, seg, frontCover, true );
|
||||
}
|
||||
|
||||
if( backCovering )
|
||||
{
|
||||
if( filled || !backPlugged )
|
||||
generateDisk( center, hole_radius, zbot, seg, backCover, false );
|
||||
else
|
||||
generateDimple( center, hole_radius, zbot, depth, seg, backCover, false );
|
||||
}
|
||||
}
|
||||
|
||||
if( frontCover->m_layer_top_triangles->GetVertexSize() > 0 )
|
||||
m_viaFrontCover = new OPENGL_RENDER_LIST( *frontCover, 0, 0.0f, 0.0f );
|
||||
|
||||
if( backCover->m_layer_bot_triangles->GetVertexSize() > 0 )
|
||||
m_viaBackCover = new OPENGL_RENDER_LIST( *backCover, 0, 0.0f, 0.0f );
|
||||
|
||||
delete frontCover;
|
||||
delete backCover;
|
||||
}
|
||||
|
||||
|
||||
|
@ -72,6 +72,8 @@ RENDER_3D_OPENGL::RENDER_3D_OPENGL( EDA_3D_CANVAS* aCanvas, BOARD_ADAPTER& aAdap
|
||||
m_outerViaThroughHoles = nullptr;
|
||||
m_microviaHoles = nullptr;
|
||||
m_padHoles = nullptr;
|
||||
m_viaFrontCover = nullptr;
|
||||
m_viaBackCover = nullptr;
|
||||
|
||||
m_circleTexture = 0;
|
||||
m_grid = 0;
|
||||
@ -947,6 +949,8 @@ void RENDER_3D_OPENGL::freeAllLists()
|
||||
|
||||
DELETE_AND_FREE( m_microviaHoles )
|
||||
DELETE_AND_FREE( m_padHoles )
|
||||
DELETE_AND_FREE( m_viaFrontCover )
|
||||
DELETE_AND_FREE( m_viaBackCover )
|
||||
}
|
||||
|
||||
|
||||
@ -968,6 +972,17 @@ void RENDER_3D_OPENGL::renderSolderMaskLayer( PCB_LAYER_ID aLayerID, float aZPos
|
||||
setLayerMaterial( aLayerID );
|
||||
m_board->SetItIsTransparent( true );
|
||||
m_board->DrawCulled( aShowThickness, solder_mask, via_holes );
|
||||
|
||||
if( aLayerID == F_Mask && m_viaFrontCover )
|
||||
{
|
||||
m_viaFrontCover->ApplyScalePosition( aZPos, 4 * m_boardAdapter.GetNonCopperLayerThickness() );
|
||||
m_viaFrontCover->DrawTop();
|
||||
}
|
||||
else if( aLayerID == B_Mask && m_viaBackCover )
|
||||
{
|
||||
m_viaBackCover->ApplyScalePosition( aZPos, 4 * m_boardAdapter.GetNonCopperLayerThickness() );
|
||||
m_viaBackCover->DrawBot();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,6 +123,14 @@ private:
|
||||
float aZtop, float aZbot, unsigned int aNr_sides_per_circle,
|
||||
TRIANGLE_DISPLAY_LIST* aDstLayer );
|
||||
|
||||
void generateDisk( const SFVEC2F& aCenter, float aRadius, float aZ,
|
||||
unsigned int aNr_sides_per_circle, TRIANGLE_DISPLAY_LIST* aDstLayer,
|
||||
bool aTop );
|
||||
|
||||
void generateDimple( const SFVEC2F& aCenter, float aRadius, float aZ, float aDepth,
|
||||
unsigned int aNr_sides_per_circle, TRIANGLE_DISPLAY_LIST* aDstLayer,
|
||||
bool aTop );
|
||||
|
||||
void generateViasAndPads();
|
||||
|
||||
/**
|
||||
@ -236,6 +244,8 @@ private:
|
||||
|
||||
OPENGL_RENDER_LIST* m_microviaHoles;
|
||||
OPENGL_RENDER_LIST* m_padHoles;
|
||||
OPENGL_RENDER_LIST* m_viaFrontCover;
|
||||
OPENGL_RENDER_LIST* m_viaBackCover;
|
||||
|
||||
// Caches
|
||||
std::map<wxString, MODEL_3D*> m_3dModelMap;
|
||||
|
@ -624,6 +624,38 @@ bool IbisModel::Check()
|
||||
Report( _( "Invalid Ramp" ), RPT_SEVERITY_ERROR );
|
||||
}
|
||||
|
||||
for( IbisSubmodel sm : this->m_submodels )
|
||||
{
|
||||
if( this->m_type == IBIS_MODEL_TYPE::SERIES
|
||||
|| this->m_type == IBIS_MODEL_TYPE::SERIES_SWITCH )
|
||||
{
|
||||
Report( _( "'Switch' and 'Series switch' model types cannot have submodels" ),
|
||||
RPT_SEVERITY_ERROR );
|
||||
status = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if( ( this->m_type == IBIS_MODEL_TYPE::OUTPUT
|
||||
|| this->m_type == IBIS_MODEL_TYPE::OUTPUT_ECL )
|
||||
&& sm.m_mode == IBIS_SUBMODEL_MODE::NON_DRIVING )
|
||||
{
|
||||
Report( _( "Model and submodel are incompatible" ), RPT_SEVERITY_ERROR );
|
||||
status = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if( ( this->m_type == IBIS_MODEL_TYPE::INPUT_STD
|
||||
|| this->m_type == IBIS_MODEL_TYPE::INPUT_ECL )
|
||||
&& sm.m_mode == IBIS_SUBMODEL_MODE::DRIVING )
|
||||
{
|
||||
Report( _( "Model and submodel are incompatible" ), RPT_SEVERITY_ERROR );
|
||||
status = false;
|
||||
break;
|
||||
}
|
||||
|
||||
// IBIS_SUBMODEL_MODE::ALL is valid for all model types, except series and series_switch
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -1269,6 +1301,7 @@ bool IbisParser::changeContext( std::string& aKeyword )
|
||||
case IBIS_PARSER_CONTEXT::MODEL: status &= m_currentModel->Check(); break;
|
||||
case IBIS_PARSER_CONTEXT::MODELSELECTOR: status &= m_currentModelSelector->Check(); break;
|
||||
case IBIS_PARSER_CONTEXT::PACKAGEMODEL: status &= m_currentPackageModel->Check(); break;
|
||||
case IBIS_PARSER_CONTEXT::BOARD_DESCRIPTION: status &= m_currentBoardDescription->Check(); break;
|
||||
case IBIS_PARSER_CONTEXT::END:
|
||||
Report( "Cannot change context after [END]" );
|
||||
status = false;
|
||||
@ -1343,6 +1376,28 @@ bool IbisParser::changeContext( std::string& aKeyword )
|
||||
m_continue = IBIS_PARSER_CONTINUE::NONE;
|
||||
}
|
||||
}
|
||||
else if( compareIbisWord( aKeyword.c_str(), "Begin_Board_Description" ) )
|
||||
{
|
||||
IbisBoardDescription BD( m_Reporter );
|
||||
status &= storeString( BD.m_name, false );
|
||||
|
||||
m_ibisFile.m_boardDescriptions.push_back( BD );
|
||||
m_currentBoardDescription = &( m_ibisFile.m_boardDescriptions.back() );
|
||||
m_context = IBIS_PARSER_CONTEXT::BOARD_DESCRIPTION;
|
||||
}
|
||||
else if( compareIbisWord( aKeyword.c_str(), "End_Board_Description" ) )
|
||||
{
|
||||
if( m_currentBoardDescription != nullptr )
|
||||
{
|
||||
m_context = IBIS_PARSER_CONTEXT::BOARD_DESCRIPTION;
|
||||
m_continue = IBIS_PARSER_CONTINUE::NONE;
|
||||
}
|
||||
else // .ebd file, we just go back to header, to get the [END] keyword
|
||||
{ // This will cause the header to be checked twice.
|
||||
m_context = IBIS_PARSER_CONTEXT::HEADER;
|
||||
m_continue = IBIS_PARSER_CONTINUE::NONE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
status = false;
|
||||
@ -1355,7 +1410,8 @@ bool IbisParser::changeContext( std::string& aKeyword )
|
||||
case IBIS_PARSER_CONTEXT::MODELSELECTOR: context_string += "MODEL_SELECTOR"; break;
|
||||
case IBIS_PARSER_CONTEXT::MODEL: context_string += "MODEL"; break;
|
||||
case IBIS_PARSER_CONTEXT::PACKAGEMODEL: context_string += "PACKAGE_MODEL"; break;
|
||||
case IBIS_PARSER_CONTEXT::PACKAGEMODEL_MODELDATA: context_string += "PACKAGE_MODEL_MODEL_DATA"; break;
|
||||
case IBIS_PARSER_CONTEXT::BOARD_DESCRIPTION: context_string += "BOARD_DESCRIPTION"; break;
|
||||
case IBIS_PARSER_CONTEXT::PACKAGEMODEL_MODELDATA: context_string += "PACKAGE_MODEL_MODEL_DATA"; break;
|
||||
default: context_string += "???"; break;
|
||||
}
|
||||
|
||||
@ -1488,6 +1544,13 @@ bool IbisParser::parseModel( std::string& aKeyword )
|
||||
status = readTypMinMaxValue( m_currentModel->m_Rpower );
|
||||
else if( compareIbisWord( aKeyword.c_str(), "Rgnd" ) )
|
||||
status = readTypMinMaxValue( m_currentModel->m_Rgnd );
|
||||
else if( compareIbisWord( aKeyword.c_str(), "Add_Submodel" ) )
|
||||
status = readAddSubmodel();
|
||||
else if( compareIbisWord( aKeyword.c_str(), "Driver_Schedule" ) )
|
||||
{
|
||||
Report( _( "The [Driver Schedule] keyword is not implemented" ), RPT_SEVERITY_ERROR );
|
||||
status = false;
|
||||
}
|
||||
else
|
||||
status = changeContext( aKeyword );
|
||||
|
||||
@ -2053,6 +2116,58 @@ bool IbisParser::readModel()
|
||||
}
|
||||
|
||||
|
||||
bool IbisParser::readAddSubmodel()
|
||||
{
|
||||
bool status = true;
|
||||
std::string name;
|
||||
IBIS_SUBMODEL_MODE mode;
|
||||
std::string subparam;
|
||||
|
||||
m_continue = IBIS_PARSER_CONTINUE::ADDSUBMODEL;
|
||||
|
||||
if( readWord( subparam ) )
|
||||
{
|
||||
name = subparam;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true; // empty line
|
||||
}
|
||||
|
||||
if( status && readWord( subparam ) )
|
||||
{
|
||||
if( compareIbisWord( subparam.c_str(), "All" ) )
|
||||
mode = IBIS_SUBMODEL_MODE::ALL;
|
||||
else if( compareIbisWord( subparam.c_str(), "Driving" ) )
|
||||
mode = IBIS_SUBMODEL_MODE::DRIVING;
|
||||
else if( compareIbisWord( subparam.c_str(), "Non-driving" ) )
|
||||
mode = IBIS_SUBMODEL_MODE::NON_DRIVING;
|
||||
else
|
||||
{
|
||||
std::stringstream message;
|
||||
message << _( "Unknown mode for submodel: " ) << subparam;
|
||||
Report( message.str(), RPT_SEVERITY_ERROR );
|
||||
status = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Report( _( "Missing mode for submodel" ), RPT_SEVERITY_ERROR );
|
||||
status = false;
|
||||
}
|
||||
|
||||
if( status )
|
||||
{
|
||||
IbisSubmodel submodel( m_Reporter );
|
||||
submodel.m_name = name;
|
||||
submodel.m_mode = mode;
|
||||
m_currentModel->m_submodels.push_back( submodel );
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
bool IbisParser::parseHeader( std::string& aKeyword )
|
||||
{
|
||||
bool status = true;
|
||||
@ -2144,6 +2259,46 @@ bool IbisParser::parseComponent( std::string& aKeyword )
|
||||
return status;
|
||||
}
|
||||
|
||||
bool IbisParser::parseBoardDescription( std::string& aKeyword )
|
||||
{
|
||||
bool status = true;
|
||||
if( compareIbisWord( aKeyword.c_str(), "Manufacturer" ) )
|
||||
{
|
||||
status &= storeString( m_currentBoardDescription->m_manufacturer, true );
|
||||
}
|
||||
else if( compareIbisWord( aKeyword.c_str(), "Number_Of_Pins" ) )
|
||||
{
|
||||
status &= readInt( m_currentBoardDescription->m_numberOfPins );
|
||||
}
|
||||
else if( compareIbisWord( aKeyword.c_str(), "Pin_List" ) )
|
||||
{
|
||||
Report( _( "The [Pin List] keyword is not implemented" ), RPT_SEVERITY_ERROR );
|
||||
status = false;
|
||||
}
|
||||
else if( compareIbisWord( aKeyword.c_str(), "Path_Description" ) )
|
||||
{
|
||||
Report( _( "The [Path Description] keyword is not implemented" ), RPT_SEVERITY_ERROR );
|
||||
status = false;
|
||||
}
|
||||
else if( compareIbisWord( aKeyword.c_str(), "Reference_Designator_Map" ) )
|
||||
{
|
||||
Report( _( "The [Path Description] keyword is not implemented" ), RPT_SEVERITY_ERROR );
|
||||
status = false;
|
||||
}
|
||||
else if( compareIbisWord( aKeyword.c_str(), "Diff_Pin" ) )
|
||||
{
|
||||
status &= readDiffPin();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !changeContext( aKeyword ) )
|
||||
{
|
||||
status = false;
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
bool IbisParser::readTableLine( std::vector<std::string>& aDest )
|
||||
{
|
||||
aDest.clear();
|
||||
@ -2536,6 +2691,9 @@ bool IbisParser::onNewLine()
|
||||
break;
|
||||
case IBIS_PARSER_CONTEXT::PACKAGEMODEL:
|
||||
status &= parsePackageModel( keyword );
|
||||
break;
|
||||
case IBIS_PARSER_CONTEXT::BOARD_DESCRIPTION:
|
||||
status &= parseBoardDescription( keyword );
|
||||
break;
|
||||
case IBIS_PARSER_CONTEXT::PACKAGEMODEL_MODELDATA:
|
||||
status &= parsePackageModelModelData( keyword );
|
||||
@ -2601,6 +2759,9 @@ bool IbisParser::onNewLine()
|
||||
case IBIS_PARSER_CONTINUE::MATRIX:
|
||||
status &= readMatrix( m_currentMatrix );
|
||||
break;
|
||||
case IBIS_PARSER_CONTINUE::ADDSUBMODEL:
|
||||
status &= readAddSubmodel();
|
||||
break;
|
||||
case IBIS_PARSER_CONTINUE::NONE:
|
||||
default:
|
||||
Report( _( "Missing keyword." ), RPT_SEVERITY_ERROR );
|
||||
|
@ -264,6 +264,18 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class IbisBoardPin : public IBIS_INPUT
|
||||
{
|
||||
public:
|
||||
IbisBoardPin( REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
|
||||
|
||||
virtual ~IbisBoardPin(){};
|
||||
|
||||
std::string m_name;
|
||||
std::string m_signalName;
|
||||
};
|
||||
|
||||
|
||||
class IbisComponentPinMapping : public IBIS_INPUT
|
||||
{
|
||||
public:
|
||||
@ -337,6 +349,20 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class IbisBoardDescription : public IBIS_INPUT
|
||||
{
|
||||
public:
|
||||
IbisBoardDescription( REPORTER* aReporter ) : IBIS_INPUT( aReporter ){};
|
||||
|
||||
virtual ~IbisBoardDescription(){};
|
||||
|
||||
std::string m_name = "";
|
||||
std::string m_manufacturer = "";
|
||||
int m_numberOfPins;
|
||||
std::vector<IbisBoardPin> m_pins;
|
||||
};
|
||||
|
||||
|
||||
class IbisModelSelectorEntry
|
||||
{
|
||||
public:
|
||||
@ -551,6 +577,23 @@ enum class IBIS_MODEL_POLARITY
|
||||
NON_INVERTING
|
||||
};
|
||||
|
||||
enum class IBIS_SUBMODEL_MODE
|
||||
{
|
||||
DRIVING,
|
||||
NON_DRIVING,
|
||||
ALL
|
||||
};
|
||||
|
||||
class IbisSubmodel : IBIS_INPUT
|
||||
{
|
||||
public:
|
||||
IbisSubmodel( REPORTER* aReporter ):
|
||||
IBIS_INPUT( aReporter )
|
||||
{};
|
||||
|
||||
std::string m_name;
|
||||
IBIS_SUBMODEL_MODE m_mode;
|
||||
};
|
||||
|
||||
class IbisModel : IBIS_INPUT
|
||||
{
|
||||
@ -610,7 +653,7 @@ public:
|
||||
std::vector<IbisWaveform*> m_risingWaveforms;
|
||||
std::vector<IbisWaveform*> m_fallingWaveforms;
|
||||
IbisRamp m_ramp;
|
||||
|
||||
std::vector<IbisSubmodel> m_submodels;
|
||||
bool Check() override;
|
||||
};
|
||||
|
||||
@ -651,11 +694,12 @@ public:
|
||||
virtual ~IbisFile()
|
||||
{};
|
||||
|
||||
IbisHeader m_header;
|
||||
std::vector<IbisComponent> m_components;
|
||||
std::vector<IbisModelSelector> m_modelSelectors;
|
||||
std::vector<IbisModel> m_models;
|
||||
std::vector<IbisPackageModel> m_packageModels;
|
||||
IbisHeader m_header;
|
||||
std::vector<IbisComponent> m_components;
|
||||
std::vector<IbisModelSelector> m_modelSelectors;
|
||||
std::vector<IbisModel> m_models;
|
||||
std::vector<IbisPackageModel> m_packageModels;
|
||||
std::vector<IbisBoardDescription> m_boardDescriptions;
|
||||
};
|
||||
|
||||
|
||||
@ -676,7 +720,8 @@ enum class IBIS_PARSER_CONTINUE
|
||||
VT_TABLE,
|
||||
RAMP,
|
||||
WAVEFORM,
|
||||
PACKAGEMODEL_PINS
|
||||
PACKAGEMODEL_PINS,
|
||||
ADDSUBMODEL
|
||||
};
|
||||
|
||||
enum class IBIS_PARSER_CONTEXT
|
||||
@ -687,6 +732,7 @@ enum class IBIS_PARSER_CONTEXT
|
||||
MODEL,
|
||||
PACKAGEMODEL,
|
||||
PACKAGEMODEL_MODELDATA,
|
||||
BOARD_DESCRIPTION,
|
||||
END
|
||||
};
|
||||
|
||||
@ -709,11 +755,12 @@ public:
|
||||
int m_lineIndex = 0;
|
||||
int m_lineLength = 0;
|
||||
|
||||
IbisFile m_ibisFile;
|
||||
IbisComponent* m_currentComponent = nullptr;
|
||||
IbisModelSelector* m_currentModelSelector = nullptr;
|
||||
IbisModel* m_currentModel = nullptr;
|
||||
IbisPackageModel* m_currentPackageModel = nullptr;
|
||||
IbisFile m_ibisFile;
|
||||
IbisComponent* m_currentComponent = nullptr;
|
||||
IbisBoardDescription* m_currentBoardDescription = nullptr;
|
||||
IbisModelSelector* m_currentModelSelector = nullptr;
|
||||
IbisModel* m_currentModel = nullptr;
|
||||
IbisPackageModel* m_currentPackageModel = nullptr;
|
||||
std::shared_ptr<IBIS_MATRIX> m_currentMatrix = nullptr;
|
||||
int m_currentMatrixRow = 0;
|
||||
int m_currentMatrixRowIndex = 0;
|
||||
@ -756,35 +803,36 @@ private:
|
||||
* @return True in case of success
|
||||
*/
|
||||
bool parseComponent( std::string& aKeyword );
|
||||
|
||||
/** @brief Parse a single keyword in the component context
|
||||
*
|
||||
* @param aKeyword Keyword
|
||||
* @return True in case of success
|
||||
*/
|
||||
bool parseModelSelector( std::string& aKeyword );
|
||||
|
||||
/** @brief Parse a single keyword in the model selector context
|
||||
*
|
||||
* @param aKeyword Keyword
|
||||
* @return True in case of success
|
||||
*/
|
||||
bool parseModel( std::string& aKeyword );
|
||||
|
||||
bool parseModelSelector( std::string& aKeyword );
|
||||
/** @brief Parse a single keyword in the model context
|
||||
*
|
||||
* @param aKeyword Keyword
|
||||
* @return True in case of success
|
||||
*/
|
||||
bool parsePackageModel( std::string& aKeyword );
|
||||
|
||||
bool parseModel( std::string& aKeyword );
|
||||
/** @brief Parse a single keyword in the package model context
|
||||
*
|
||||
* @param aKeyword Keyword
|
||||
* @return True in case of success
|
||||
*/
|
||||
bool parsePackageModel( std::string& aKeyword );
|
||||
/** @brief Parse a single keyword in the package model model data context
|
||||
*
|
||||
* @param aKeyword Keyword
|
||||
* @return True in case of success
|
||||
*/
|
||||
bool parsePackageModelModelData( std::string& );
|
||||
|
||||
/** @brief Parse a single keyword in the board description context
|
||||
*
|
||||
* @param aKeyword Keyword
|
||||
* @return True in case of success
|
||||
*/
|
||||
bool parseBoardDescription( std::string& aKeyword );
|
||||
/** @brief Parse a double according to the ibis standard
|
||||
*
|
||||
* @param aDest Where the double should be stored
|
||||
@ -844,6 +892,7 @@ private:
|
||||
bool readModelSelector();
|
||||
bool readModel();
|
||||
bool readPackageModelPins();
|
||||
bool readAddSubmodel();
|
||||
|
||||
/** @brief Ibis can change the character used for comments */
|
||||
bool changeCommentChar();
|
||||
@ -853,4 +902,4 @@ private:
|
||||
IBIS_PARSER_CONTEXT m_context = IBIS_PARSER_CONTEXT::HEADER;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -542,7 +542,8 @@ void DRC_ENGINE::compileRules()
|
||||
}
|
||||
|
||||
if( error_semaphore.HasMessageOfSeverity( RPT_SEVERITY_ERROR ) )
|
||||
THROW_PARSE_ERROR( wxT( "Parse error" ), rule->m_Name, rule->m_Condition->GetExpression(), 0, 0 );
|
||||
THROW_PARSE_ERROR( wxT( "Parse error" ), rule->m_Name,
|
||||
TO_UTF8( rule->m_Condition->GetExpression() ), 0, 0 );
|
||||
|
||||
for( const DRC_CONSTRAINT& constraint : rule->m_Constraints )
|
||||
{
|
||||
|
@ -61,16 +61,16 @@ C_pkg 1m 0.8m 2m
|
||||
4 5 150mV -1ns 0ns -2ns
|
||||
6 7 150mV -1ns 0ns -2ns
|
||||
|
||||
[Series Pin Mapping] pin_2 model_name function_table_group
|
||||
|
|
||||
4 5 PinSeries 1
|
||||
6 7 PinSeries 2
|
||||
#[Series Pin Mapping] pin_2 model_name function_table_group
|
||||
#
|
||||
# 4 5 PinSeries 1
|
||||
# 6 7 PinSeries 2
|
||||
|
||||
[Series Switch Groups]
|
||||
On 4 5 /
|
||||
Off 4 5 /
|
||||
On 4 5 6 7 /
|
||||
Off 4 5 6 7 /
|
||||
#[Series Switch Groups]
|
||||
#On 4 5 /
|
||||
#Off 4 5 /
|
||||
#On 4 5 6 7 /
|
||||
#Off 4 5 6 7 /
|
||||
|
||||
|
||||
[Model] Input
|
||||
@ -87,7 +87,7 @@ Vref = 0
|
||||
C_comp 10.0pF 8.0pF 15.0pF
|
||||
|
||||
[Model Spec]
|
||||
| Subparameter typ min max
|
||||
# Subparameter typ min max
|
||||
Vinh 3.5 3.15 3.85
|
||||
Vinl 1.5 1.35 1.65
|
||||
Vinh+ 2.0 NA NA | Overrides the
|
||||
@ -105,19 +105,19 @@ Pulse_time 3n NA NA | Pulse_time
|
||||
Vmeas 3.68 3.18 4.68 | A 5 volt PECL
|
||||
|
||||
[Add Submodel]
|
||||
| Submodel_name Mode
|
||||
# Submodel_name Mode
|
||||
Bus_Hold_1 Non-Driving
|
||||
Dynamic_clamp_1 All
|
||||
|
||||
[Driver Schedule]
|
||||
| Model_name Rise_on_dly Rise_off_dly Fall_on_dly Fall_off_dly
|
||||
# Model_name Rise_on_dly Rise_off_dly Fall_on_dly Fall_off_dly
|
||||
MODEL_OUT 0.0ns NA 0.0ns NA
|
||||
M_O_SOURCE1 0.5ns NA 0.5ns NA
|
||||
| low (high-Z) to high high to low (high-Z)
|
||||
# low (high-Z) to high high to low (high-Z)
|
||||
M_O_SOURCE2 0.5n 1.5n NA NA
|
||||
| low to high to low low (high-Z)
|
||||
# low to high to low low (high-Z)
|
||||
M_O_DRAIN1 1.0n NA 1.5n NA
|
||||
| low to high (high-Z) high (high-Z) to low
|
||||
# low to high (high-Z) high (high-Z) to low
|
||||
M_O_DRAIN2 NA NA 1.5n 2.0n
|
||||
| high (high-Z) high to low to high
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user