CIRCT  20.0.0git
Functions
MSFT.cpp File Reference
#include "circt-c/Dialect/MSFT.h"
#include "circt/Dialect/HW/HWSymCache.h"
#include "circt/Dialect/MSFT/DeviceDB.h"
#include "circt/Dialect/MSFT/ExportTcl.h"
#include "circt/Dialect/MSFT/MSFTAttributes.h"
#include "circt/Dialect/MSFT/MSFTDialect.h"
#include "circt/Dialect/MSFT/MSFTOps.h"
#include "circt/Dialect/MSFT/MSFTPasses.h"
#include "circt/Support/LLVM.h"
#include "mlir/CAPI/IR.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/CAPI/Support.h"
#include "mlir/CAPI/Utils.h"
#include "mlir/IR/Builders.h"
#include "mlir/Transforms/Passes.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for MSFT.cpp:

Go to the source code of this file.

Functions

void mlirMSFTRegisterPasses ()
 
void circtMSFTReplaceAllUsesWith (MlirValue value, MlirValue newValue)
 
CirctMSFTPrimitiveDB circtMSFTCreatePrimitiveDB (MlirContext ctxt)
 
void circtMSFTDeletePrimitiveDB (CirctMSFTPrimitiveDB self)
 
MlirLogicalResult circtMSFTPrimitiveDBAddPrimitive (CirctMSFTPrimitiveDB self, MlirAttribute cLoc)
 
bool circtMSFTPrimitiveDBIsValidLocation (CirctMSFTPrimitiveDB self, MlirAttribute cLoc)
 
CirctMSFTPlacementDB circtMSFTCreatePlacementDB (MlirModule top, CirctMSFTPrimitiveDB seed)
 
void circtMSFTDeletePlacementDB (CirctMSFTPlacementDB self)
 
MlirOperation circtMSFTPlacementDBPlace (CirctMSFTPlacementDB db, MlirOperation cinst, MlirAttribute cloc, MlirStringRef subpath, MlirLocation csrcLoc)
 
void circtMSFTPlacementDBRemovePlacement (CirctMSFTPlacementDB db, MlirOperation clocOp)
 
MlirLogicalResult circtMSFTPlacementDBMovePlacement (CirctMSFTPlacementDB db, MlirOperation clocOp, MlirAttribute cnewLoc)
 
MlirOperation circtMSFTPlacementDBGetInstanceAt (CirctMSFTPlacementDB db, MlirAttribute loc)
 
MlirAttribute circtMSFTPlacementDBGetNearestFreeInColumn (CirctMSFTPlacementDB db, CirctMSFTPrimitiveType prim, uint64_t column, uint64_t nearestToY)
 
MLIR_CAPI_EXPORTED void circtMSFTPlacementDBWalkPlacements (CirctMSFTPlacementDB cdb, CirctMSFTPlacementCallback ccb, int64_t bounds[4], CirctMSFTPrimitiveType cPrimTypeFilter, CirctMSFTWalkOrder cWalkOrder, void *userData)
 Walk all the placements within 'bounds' ([xmin, xmax, ymin, ymax], inclusive on all sides), with -1 meaning unbounded. More...
 
void mlirMSFTAddPhysLocationAttr (MlirOperation cOp, const char *entityName, PrimitiveType type, long x, long y, long num)
 
bool circtMSFTAttributeIsAPhysLocationAttribute (MlirAttribute attr)
 
MlirAttribute circtMSFTPhysLocationAttrGet (MlirContext cCtxt, CirctMSFTPrimitiveType devType, uint64_t x, uint64_t y, uint64_t num)
 
CirctMSFTPrimitiveType circtMSFTPhysLocationAttrGetPrimitiveType (MlirAttribute attr)
 
uint64_t circtMSFTPhysLocationAttrGetX (MlirAttribute attr)
 
uint64_t circtMSFTPhysLocationAttrGetY (MlirAttribute attr)
 
uint64_t circtMSFTPhysLocationAttrGetNum (MlirAttribute attr)
 
bool circtMSFTAttributeIsAPhysicalBoundsAttr (MlirAttribute attr)
 
MlirAttribute circtMSFTPhysicalBoundsAttrGet (MlirContext cContext, uint64_t xMin, uint64_t xMax, uint64_t yMin, uint64_t yMax)
 
bool circtMSFTAttributeIsALocationVectorAttribute (MlirAttribute attr)
 
MlirAttribute circtMSFTLocationVectorAttrGet (MlirContext ctxt, MlirType type, intptr_t numElements, MlirAttribute const *elements)
 
MlirType circtMSFTLocationVectorAttrGetType (MlirAttribute attr)
 
