#ifndef VHPI_USER_H
#define VHPI_USER_H
#include <stddef.h>
#include <stdarg.h>
#if defined(_MSC_VER)
typedef unsigned __int64 uint64_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int8 uint8_t;
typedef signed __int64 int64_t;
typedef signed __int32 int32_t;
typedef signed __int8 int8_t;
#elif defined(__MINGW32__)
#include <stdint.h>
#elif defined(__linux)
#include <inttypes.h>
#else
#include <sys/types.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(8)
#if defined(WIN32) || defined(WIN64)
#ifndef PLI_DLLISPEC
#define PLI_DLLISPEC __declspec(dllimport)
#define VHPI_USER_DEFINED_DLLISPEC 1
#endif
#ifndef PLI_DLLESPEC
#define PLI_DLLESPEC __declspec(dllexport)
#define VHPI_USER_DEFINED_DLLESPEC 1
#endif
#else
#ifndef PLI_DLLISPEC
#define PLI_DLLISPEC
#endif
#ifndef PLI_DLLESPEC
#define PLI_DLLESPEC
#endif
#endif
#ifndef PLI_EXTERN
#define PLI_EXTERN
#endif
#ifndef PLI_VEXTERN
#define PLI_VEXTERN extern
#endif
#ifndef PLI_PROTOTYPES
#define PLI_PROTOTYPES
#define XXTERN PLI_EXTERN PLI_DLLISPEC
#define EETERN PLI_EXTERN PLI_DLLESPEC
#endif
#ifndef VHPI_TYPES
#define VHPI_TYPES
typedef uint32_t *vhpiHandleT;
typedef uint32_t vhpiEnumT;
typedef uint8_t vhpiSmallEnumT;
typedef uint32_t vhpiIntT;
typedef uint64_t vhpiLongIntT;
typedef char vhpiCharT;
typedef double vhpiRealT;
typedef uint32_t vhpiSmallPhysT;
typedef struct vhpiPhysS
{
int32_t high;
uint32_t low;
} vhpiPhysT;
#ifndef PLI_TYPES
#define PLI_TYPES
typedef int PLI_INT32;
typedef unsigned int PLI_UINT32;
typedef short PLI_INT16;
typedef unsigned short PLI_UINT16;
typedef char PLI_BYTE8;
typedef unsigned char PLI_UBYTE8;
typedef void PLI_VOID;
#endif
typedef struct vhpiTimeS
{
uint32_t high;
uint32_t low;
} vhpiTimeT;
typedef enum
{
vhpiBinStrVal = 1,
vhpiOctStrVal = 2,
vhpiDecStrVal = 3,
vhpiHexStrVal = 4,
vhpiEnumVal = 5,
vhpiIntVal = 6,
vhpiLogicVal = 7,
vhpiRealVal = 8,
vhpiStrVal = 9,
vhpiCharVal = 10,
vhpiTimeVal = 11,
vhpiPhysVal = 12,
vhpiObjTypeVal = 13,
vhpiPtrVal = 14,
vhpiEnumVecVal = 15,
vhpiIntVecVal = 16,
vhpiLogicVecVal = 17,
vhpiRealVecVal = 18,
vhpiTimeVecVal = 19,
vhpiPhysVecVal = 20,
vhpiPtrVecVal = 21,
vhpiRawDataVal = 22,
vhpiSmallEnumVal = 23,
vhpiSmallEnumVecVal = 24,
vhpiLongIntVal = 25,
vhpiLongIntVecVal = 26,
vhpiSmallPhysVal = 27,
vhpiSmallPhysVecVal = 28
#ifdef VHPIEXTEND_VAL_FORMATS
VHPIEXTEND_VAL_FORMATS
#endif
} vhpiFormatT;
typedef struct vhpiValueS
{
vhpiFormatT format;
#ifndef IUS
size_t bufSize;
#else
int32_t bufSize;
#endif
int32_t numElems;
vhpiPhysT unit;
union
{
vhpiEnumT enumv, *enumvs;
vhpiSmallEnumT smallenumv, *smallenumvs;
vhpiIntT intg, *intgs;
vhpiLongIntT longintg, *longintgs;
vhpiRealT real, *reals;
vhpiSmallPhysT smallphys, *smallphyss;
vhpiPhysT phys, *physs;
vhpiTimeT time, *times;
vhpiCharT ch, *str;
void *ptr, **ptrs;
} value;
} vhpiValueT;
#endif
#ifndef IUS
#define vhpiUndefined -1
#else
#define vhpiUndefined 1000
#endif
typedef enum
{
vhpiAccessTypeDeclK = 1001,
vhpiAggregateK = 1002,
vhpiAliasDeclK = 1003,
vhpiAllK = 1004,
vhpiAllocatorK = 1005,
vhpiAnyCollectionK = 1006,
vhpiArchBodyK = 1007,
vhpiArgvK = 1008,
vhpiArrayTypeDeclK = 1009,
vhpiAssertStmtK = 1010,
vhpiAssocElemK = 1011,
vhpiAttrDeclK = 1012,
vhpiAttrSpecK = 1013,
vhpiBinaryExprK = 1014,
vhpiBitStringLiteralK = 1015,
vhpiBlockConfigK = 1016,
vhpiBlockStmtK = 1017,
vhpiBranchK = 1018,
vhpiCallbackK = 1019,
vhpiCaseStmtK = 1020,
vhpiCharLiteralK = 1021,
vhpiCompConfigK = 1022,
vhpiCompDeclK = 1023,
vhpiCompInstStmtK = 1024,
vhpiCondSigAssignStmtK = 1025,
vhpiCondWaveformK = 1026,
vhpiConfigDeclK = 1027,
vhpiConstDeclK = 1028,
vhpiConstParamDeclK = 1029,
vhpiConvFuncK = 1030,
vhpiDerefObjK = 1031,
vhpiDisconnectSpecK = 1032,
vhpiDriverK = 1033,
vhpiDriverCollectionK = 1034,
vhpiElemAssocK = 1035,
vhpiElemDeclK = 1036,
vhpiEntityClassEntryK = 1037,
vhpiEntityDeclK = 1038,
vhpiEnumLiteralK = 1039,
vhpiEnumRangeK = 1040,
vhpiEnumTypeDeclK = 1041,
vhpiExitStmtK = 1042,
vhpiFileDeclK = 1043,
vhpiFileParamDeclK = 1044,
vhpiFileTypeDeclK = 1045,
vhpiFloatRangeK = 1046,
vhpiFloatTypeDeclK = 1047,
vhpiForGenerateK = 1048,
vhpiForLoopK = 1049,
vhpiForeignfK = 1050,
vhpiFuncCallK = 1051,
vhpiFuncDeclK = 1052,
vhpiGenericDeclK = 1053,
vhpiGroupDeclK = 1054,
vhpiGroupTempDeclK = 1055,
vhpiIfGenerateK = 1056,
vhpiIfStmtK = 1057,
vhpiInPortK = 1058,
vhpiIndexedNameK = 1059,
vhpiIntLiteralK = 1060,
vhpiIntRangeK = 1061,
vhpiIntTypeDeclK = 1062,
vhpiIteratorK = 1063,
vhpiLibraryDeclK = 1064,
vhpiLoopStmtK = 1065,
vhpiNextStmtK = 1066,
vhpiNullLiteralK = 1067,
vhpiNullStmtK = 1068,
vhpiOperatorK = 1069,
vhpiOthersK = 1070,
vhpiOutPortK = 1071,
vhpiPackBodyK = 1072,
vhpiPackDeclK = 1073,
vhpiPackInstK = 1074,
vhpiParamAttrNameK = 1075,
vhpiPhysLiteralK = 1076,
vhpiPhysRangeK = 1077,
vhpiPhysTypeDeclK = 1078,
vhpiPortDeclK = 1079,
vhpiProcCallStmtK = 1080,
vhpiProcDeclK = 1081,
vhpiProcessStmtK = 1082,
vhpiProtectedTypeK = 1083,
vhpiProtectedTypeBodyK = 1084,
vhpiProtectedTypeDeclK = 1085,
vhpiRealLiteralK = 1086,
vhpiRecordTypeDeclK = 1087,
vhpiReportStmtK = 1088,
vhpiReturnStmtK = 1089,
vhpiRootInstK = 1090,
vhpiSelectSigAssignStmtK = 1091,
vhpiSelectWaveformK = 1092,
vhpiSelectedNameK = 1093,
vhpiSigDeclK = 1094,
vhpiSigParamDeclK = 1095,
vhpiSimpAttrNameK = 1096,
vhpiSimpleSigAssignStmtK = 1097,
vhpiSliceNameK = 1098,
vhpiStringLiteralK = 1099,
vhpiSubpBodyK = 1100,
vhpiSubtypeDeclK = 1101,
vhpiSubtypeIndicK = 1102,
vhpiToolK = 1103,
vhpiTransactionK = 1104,
vhpiTypeConvK = 1105,
vhpiUnaryExprK = 1106,
vhpiUnitDeclK = 1107,
vhpiUserAttrNameK = 1108,
vhpiVarAssignStmtK = 1109,
vhpiVarDeclK = 1110,
vhpiVarParamDeclK = 1111,
vhpiWaitStmtK = 1112,
vhpiWaveformElemK = 1113,
vhpiWhileLoopK = 1114,
vhpiQualifiedExprK = 1115,
#ifndef IUS
vhpiUseClauseK = 1116,
#else
vhpiUseClauseK = 1200,
#endif
#ifdef VHPIEXTEND_CLASSES
VHPIEXTEND_CLASSES
#endif
vhpiVerilog = 1117,
vhpiEdifUnit = 1118,
vhpiCollectionK = 1119,
vhpiVHDL = 1120,
vhpiSystemC = 1121
} vhpiClassKindT;
typedef enum
{
vhpiAbstractLiteral = 1301,
vhpiActual = 1302,
vhpiAll = 1303,
vhpiAttrDecl = 1304,
vhpiAttrSpec = 1305,
vhpiBaseType = 1306,
vhpiBaseUnit = 1307,
vhpiBasicSignal = 1308,
vhpiBlockConfig = 1309,
vhpiCaseExpr = 1310,
vhpiCondExpr = 1311,
vhpiConfigDecl = 1312,
vhpiConfigSpec = 1313,
vhpiConstraint = 1314,
vhpiContributor = 1315,
vhpiCurCallback = 1316,
vhpiCurEqProcess = 1317,
vhpiCurStackFrame = 1318,
vhpiDerefObj = 1319,
vhpiDecl = 1320,
vhpiDesignUnit = 1321,
vhpiDownStack = 1322,
vhpiElemSubtype = 1323,
vhpiEntityAspect = 1324,
vhpiEntityDecl = 1325,
vhpiEqProcessStmt = 1326,
vhpiExpr = 1327,
vhpiFormal = 1328,
vhpiFuncDecl = 1329,
vhpiGroupTempDecl = 1330,
vhpiGuardExpr = 1331,
vhpiGuardSig = 1332,
vhpiImmRegion = 1333,
vhpiInPort = 1334,
vhpiInitExpr = 1335,
vhpiIterScheme = 1336,
vhpiLeftExpr = 1337,
vhpiLexicalScope = 1338,
vhpiLhsExpr = 1339,
vhpiLocal = 1340,
vhpiLogicalExpr = 1341,
vhpiName = 1342,
vhpiOperator = 1343,
vhpiOthers = 1344,
vhpiOutPort = 1345,
vhpiParamDecl = 1346,
vhpiParamExpr = 1347,
vhpiParent = 1348,
vhpiPhysLiteral = 1349,
vhpiPrefix = 1350,
vhpiPrimaryUnit = 1351,
vhpiProtectedTypeBody = 1352,
vhpiProtectedTypeDecl = 1353,
vhpiRejectTime = 1354,
vhpiReportExpr = 1355,
vhpiResolFunc = 1356,
vhpiReturnExpr = 1357,
vhpiReturnTypeMark = 1358,
vhpiRhsExpr = 1359,
vhpiRightExpr = 1360,
vhpiRootInst = 1361,
vhpiSelectExpr = 1362,
vhpiSeverityExpr = 1363,
vhpiSimpleName = 1364,
vhpiSubpBody = 1365,
vhpiSubpDecl = 1366,
vhpiSubtype = 1367,
vhpiSuffix = 1368,
vhpiTimeExpr = 1369,
vhpiTimeOutExpr = 1370,
vhpiTool = 1371,
vhpiType = 1372,
vhpiTypeMark = 1373,
vhpiTypespec ,
vhpiUnitDecl = 1374,
vhpiUpStack = 1375,
vhpiUpperRegion = 1376,
vhpiUse = 1377,
vhpiValExpr = 1378,
vhpiValSubtype = 1379,
vhpiElemType = 1380,
vhpiFirstNamedType = 1381,
vhpiReturnType = 1382,
vhpiValType = 1383,
vhpiCurRegion = 1384
#ifdef VHPIEXTEND_ONE_METHODS
VHPIEXTEND_ONE_METHODS
#endif
} vhpiOneToOneT;
typedef enum
{
vhpiAliasDecls = 1501,
vhpiArgvs = 1502,
vhpiAttrDecls = 1503,
vhpiAttrSpecs = 1504,
vhpiBasicSignals = 1505,
vhpiBlockStmts = 1506,
vhpiBranchs = 1507,
vhpiChoices = 1509,
vhpiCompInstStmts = 1510,
vhpiCondExprs = 1511,
vhpiCondWaveforms = 1512,
vhpiConfigItems = 1513,
vhpiConfigSpecs = 1514,
vhpiConstDecls = 1515,
vhpiConstraints = 1516,
vhpiContributors = 1517,
vhpiDecls = 1519,
vhpiDepUnits = 1520,
vhpiDesignUnits = 1521,
vhpiDrivenSigs = 1522,
vhpiDrivers = 1523,
vhpiElemAssocs = 1524,
vhpiEntityClassEntrys = 1525,
vhpiEntityDesignators = 1526,
vhpiEnumLiterals = 1527,
vhpiForeignfs = 1528,
vhpiGenericAssocs = 1529,
vhpiGenericDecls = 1530,
vhpiIndexExprs = 1531,
vhpiIndexedNames = 1532,
vhpiInternalRegions = 1533,
vhpiMembers = 1534,
vhpiPackInsts = 1535,
vhpiParamAssocs = 1536,
vhpiParamDecls = 1537,
vhpiPortAssocs = 1538,
vhpiPortDecls = 1539,
vhpiRecordElems = 1540,
vhpiSelectWaveforms = 1541,
vhpiSelectedNames = 1542,
vhpiSensitivitys = 1543,
vhpiSeqStmts = 1544,
vhpiSigAttrs = 1545,
vhpiSigDecls = 1546,
vhpiSigNames = 1547,
vhpiSignals = 1548,
vhpiSpecNames = 1549,
vhpiSpecs = 1550,
vhpiStmts = 1551,
vhpiTransactions = 1552,
vhpiTypeMarks = 1553,
vhpiUnitDecls = 1554,
vhpiUses = 1555,
vhpiVarDecls = 1556,
vhpiWaveformElems = 1557,
vhpiLibraryDecls = 1558,
vhpiLocalLoads = 1559,
vhpiOptimizedLoads = 1560,
vhpiTypes = 1561,
#ifndef IUS
vhpiUseClauses = 1562,
#else
vhpiUseClauses = 1650,
#endif
#ifdef VHPIEXTEND_MANY_METHODS
VHPIEXTEND_MANY_METHODS
#endif
vhpiCallbacks = 1563,
vhpiCurRegions = 1564
} vhpiOneToManyT;
typedef enum
{
vhpiAccessP = 1001,
vhpiArgcP = 1002,
vhpiAttrKindP = 1003,
vhpiBaseIndexP = 1004,
vhpiBeginLineNoP = 1005,
vhpiEndLineNoP = 1006,
vhpiEntityClassP = 1007,
vhpiForeignKindP = 1008,
vhpiFrameLevelP = 1009,
vhpiGenerateIndexP = 1010,
vhpiIntValP = 1011,
vhpiIsAnonymousP = 1012,
vhpiIsBasicP = 1013,
vhpiIsCompositeP = 1014,
vhpiIsDefaultP = 1015,
vhpiIsDeferredP = 1016,
vhpiIsDiscreteP = 1017,
vhpiIsForcedP = 1018,
vhpiIsForeignP = 1019,
vhpiIsGuardedP = 1020,
vhpiIsImplicitDeclP = 1021,
vhpiIsInvalidP = 1022,
vhpiIsLocalP = 1023,
vhpiIsNamedP = 1024,
vhpiIsNullP = 1025,
vhpiIsOpenP = 1026,
vhpiIsPLIP = 1027,
vhpiIsPassiveP = 1028,
vhpiIsPostponedP = 1029,
vhpiIsProtectedTypeP = 1030,
vhpiIsPureP = 1031,
vhpiIsResolvedP = 1032,
vhpiIsScalarP = 1033,
vhpiIsSeqStmtP = 1034,
vhpiIsSharedP = 1035,
vhpiIsTransportP = 1036,
vhpiIsUnaffectedP = 1037,
vhpiIsUnconstrainedP = 1038,
vhpiIsUninstantiatedP = 1039,
vhpiIsUpP = 1040,
vhpiIsVitalP = 1041,
vhpiIteratorTypeP = 1042,
vhpiKindP = 1043,
vhpiLeftBoundP = 1044,
vhpiLevelP = 1045,
vhpiLineNoP = 1046,
vhpiLineOffsetP = 1047,
vhpiLoopIndexP = 1048,
vhpiModeP = 1049,
vhpiNumDimensionsP = 1050,
vhpiNumFieldsP = 1051,
vhpiNumGensP = 1052,
vhpiNumLiteralsP = 1053,
vhpiNumMembersP = 1054,
vhpiNumParamsP = 1055,
vhpiNumPortsP = 1056,
vhpiOpenModeP = 1057,
vhpiPhaseP = 1058,
vhpiPositionP = 1059,
vhpiPredefAttrP = 1060,
vhpiReasonP = 1062,
vhpiRightBoundP = 1063,
vhpiSigKindP = 1064,
vhpiSizeP = 1065,
vhpiStartLineNoP = 1066,
vhpiStateP = 1067,
vhpiStaticnessP = 1068,
vhpiVHDLversionP = 1069,
vhpiIdP = 1070,
vhpiCapabilitiesP = 1071,
#ifdef VHPIEXTEND_INT_PROPERTIES
VHPIEXTEND_INT_PROPERTIES
#endif
vhpiIsStdLogicP = 1072,
vhpiIsStdULogicP = 1073,
vhpiIsStdLogicVectorP = 1074,
vhpiIsStdULogicVectorP = 1075,
#
vhpiLanguageP = 1200
} vhpiIntPropertyT;
typedef enum
{
vhpiCaseNameP = 1301,
vhpiCompNameP = 1302,
vhpiDefNameP = 1303,
vhpiFileNameP = 1304,
vhpiFullCaseNameP = 1305,
vhpiFullNameP = 1306,
vhpiKindStrP = 1307,
vhpiLabelNameP = 1308,
vhpiLibLogicalNameP = 1309,
vhpiLibPhysicalNameP = 1310,
vhpiLogicalNameP = 1311,
vhpiLoopLabelNameP = 1312,
vhpiNameP = 1313,
vhpiOpNameP = 1314,
vhpiStrValP = 1315,
vhpiToolVersionP = 1316,
vhpiUnitNameP = 1317,
vhpiSaveRestartLocationP = 1318,
vhpiFullVlogNameP = 1500,
vhpiFullVHDLNameP = 1501,
vhpiFullLSNameP = 1502,
vhpiFullLSCaseNameP = 1503
#ifdef VHPIEXTEND_STR_PROPERTIES
VHPIEXTEND_STR_PROPERTIES
#endif
} vhpiStrPropertyT;
typedef enum
{
vhpiFloatLeftBoundP = 1601,
vhpiFloatRightBoundP = 1602,
vhpiRealValP = 1603
#ifdef VHPIEXTEND_REAL_PROPERTIES
VHPIEXTEND_REAL_PROPERTIES
#endif
} vhpiRealPropertyT;
typedef enum
{
vhpiPhysLeftBoundP = 1651,
vhpiPhysPositionP = 1652,
vhpiPhysRightBoundP = 1653,
vhpiPhysValP = 1654,
vhpiPrecisionP = 1655,
vhpiSimTimeUnitP = 1656,
vhpiResolutionLimitP = 1657
#ifdef VHPIEXTEND_PHYS_PROPERTIES
VHPIEXTEND_PHYS_PROPERTIES
#endif
} vhpiPhysPropertyT;
typedef enum
{
vhpiProvidesHierarchy = 1,
vhpiProvidesStaticAccess = 2,
vhpiProvidesConnectivity = 4,
vhpiProvidesPostAnalysis = 8,
vhpiProvidesForeignModel = 16,
vhpiProvidesAdvancedForeignModel = 32,
vhpiProvidesSaveRestart = 64,
vhpiProvidesReset = 128,
vhpiProvidesDebugRuntime = 256,
vhpiProvidesAdvancedDebugRuntime = 512,
vhpiProvidesDynamicElab = 1024
} vhpiCapabibilityT;
typedef enum
{
vhpiInOpen = 1001,
vhpiOutOpen = 1002,
vhpiReadOpen = 1003,
vhpiWriteOpen = 1004,
vhpiAppendOpen = 1005
} vhpiOpenModeT;
typedef enum
{
vhpiInMode = 1001,
vhpiOutMode = 1002,
vhpiInoutMode = 1003,
vhpiBufferMode = 1004,
vhpiLinkageMode = 1005
} vhpiModeT;
typedef enum
{
vhpiRegister = 1001,
vhpiBus = 1002,
vhpiNormal = 1003
} vhpiSigKindT;
typedef enum
{
vhpiLocallyStatic = 1001,
vhpiGloballyStatic = 1002,
vhpiDynamic = 1003
} vhpiStaticnessT;
typedef enum
{
vhpiActivePA = 1001,
vhpiAscendingPA = 1002,
vhpiBasePA = 1003,
vhpiDelayedPA = 1004,
vhpiDrivingPA = 1005,
vhpiDriving_valuePA = 1006,
vhpiEventPA = 1007,
vhpiHighPA = 1008,
vhpiImagePA = 1009,
vhpiInstance_namePA = 1010,
vhpiLast_activePA = 1011,
vhpiLast_eventPA = 1012,
vhpiLast_valuePA = 1013,
vhpiLeftPA = 1014,
vhpiLeftofPA = 1015,
vhpiLengthPA = 1016,
vhpiLowPA = 1017,
vhpiPath_namePA = 1018,
vhpiPosPA = 1019,
vhpiPredPA = 1020,
vhpiQuietPA = 1021,
vhpiRangePA = 1022,
vhpiReverse_rangePA = 1023,
vhpiRightPA = 1024,
vhpiRightofPA = 1025,
vhpiSimple_namePA = 1026,
vhpiStablePA = 1027,
vhpiSuccPA = 1028,
vhpiTransactionPA = 1029,
vhpiValPA = 1030,
vhpiValuePA = 1031
} vhpiPredefAttrT;
typedef enum
{
vhpiFunctionAK = 1,
vhpiRangeAK = 2,
vhpiSignalAK = 3,
vhpiTypeAK = 4,
vhpiValueAK = 5
#ifdef VHPIEXTEND_INT_ATTR
VHPI_EXTEND_INT_ATTR
#endif
} vhpiAttrKindT;
typedef enum
{
vhpiEntityEC = 1001,
vhpiArchitectureEC = 1002,
vhpiConfigurationEC = 1003,
vhpiProcedureEC = 1004,
vhpiFunctionEC = 1005,
vhpiPackageEC = 1006,
vhpiTypeEC = 1007,
vhpiSubtypeEC = 1008,
vhpiConstantEC = 1009,
vhpiSignalEC = 1010,
vhpiVariableEC = 1011,
vhpiComponentEC = 1012,
vhpiLabelEC = 1013,
vhpiLiteralEC = 1014,
vhpiUnitsEC = 1015,
vhpiFileEC = 1016,
vhpiGroupEC = 1017
} vhpiEntityClassT;
typedef enum
{
vhpiRead = 1,
vhpiWrite = 2,
vhpiConnectivity = 4,
vhpiNoAccess = 8
} vhpiAccessT;
typedef enum
{
vhpiEnable,
vhpiDisable,
vhpiMature
} vhpiStateT;
typedef enum
{
vhpiDirect,
vhpiComp,
vhpiConfig
} vhpiCompInstKindT;
PLI_VEXTERN PLI_DLLISPEC const vhpiPhysT vhpiFS;
PLI_VEXTERN PLI_DLLISPEC const vhpiPhysT vhpiPS;
PLI_VEXTERN PLI_DLLISPEC const vhpiPhysT vhpiNS;
PLI_VEXTERN PLI_DLLISPEC const vhpiPhysT vhpiUS;
PLI_VEXTERN PLI_DLLISPEC const vhpiPhysT vhpiMS;
PLI_VEXTERN PLI_DLLISPEC const vhpiPhysT vhpiS;
PLI_VEXTERN PLI_DLLISPEC const vhpiPhysT vhpiMN;
PLI_VEXTERN PLI_DLLISPEC const vhpiPhysT vhpiHR;
#define vhpiU 0
#define vhpiX 1
#define vhpi0 2
#define vhpi1 3
#define vhpiZ 4
#define vhpiW 5
#define vhpiL 6
#define vhpiH 7
#define vhpiDontCare 8
#define vhpibit0 0
#define vhpibit1 1
#define vhpiFalse 0
#define vhpiTrue 1
typedef enum
{
vhpiRegistrationPhase = 1,
vhpiAnalysisPhase = 2,
vhpiElaborationPhase = 3,
vhpiInitializationPhase = 4,
vhpiSimulationPhase = 5,
vhpiTerminationPhase = 6,
vhpiSavePhase = 7,
vhpiRestartPhase = 8,
vhpiResetPhase = 9
} vhpiPhaseT ;
typedef enum
{
vhpiNote = 1,
vhpiWarning = 2,
vhpiError = 3,
vhpiFailure = 6,
vhpiSystem = 4,
vhpiInternal = 5
} vhpiSeverityT;
typedef struct vhpiErrorInfoS
{
vhpiSeverityT severity;
char *message;
char *str;
char *file;
int32_t line;
} vhpiErrorInfoT;
typedef struct vhpiCbDataS
{
int32_t reason;
void (*cb_rtn) (const struct vhpiCbDataS *);
vhpiHandleT obj;
vhpiTimeT *time;
vhpiValueT *value;
void *user_data;
} vhpiCbDataT;
#define vhpiCbValueChange 1001
#define vhpiCbForce 1002
#define vhpiCbRelease 1003
#define vhpiCbTransaction 1004
#define vhpiCbStmt 1005
#define vhpiCbResume 1006
#define vhpiCbSuspend 1007
#define vhpiCbStartOfSubpCall 1008
#define vhpiCbEndOfSubpCall 1009
#define vhpiCbAfterDelay 1010
#define vhpiCbRepAfterDelay 1011
#define vhpiCbNextTimeStep 1012
#define vhpiCbRepNextTimeStep 1013
#define vhpiCbStartOfNextCycle 1014
#define vhpiCbRepStartOfNextCycle 1015
#define vhpiCbStartOfProcesses 1016
#define vhpiCbRepStartOfProcesses 1017
#define vhpiCbEndOfProcesses 1018
#define vhpiCbRepEndOfProcesses 1019
#define vhpiCbLastKnownDeltaCycle 1020
#define vhpiCbRepLastKnownDeltaCycle 1021
#define vhpiCbStartOfPostponed 1022
#define vhpiCbRepStartOfPostponed 1023
#define vhpiCbEndOfTimeStep 1024
#define vhpiCbRepEndOfTimeStep 1025
#define vhpiCbStartOfTool 1026
#define vhpiCbEndOfTool 1027
#define vhpiCbStartOfAnalysis 1028
#define vhpiCbEndOfAnalysis 1029
#define vhpiCbStartOfElaboration 1030
#define vhpiCbEndOfElaboration 1031
#define vhpiCbStartOfInitialization 1032
#define vhpiCbEndOfInitialization 1033
#define vhpiCbStartOfSimulation 1034
#define vhpiCbEndOfSimulation 1035
#define vhpiCbQuiescense 1036
#define vhpiCbPLIError 1037
#define vhpiCbStartOfSave 1038
#define vhpiCbEndOfSave 1039
#define vhpiCbStartOfRestart 1040
#define vhpiCbEndOfRestart 1041
#define vhpiCbStartOfReset 1042
#define vhpiCbEndOfReset 1043
#define vhpiCbEnterInteractive 1044
#define vhpiCbExitInteractive 1045
#define vhpiCbSigInterrupt 1046
#define vhpiCbTimeOut 1047
#define vhpiCbRepTimeOut 1048
#define vhpiCbSensitivity 1049
#define vhpiReturnCb 0x00000001
#define vhpiDisableCb 0x00000010
typedef enum
{
vhpiRestoreAll = 1,
vhpiRestoreUserData = 2,
vhpiRestoreHandles = 4,
vhpiRestoreCallbacks = 8
} vhpiAutomaticRestoreT;
XXTERN int vhpi_assert (vhpiSeverityT severity,
const char *formatmsg,
...);
XXTERN vhpiHandleT vhpi_register_cb (vhpiCbDataT *cb_data_p,
int32_t flags);
XXTERN int vhpi_remove_cb (vhpiHandleT cb_obj);
XXTERN int vhpi_disable_cb (vhpiHandleT cb_obj);
XXTERN int vhpi_enable_cb (vhpiHandleT cb_obj);
XXTERN int vhpi_get_cb_info (vhpiHandleT object,
vhpiCbDataT *cb_data_p);
XXTERN int vhpi_sens_first (vhpiValueT *sens);
XXTERN int vhpi_sens_zero (vhpiValueT *sens);
XXTERN int vhpi_sens_clr (int obj,
vhpiValueT *sens);
XXTERN int vhpi_sens_set (int obj,
vhpiValueT *sens);
XXTERN int vhpi_sens_isset (int obj,
vhpiValueT *sens);
#define VHPI_SENS_ZERO(sens) vhpi_sens_zero(sens)
#define VHPI_SENS_SET(obj, sens) vhpi_sens_set(obj, sens)
#define VHPI_SENS_CLR(obj, sens) vhpi_sens_clr(obj, sens)
#define VHPI_SENS_ISSET(obj, sens) vhpi_sens_isset(obj, sens)
#define VHPI_SENS_FIRST(sens) vhpi_sens_first(sens)
XXTERN vhpiHandleT vhpi_handle_by_name (const char *name,
vhpiHandleT scope);
XXTERN vhpiHandleT vhpi_handle_by_index (vhpiOneToManyT itRel,
vhpiHandleT parent,
int32_t indx);
XXTERN vhpiHandleT vhpi_handle (vhpiOneToOneT type,
vhpiHandleT referenceHandle);
XXTERN vhpiHandleT vhpi_iterator (vhpiOneToManyT type,
vhpiHandleT referenceHandle);
XXTERN vhpiHandleT vhpi_scan (vhpiHandleT iterator);
XXTERN vhpiIntT vhpi_get (vhpiIntPropertyT property,
vhpiHandleT object);
XXTERN const vhpiCharT * vhpi_get_str (vhpiStrPropertyT property,
vhpiHandleT object);
XXTERN vhpiRealT vhpi_get_real (vhpiRealPropertyT property,
vhpiHandleT object);
XXTERN vhpiPhysT vhpi_get_phys (vhpiPhysPropertyT property,
vhpiHandleT object);
typedef int (*vhpiUserFctT)(void);
XXTERN int vhpi_protected_call (vhpiHandleT varHdl,
vhpiUserFctT userFct,
void *userData);
typedef enum
{
vhpiDeposit,
vhpiDepositPropagate,
vhpiForce,
vhpiForcePropagate,
vhpiRelease,
vhpiSizeConstraint
} vhpiPutValueModeT;
typedef enum
{
vhpiInertial,
vhpiTransport
} vhpiDelayModeT;
XXTERN int vhpi_get_value (vhpiHandleT expr,
vhpiValueT *value_p);
XXTERN int vhpi_put_value (vhpiHandleT object,
vhpiValueT *value_p,
vhpiPutValueModeT flags);
XXTERN int vhpi_schedule_transaction (vhpiHandleT drivHdl,
vhpiValueT *value_p,
uint32_t numValues,
vhpiTimeT *delayp,
vhpiDelayModeT delayMode,
vhpiTimeT *pulseRejp);
XXTERN int vhpi_format_value (const vhpiValueT *in_value_p,
vhpiValueT *out_value_p);
XXTERN void vhpi_get_time (vhpiTimeT *time_p,
long *cycles);
#define vhpiNoActivity -1
XXTERN int vhpi_get_next_time (vhpiTimeT *time_p);
typedef enum
{
vhpiStop = 0,
vhpiFinish = 1,
vhpiReset = 2
#ifdef VHPIEXTEND_CONTROL
VHPIEXTEND_CONTROL
#endif
} vhpiSimControlT;
XXTERN int vhpi_control (vhpiSimControlT command,
...);
XXTERN int vhpi_sim_control (vhpiSimControlT command);
XXTERN int vhpi_printf (const char *format,
...);
XXTERN int vhpi_vprintf (const char *format,
va_list args);
XXTERN int vhpi_is_printable(char ch);
XXTERN int vhpi_compare_handles (vhpiHandleT handle1,
vhpiHandleT handle2);
XXTERN int vhpi_check_error (vhpiErrorInfoT *error_info_p);
XXTERN int vhpi_release_handle (vhpiHandleT object);
XXTERN vhpiHandleT vhpi_create (vhpiClassKindT kind,
vhpiHandleT handle1,
vhpiHandleT handle2);
typedef enum
{
vhpiArchF = 1,
vhpiArchFK = 1,
vhpiFuncF = 2,
vhpiFuncFK = 2,
vhpiProcF = 3,
vhpiProcFK = 3,
vhpiLibF = 4,
vhpiAppF = 5
} vhpiForeignT;
typedef struct vhpiForeignDataS
{
vhpiForeignT kind;
char * libraryName;
char * modelName;
void (*elabf)(const struct vhpiCbDataS *cb_data_p);
void (*execf)(const struct vhpiCbDataS *cb_data_p);
} vhpiForeignDataT;
XXTERN vhpiHandleT vhpi_register_foreignf (vhpiForeignDataT *foreignDatap);
XXTERN int vhpi_get_foreignf_info (vhpiHandleT hdl,
vhpiForeignDataT *foreignDatap);
XXTERN int vhpi_get_foreign_info (vhpiHandleT hdl,
vhpiForeignDataT *foreignDatap);
XXTERN size_t vhpi_get_data (int32_t id,
void *dataLoc,
size_t numBytes);
XXTERN size_t vhpi_put_data (int32_t id,
void *dataLoc,
size_t numBytes);
#ifdef VHPIEXTEND_FUNCTIONS
VHPIEXTEND_FUNCTIONS
#endif
XXTERN vhpiHandleT vhpi_get_cause_instance (vhpiHandleT sigHandle);
XXTERN int vhpi_get_cause (vhpiHandleT sigHandle,
unsigned int** p2MagicNumbersBuffer);
XXTERN int vhpi_get_cause_info (const unsigned int** pn2MagicNumbers,
int nBufLen,
char* pszHierScopeBuf,
int nFilePathBufLen,
char* pszSourceFilePathBuf,
int* pnLineNr);
XXTERN vhpiIntT vhpi_value_size (vhpiHandleT objHdl,
vhpiFormatT format);
typedef void (*vhpiBootstrapFctT)(void);
#undef PLI_EXTERN
#undef PLI_VEXTERN
#ifdef VHPI_USER_DEFINED_DLLISPEC
#undef VHPI_USER_DEFINED_DLLISPEC
#undef PLI_DLLISPEC
#endif
#ifdef VHPI_USER_DEFINED_DLLESPEC
#undef VHPI_USER_DEFINED_DLLESPEC
#undef PLI_DLLESPEC
#endif
#ifdef PLI_PROTOTYPES
#undef PLI_PROTOTYPES
#undef XXTERN
#undef EETERN
#endif
#ifdef __cplusplus
}
#endif
#pragma pack()
#endif