CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::synth::ValueWithArrivalTime Class Reference

Helper class for delay-aware tree building. More...

#include <SynthOps.h>

Collaboration diagram for circt::synth::ValueWithArrivalTime:

Public Member Functions

 ValueWithArrivalTime (mlir::Value value, int64_t arrivalTime, bool invert, size_t valueNumbering=0)
mlir::Value getValue () const
bool isInverted () const
int64_t getArrivalTime () const
ValueWithArrivalTime & flipInversion ()
bool operator> (const ValueWithArrivalTime &other) const
 Comparison operator for priority queue.

Private Attributes

llvm::PointerIntPair< mlir::Value, 1, bool > value
 The value and an optional inversion flag packed together.
int64_t arrivalTime
 The arrival time (delay) of this value in the circuit.
size_t valueNumbering = 0
 Value numbering for deterministic ordering when arrival times are equal.

Detailed Description

Helper class for delay-aware tree building.

Stores a value along with its arrival time and inversion flag.

Definition at line 58 of file SynthOps.h.

Constructor & Destructor Documentation

◆ ValueWithArrivalTime()

circt::synth::ValueWithArrivalTime::ValueWithArrivalTime ( mlir::Value value,
int64_t arrivalTime,
bool invert,
size_t valueNumbering = 0 )
inline

Definition at line 72 of file SynthOps.h.

References arrivalTime, value, and valueNumbering.

Referenced by flipInversion(), and operator>().

Member Function Documentation

◆ flipInversion()

ValueWithArrivalTime & circt::synth::ValueWithArrivalTime::flipInversion ( )
inline

Definition at line 81 of file SynthOps.h.

References value, and ValueWithArrivalTime().

◆ getArrivalTime()

int64_t circt::synth::ValueWithArrivalTime::getArrivalTime ( ) const
inline

Definition at line 79 of file SynthOps.h.

References arrivalTime.

◆ getValue()

mlir::Value circt::synth::ValueWithArrivalTime::getValue ( ) const
inline

Definition at line 77 of file SynthOps.h.

References value.

◆ isInverted()

bool circt::synth::ValueWithArrivalTime::isInverted ( ) const
inline

Definition at line 78 of file SynthOps.h.

References value.

◆ operator>()

bool circt::synth::ValueWithArrivalTime::operator> ( const ValueWithArrivalTime & other) const
inline

Comparison operator for priority queue.

Values with earlier arrival times have higher priority. When arrival times are equal, use value numbering for determinism.

Definition at line 89 of file SynthOps.h.

References arrivalTime, valueNumbering, and ValueWithArrivalTime().

Member Data Documentation

◆ arrivalTime

int64_t circt::synth::ValueWithArrivalTime::arrivalTime
private

The arrival time (delay) of this value in the circuit.

Definition at line 64 of file SynthOps.h.

Referenced by getArrivalTime(), operator>(), and ValueWithArrivalTime().

◆ value

llvm::PointerIntPair<mlir::Value, 1, bool> circt::synth::ValueWithArrivalTime::value
private

The value and an optional inversion flag packed together.

The inversion flag is used for AndInverterOp lowering.

Definition at line 61 of file SynthOps.h.

Referenced by flipInversion(), getValue(), synth.Object::is_output_port(), isInverted(), Python.support.OpOperand::type(), and ValueWithArrivalTime().

◆ valueNumbering

size_t circt::synth::ValueWithArrivalTime::valueNumbering = 0
private

Value numbering for deterministic ordering when arrival times are equal.

This ensures consistent results across runs when multiple values have the same delay.

Definition at line 69 of file SynthOps.h.

Referenced by operator>(), and ValueWithArrivalTime().


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