CIRCT 22.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
circt::datapath::CompressorTree Class Reference

#include <DatapathOps.h>

Collaboration diagram for circt::datapath::CompressorTree:
Collaboration graph
[legend]

Public Member Functions

 CompressorTree (size_t width, const SmallVector< SmallVector< Value > > &addends, Location loc)
 
size_t getWidth () const
 
size_t getMaxHeight () const
 
size_t getNextStageTargetHeight () const
 
LogicalResult withInputDelays (llvm::function_ref< FailureOr< int64_t >(Value)> getDelay)
 
SmallVector< Value > compressToHeight (OpBuilder &builder, size_t targetHeight)
 
void dump () const
 

Private Member Functions

SmallVector< Value > columnsToAddends (OpBuilder &builder, size_t targetHeight)
 
SmallVector< Value > compressUsingTiming (OpBuilder &builder, size_t targetHeight)
 
std::pair< CompressorBit, CompressorBitfullAdderWithDelay (OpBuilder &builder, CompressorBit a, CompressorBit b, CompressorBit c)
 
std::pair< CompressorBit, CompressorBithalfAdderWithDelay (OpBuilder &builder, CompressorBit a, CompressorBit b)
 

Private Attributes

SmallVector< SmallVector< CompressorBit > > columns
 
const size_t width
 
size_t numStages
 
size_t numFullAdders
 
Location loc
 

Detailed Description

Definition at line 31 of file DatapathOps.h.

Constructor & Destructor Documentation

◆ CompressorTree()

CompressorTree::CompressorTree ( size_t  width,
const SmallVector< SmallVector< Value > > &  addends,
Location  loc 
)

Member Function Documentation

◆ columnsToAddends()

SmallVector< Value > CompressorTree::columnsToAddends ( OpBuilder &  builder,
size_t  targetHeight 
)
private

Definition at line 175 of file DatapathOps.cpp.

References columns, hw.ConstantOp::create(), getMaxHeight(), loc, and width.

Referenced by compressToHeight(), and compressUsingTiming().

◆ compressToHeight()

SmallVector< Value > CompressorTree::compressToHeight ( OpBuilder &  builder,
size_t  targetHeight 
)

Definition at line 202 of file DatapathOps.cpp.

References columnsToAddends(), compressUsingTiming(), and getMaxHeight().

◆ compressUsingTiming()

SmallVector< Value > CompressorTree::compressUsingTiming ( OpBuilder &  builder,
size_t  targetHeight 
)
private

◆ dump()

void CompressorTree::dump ( ) const

◆ fullAdderWithDelay()

std::pair< CompressorBit, CompressorBit > CompressorTree::fullAdderWithDelay ( OpBuilder &  builder,
CompressorBit  a,
CompressorBit  b,
CompressorBit  c 
)
private

◆ getMaxHeight()

size_t CompressorTree::getMaxHeight ( ) const

◆ getNextStageTargetHeight()

size_t CompressorTree::getNextStageTargetHeight ( ) const

Definition at line 163 of file DatapathOps.cpp.

References getMaxHeight().

Referenced by compressUsingTiming(), and dump().

◆ getWidth()

size_t circt::datapath::CompressorTree::getWidth ( ) const
inline

Definition at line 38 of file DatapathOps.h.

References columns.

◆ halfAdderWithDelay()

std::pair< CompressorBit, CompressorBit > CompressorTree::halfAdderWithDelay ( OpBuilder &  builder,
CompressorBit  a,
CompressorBit  b 
)
private

◆ withInputDelays()

LogicalResult CompressorTree::withInputDelays ( llvm::function_ref< FailureOr< int64_t >(Value)>  getDelay)

Definition at line 140 of file DatapathOps.cpp.

References columns.

Member Data Documentation

◆ columns

SmallVector<SmallVector<CompressorBit> > circt::datapath::CompressorTree::columns
private

◆ loc

Location circt::datapath::CompressorTree::loc
private

Definition at line 70 of file DatapathOps.h.

Referenced by columnsToAddends(), fullAdderWithDelay(), and halfAdderWithDelay().

◆ numFullAdders

size_t circt::datapath::CompressorTree::numFullAdders
private

Definition at line 67 of file DatapathOps.h.

Referenced by dump(), and fullAdderWithDelay().

◆ numStages

size_t circt::datapath::CompressorTree::numStages
private

Definition at line 64 of file DatapathOps.h.

Referenced by compressUsingTiming(), and dump().

◆ width

const size_t circt::datapath::CompressorTree::width
private

Definition at line 61 of file DatapathOps.h.

Referenced by columnsToAddends(), CompressorTree(), compressUsingTiming(), and dump().


The documentation for this class was generated from the following files: