CIRCT 23.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
circt::synth::Signal Struct Reference

Edge representation in the logic network. More...

#include <CutRewriter.h>

Collaboration diagram for circt::synth::Signal:
Collaboration graph
[legend]

Public Member Functions

 Signal ()=default
 
 Signal (uint32_t index, bool inverted)
 
 Signal (uint32_t raw)
 
uint32_t getIndex () const
 Get the node index (without the inversion bit).
 
bool isInverted () const
 Check if this edge is inverted.
 
uint32_t getRaw () const
 Get the raw data (index << 1 | inverted).
 
Signal flipInversion () const
 
Signal operator! () const
 Create an inverted version of this edge.
 
bool operator== (const Signal &other) const
 
bool operator!= (const Signal &other) const
 
bool operator< (const Signal &other) const
 

Public Attributes

uint32_t data = 0
 

Detailed Description

Edge representation in the logic network.

Similar to mockturtle's signal, this encodes both a node index and inversion in a single 32-bit value. The LSB indicates whether the signal is inverted.

Definition at line 74 of file CutRewriter.h.

Constructor & Destructor Documentation

◆ Signal() [1/3]

circt::synth::Signal::Signal ( )
default

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

◆ Signal() [2/3]

circt::synth::Signal::Signal ( uint32_t  index,
bool  inverted 
)
inline

Definition at line 78 of file CutRewriter.h.

◆ Signal() [3/3]

circt::synth::Signal::Signal ( uint32_t  raw)
inlineexplicit

Definition at line 80 of file CutRewriter.h.

Member Function Documentation

◆ flipInversion()

Signal circt::synth::Signal::flipInversion ( ) const
inline

Definition at line 91 of file CutRewriter.h.

References getIndex(), isInverted(), and Signal().

◆ getIndex()

uint32_t circt::synth::Signal::getIndex ( ) const
inline

Get the node index (without the inversion bit).

Definition at line 83 of file CutRewriter.h.

References data.

Referenced by flipInversion(), and circt::synth::LogicNetwork::getValue().

◆ getRaw()

uint32_t circt::synth::Signal::getRaw ( ) const
inline

Get the raw data (index << 1 | inverted).

Definition at line 89 of file CutRewriter.h.

References data.

◆ isInverted()

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

Check if this edge is inverted.

Definition at line 86 of file CutRewriter.h.

References data.

Referenced by flipInversion().

◆ operator!()

Signal circt::synth::Signal::operator! ( ) const
inline

Create an inverted version of this edge.

Definition at line 94 of file CutRewriter.h.

References data, and Signal().

◆ operator!=()

bool circt::synth::Signal::operator!= ( const Signal other) const
inline

Definition at line 97 of file CutRewriter.h.

References data.

◆ operator<()

bool circt::synth::Signal::operator< ( const Signal other) const
inline

Definition at line 98 of file CutRewriter.h.

References data.

◆ operator==()

bool circt::synth::Signal::operator== ( const Signal other) const
inline

Definition at line 96 of file CutRewriter.h.

References data.

Member Data Documentation

◆ data

uint32_t circt::synth::Signal::data = 0

Definition at line 75 of file CutRewriter.h.

Referenced by getIndex(), getRaw(), isInverted(), operator!(), operator!=(), operator<(), and operator==().


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