Skip to content

Commit

Permalink
move panama codegen to txt files (#3595)
Browse files Browse the repository at this point in the history
  • Loading branch information
sequencer authored Oct 21, 2023
1 parent 0edda2a commit a9bc4c9
Show file tree
Hide file tree
Showing 8 changed files with 255 additions and 270 deletions.
39 changes: 39 additions & 0 deletions binder/includeConstants.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# enum FIRRTLPortDirection
FIRRTL_PORT_DIR_INPUT
FIRRTL_PORT_DIR_OUTPUT
# enum FIRRTLConvention
FIRRTL_CONVENTION_INTERNAL
FIRRTL_CONVENTION_SCALARIZED
# enum FIRRTLNameKind
FIRRTL_NAME_KIND_DROPPABLE_NAME
FIRRTL_NAME_KIND_INTERESTING_NAME
# enum FIRRTLRUW
FIRRTL_RUW_UNDEFINED
FIRRTL_RUW_OLD
FIRRTL_RUW_NEW
# enum FIRRTLMemDir
FIRRTL_MEM_DIR_INFER
FIRRTL_MEM_DIR_READ
FIRRTL_MEM_DIR_WRITE
FIRRTL_MEM_DIR_READ_WRITE
# enum FirtoolPreserveAggregateMode
FIRTOOL_PRESERVE_AGGREGATE_MODE_NONE
FIRTOOL_PRESERVE_AGGREGATE_MODE_ONE_DIM_VEC
FIRTOOL_PRESERVE_AGGREGATE_MODE_VEC
FIRTOOL_PRESERVE_AGGREGATE_MODE_ALL
# enum FirtoolPreserveValuesMode
FIRTOOL_PRESERVE_VALUES_MODE_NONE
FIRTOOL_PRESERVE_VALUES_MODE_NAMED
FIRTOOL_PRESERVE_VALUES_MODE_ALL
# enum FirtoolBuildMode
FIRTOOL_BUILD_MODE_DEBUG
FIRTOOL_BUILD_MODE_RELEASE
# enum FirtoolRandomKind
FIRTOOL_RANDOM_KIND_NONE
FIRTOOL_RANDOM_KIND_MEM
FIRTOOL_RANDOM_KIND_REG
FIRTOOL_RANDOM_KIND_ALL
# enum FirtoolCompanionMode
FIRTOOL_COMPANION_MODE_BIND
FIRTOOL_COMPANION_MODE_INSTANTIATE
FIRTOOL_COMPANION_MODE_DROP
174 changes: 174 additions & 0 deletions binder/includeFunctions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# MLIR
mlirContextCreate
mlirContextDestroy
mlirGetDialectHandle__firrtl__
mlirGetDialectHandle__chirrtl__
mlirGetDialectHandle__sv__
mlirGetDialectHandle__seq__
mlirDialectHandleLoadDialect
#mlirStringRefCreate inline function cannot be generated
mlirStringRefCreateFromCString
mlirLocationGetAttribute
mlirLocationUnknownGet
mlirLocationFileLineColGet
mlirModuleCreateEmpty
mlirModuleDestroy
mlirModuleGetBody
mlirModuleGetOperation
mlirOperationStateGet
mlirNamedAttributeGet
mlirIntegerAttrGet
mlirFloatAttrDoubleGet
mlirStringAttrGet
mlirArrayAttrGet
mlirTypeAttrGet
mlirArrayAttrGet
mlirUnitAttrGet
mlirIntegerTypeGet
mlirIntegerTypeUnsignedGet
mlirIntegerTypeSignedGet
mlirF64TypeGet
mlirNoneTypeGet
mlirIdentifierGet
mlirFlatSymbolRefAttrGet
# mlirAttributeParseGet: We should not parse anything
mlirOperationStateAddOperands
mlirOperationStateAddResults
mlirOperationStateAddAttributes
mlirOperationGetResult
mlirRegionCreate
mlirOperationCreate
mlirBlockCreate
mlirBlockGetArgument
mlirBlockAppendOwnedOperation
mlirBlockInsertOwnedOperationAfter
mlirBlockInsertOwnedOperationBefore
mlirRegionAppendOwnedBlock
mlirOperationStateAddOwnedRegions
mlirOperationPrint
mlirExportFIRRTL
# mlirPassManager
mlirPassManagerCreate
mlirPassManagerCreateOnOperation
mlirPassManagerDestroy
mlirPassManagerGetNestedUnder
mlirPassManagerRunOnOp
mlirPassManagerAddOwnedPass
mlirOpPassManagerGetNestedUnder
mlirOpPassManagerAddOwnedPass

# FIRRTL Type
firrtlTypeGetUInt
firrtlTypeGetSInt
firrtlTypeGetClock
firrtlTypeGetReset
firrtlTypeGetAsyncReset
firrtlTypeGetAnalog
firrtlTypeGetVector
firrtlTypeGetBundle

# FIRRTL Attribute
firrtlAttrGetPortDirs
firrtlAttrGetParamDecl
firrtlAttrGetConvention
firrtlAttrGetNameKind
firrtlAttrGetRUW
firrtlAttrGetMemoryInit
firrtlAttrGetMemDir

# CHIRRTL Attribute
chirrtlTypeGetCMemory
chirrtlTypeGetCMemoryPort

# firtoolOptions
firtoolOptionsCreateDefault
firtoolOptionsDestroy
firtoolOptionsSetOutputFilename
firtoolOptionsGetOutputFilename
firtoolOptionsSetDisableAnnotationsUnknown
firtoolOptionsGetDisableAnnotationsUnknown
firtoolOptionsSetDisableAnnotationsClassless
firtoolOptionsGetDisableAnnotationsClassless
firtoolOptionsSetLowerAnnotationsNoRefTypePorts
firtoolOptionsGetLowerAnnotationsNoRefTypePorts
firtoolOptionsSetPreserveAggregate
firtoolOptionsGetPreserveAggregate
firtoolOptionsSetPreserveValues
firtoolOptionsGetPreserveValues
firtoolOptionsSetBuildMode
firtoolOptionsGetBuildMode
firtoolOptionsSetDisableOptimization
firtoolOptionsGetDisableOptimization
firtoolOptionsSetExportChiselInterface
firtoolOptionsGetExportChiselInterface
firtoolOptionsSetChiselInterfaceOutDirectory
firtoolOptionsGetChiselInterfaceOutDirectory
firtoolOptionsSetVbToBv
firtoolOptionsGetVbToBv
firtoolOptionsSetDedup
firtoolOptionsGetDedup
firtoolOptionsSetCompanionMode
firtoolOptionsGetCompanionMode
firtoolOptionsSetDisableAggressiveMergeConnections
firtoolOptionsGetDisableAggressiveMergeConnections
firtoolOptionsSetEmitOMIR
firtoolOptionsGetEmitOMIR
firtoolOptionsSetOMIROutFile
firtoolOptionsGetOMIROutFile
firtoolOptionsSetLowerMemories
firtoolOptionsGetLowerMemories
firtoolOptionsSetBlackBoxRootPath
firtoolOptionsGetBlackBoxRootPath
firtoolOptionsSetReplSeqMem
firtoolOptionsGetReplSeqMem
firtoolOptionsSetReplSeqMemFile
firtoolOptionsGetReplSeqMemFile
firtoolOptionsSetExtractTestCode
firtoolOptionsGetExtractTestCode
firtoolOptionsSetIgnoreReadEnableMem
firtoolOptionsGetIgnoreReadEnableMem
firtoolOptionsSetDisableRandom
firtoolOptionsGetDisableRandom
firtoolOptionsSetOutputAnnotationFilename
firtoolOptionsGetOutputAnnotationFilename
firtoolOptionsSetEnableAnnotationWarning
firtoolOptionsGetEnableAnnotationWarning
firtoolOptionsSetAddMuxPragmas
firtoolOptionsGetAddMuxPragmas
firtoolOptionsSetEmitChiselAssertsAsSVA
firtoolOptionsGetEmitChiselAssertsAsSVA
firtoolOptionsSetEmitSeparateAlwaysBlocks
firtoolOptionsGetEmitSeparateAlwaysBlocks
firtoolOptionsSetEtcDisableInstanceExtraction
firtoolOptionsGetEtcDisableInstanceExtraction
firtoolOptionsSetEtcDisableRegisterExtraction
firtoolOptionsGetEtcDisableRegisterExtraction
firtoolOptionsSetEtcDisableModuleInlining
firtoolOptionsGetEtcDisableModuleInlining
firtoolOptionsSetAddVivadoRAMAddressConflictSynthesisBugWorkaround
firtoolOptionsGetAddVivadoRAMAddressConflictSynthesisBugWorkaround
firtoolOptionsSetCkgModuleName
firtoolOptionsGetCkgModuleName
firtoolOptionsSetCkgInputName
firtoolOptionsGetCkgInputName
firtoolOptionsSetCkgOutputName
firtoolOptionsGetCkgOutputName
firtoolOptionsSetCkgEnableName
firtoolOptionsGetCkgEnableName
firtoolOptionsSetCkgTestEnableName
firtoolOptionsGetCkgTestEnableName
firtoolOptionsSetExportModuleHierarchy
firtoolOptionsGetExportModuleHierarchy
firtoolOptionsSetStripFirDebugInfo
firtoolOptionsGetStripFirDebugInfo
firtoolOptionsSetStripDebugInfo
firtoolOptionsGetStripDebugInfo

# populate functions
firtoolPopulatePreprocessTransforms
firtoolPopulateCHIRRTLToLowFIRRTL
firtoolPopulateLowFIRRTLToHW
firtoolPopulateHWToSV
firtoolPopulateExportVerilog
firtoolPopulateExportSplitVerilog
firtoolPopulateFinalizeIR
20 changes: 20 additions & 0 deletions binder/includeStructs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
MlirContext
MlirDialectHandle
MlirStringRef
MlirType
MlirValue
MlirLocation
MlirAttribute
MlirIdentifier
MlirModule
MlirBlock
MlirRegion
MlirOperation
MlirOperationState
MlirNamedAttribute
MlirPassManager
MlirOpPassManager
MlirPass
MlirLogicalResult
FIRRTLBundleField
FirtoolOptions
1 change: 1 addition & 0 deletions binder/includeTypedefs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MlirStringCallback
Empty file added binder/includeUnions.txt
Empty file.
Empty file added binder/includeVars.txt
Empty file.
14 changes: 14 additions & 0 deletions binder/linkLibraries.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MLIRCAPIIR
CIRCTCAPIFIRRTL
CIRCTCAPICHIRRTL
CIRCTCAPIHW
CIRCTCAPISV
CIRCTCAPISeq
CIRCTCAPIFirtool
CIRCTCAPIExportFIRRTL
CIRCTCAPIExportVerilog
CIRCTFIRRTL
CIRCTHW
CIRCTExportFIRRTL
CIRCTExportVerilog
MLIRCAPIRegisterEverything
Loading

0 comments on commit a9bc4c9

Please sign in to comment.