intptr_t circtMSFTLocationVectorAttrGetNumElements (MlirAttribute attr)
 
MlirAttribute circtMSFTLocationVectorAttrGetElement (MlirAttribute attr, intptr_t pos)
 

Function Documentation

◆ circtMSFTAttributeIsALocationVectorAttribute()

bool circtMSFTAttributeIsALocationVectorAttribute ( MlirAttribute  attr)

Definition at line 212 of file MSFT.cpp.

References unwrap().

◆ circtMSFTAttributeIsAPhysicalBoundsAttr()

bool circtMSFTAttributeIsAPhysicalBoundsAttr ( MlirAttribute  attr)

Definition at line 201 of file MSFT.cpp.

References unwrap().

◆ circtMSFTAttributeIsAPhysLocationAttribute()

bool circtMSFTAttributeIsAPhysLocationAttribute ( MlirAttribute  attr)

Definition at line 173 of file MSFT.cpp.

References unwrap().

◆ circtMSFTCreatePlacementDB()

CirctMSFTPlacementDB circtMSFTCreatePlacementDB ( MlirModule  top,
CirctMSFTPrimitiveDB  seed 
)

Definition at line 70 of file MSFT.cpp.

References unwrap(), and wrap().

Referenced by PlacementDB::PlacementDB().

◆ circtMSFTCreatePrimitiveDB()

CirctMSFTPrimitiveDB circtMSFTCreatePrimitiveDB ( MlirContext  ctxt)

Definition at line 47 of file MSFT.cpp.

References esiaccel.accelerator::ctxt, unwrap(), and wrap().

Referenced by PrimitiveDB::PrimitiveDB().

◆ circtMSFTDeletePlacementDB()

void circtMSFTDeletePlacementDB ( CirctMSFTPlacementDB  self)

Definition at line 76 of file MSFT.cpp.

References unwrap().

Referenced by PlacementDB::~PlacementDB().

◆ circtMSFTDeletePrimitiveDB()

void circtMSFTDeletePrimitiveDB ( CirctMSFTPrimitiveDB  self)

Definition at line 50 of file MSFT.cpp.

References unwrap().

Referenced by PrimitiveDB::~PrimitiveDB().

◆ circtMSFTLocationVectorAttrGet()

MlirAttribute circtMSFTLocationVectorAttrGet ( MlirContext  ctxt,
MlirType  type,
intptr_t  numElements,
MlirAttribute const *  elements 
)

◆ circtMSFTLocationVectorAttrGetElement()

MlirAttribute circtMSFTLocationVectorAttrGetElement ( MlirAttribute  attr,
intptr_t  pos 
)

Definition at line 233 of file MSFT.cpp.

References unwrap(), and wrap().

Referenced by PyLocationVecIterator::getItem().

◆ circtMSFTLocationVectorAttrGetNumElements()

intptr_t circtMSFTLocationVectorAttrGetNumElements ( MlirAttribute  attr)

Definition at line 230 of file MSFT.cpp.

References unwrap().

Referenced by PyLocationVecIterator::dunderNext().

◆ circtMSFTLocationVectorAttrGetType()

MlirType circtMSFTLocationVectorAttrGetType ( MlirAttribute  attr)

Definition at line 227 of file MSFT.cpp.

References unwrap(), and wrap().

◆ circtMSFTPhysicalBoundsAttrGet()

MlirAttribute circtMSFTPhysicalBoundsAttrGet ( MlirContext  cContext,
uint64_t  xMin,
uint64_t  xMax,
uint64_t  yMin,
uint64_t  yMax 
)

Definition at line 205 of file MSFT.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ circtMSFTPhysLocationAttrGet()

MlirAttribute circtMSFTPhysLocationAttrGet ( MlirContext  cCtxt,
CirctMSFTPrimitiveType  devType,
uint64_t  x,
uint64_t  y,
uint64_t  num 
)

Definition at line 176 of file MSFT.cpp.

References esiaccel.accelerator::ctxt, circt::calyx::direction::get(), unwrap(), and wrap().

◆ circtMSFTPhysLocationAttrGetNum()

uint64_t circtMSFTPhysLocationAttrGetNum ( MlirAttribute  attr)

Definition at line 197 of file MSFT.cpp.

References unwrap().

◆ circtMSFTPhysLocationAttrGetPrimitiveType()

CirctMSFTPrimitiveType circtMSFTPhysLocationAttrGetPrimitiveType ( MlirAttribute  attr)

Definition at line 186 of file MSFT.cpp.

References unwrap().

◆ circtMSFTPhysLocationAttrGetX()

uint64_t circtMSFTPhysLocationAttrGetX ( MlirAttribute  attr)

Definition at line 191 of file MSFT.cpp.

References unwrap().

◆ circtMSFTPhysLocationAttrGetY()

uint64_t circtMSFTPhysLocationAttrGetY ( MlirAttribute  attr)

Definition at line 194 of file MSFT.cpp.

References unwrap().

◆ circtMSFTPlacementDBGetInstanceAt()

MlirOperation circtMSFTPlacementDBGetInstanceAt ( CirctMSFTPlacementDB  db,
MlirAttribute  loc 
)

Definition at line 117 of file MSFT.cpp.

References unwrap(), and wrap().

Referenced by PlacementDB::getInstanceAt().

◆ circtMSFTPlacementDBGetNearestFreeInColumn()

MlirAttribute circtMSFTPlacementDBGetNearestFreeInColumn ( CirctMSFTPlacementDB  db,
CirctMSFTPrimitiveType  prim,
uint64_t  column,
uint64_t  nearestToY 
)

Definition at line 121 of file MSFT.cpp.

References unwrap(), and wrap().

Referenced by PlacementDB::getNearestFreeInColumn().

◆ circtMSFTPlacementDBMovePlacement()

MlirLogicalResult circtMSFTPlacementDBMovePlacement ( CirctMSFTPlacementDB  db,
MlirOperation  clocOp,
MlirAttribute  cnewLoc 
)

Definition at line 104 of file MSFT.cpp.

References unwrap(), and wrap().

Referenced by PlacementDB::movePlacement().

◆ circtMSFTPlacementDBPlace()

MlirOperation circtMSFTPlacementDBPlace ( CirctMSFTPlacementDB  db,
MlirOperation  cinst,
MlirAttribute  cloc,
MlirStringRef  subpath,
MlirLocation  csrcLoc 
)

Definition at line 80 of file MSFT.cpp.

References unwrap(), and wrap().

Referenced by PlacementDB::place().

◆ circtMSFTPlacementDBRemovePlacement()

void circtMSFTPlacementDBRemovePlacement ( CirctMSFTPlacementDB  db,
MlirOperation  clocOp 
)

Definition at line 94 of file MSFT.cpp.

References assert(), and unwrap().

Referenced by PlacementDB::removePlacement().

◆ circtMSFTPlacementDBWalkPlacements()

MLIR_CAPI_EXPORTED void circtMSFTPlacementDBWalkPlacements ( CirctMSFTPlacementDB  cdb,
CirctMSFTPlacementCallback  ccb,
int64_t  bounds[4],
CirctMSFTPrimitiveType  cPrimTypeFilter,
CirctMSFTWalkOrder  cWalkOrder,
void *  userData 
)

Walk all the placements within 'bounds' ([xmin, xmax, ymin, ymax], inclusive on all sides), with -1 meaning unbounded.

Definition at line 131 of file MSFT.cpp.

References CirctMSFTWalkOrder::columns, NONE, CirctMSFTWalkOrder::rows, unwrap(), circt::msft::PlacementDB::walkPlacements(), and wrap().

Referenced by PlacementDB::walkPlacements().

◆ circtMSFTPrimitiveDBAddPrimitive()

MlirLogicalResult circtMSFTPrimitiveDBAddPrimitive ( CirctMSFTPrimitiveDB  self,
MlirAttribute  cLoc 
)

Definition at line 53 of file MSFT.cpp.

References unwrap(), and wrap().

Referenced by PrimitiveDB::addPrimitive().

◆ circtMSFTPrimitiveDBIsValidLocation()

bool circtMSFTPrimitiveDBIsValidLocation ( CirctMSFTPrimitiveDB  self,
MlirAttribute  cLoc 
)

Definition at line 58 of file MSFT.cpp.

References unwrap().

Referenced by PrimitiveDB::isValidLocation().

◆ circtMSFTReplaceAllUsesWith()

void circtMSFTReplaceAllUsesWith ( MlirValue  value,
MlirValue  newValue 
)

Definition at line 37 of file MSFT.cpp.

References unwrap().

◆ mlirMSFTAddPhysLocationAttr()

void mlirMSFTAddPhysLocationAttr ( MlirOperation  cOp,
const char *  entityName,
PrimitiveType  type,
long  x,
long  y,
long  num 
)

Definition at line 161 of file MSFT.cpp.

References esiaccel.accelerator::ctxt, circt::calyx::direction::get(), and unwrap().

◆ mlirMSFTRegisterPasses()

void mlirMSFTRegisterPasses ( void  )

Definition at line 32 of file MSFT.cpp.

References registerPasses().