yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RTLIL::SigBit Struct Reference

#include <rtlil.h>

+ Collaboration diagram for RTLIL::SigBit:

Public Member Functions

 SigBit ()
 
 SigBit (RTLIL::State bit)
 
 SigBit (bool bit)
 
 SigBit (RTLIL::Wire *wire)
 
 SigBit (RTLIL::Wire *wire, int offset)
 
 SigBit (const RTLIL::SigChunk &chunk)
 
 SigBit (const RTLIL::SigChunk &chunk, int index)
 
 SigBit (const RTLIL::SigSpec &sig)
 
bool operator< (const RTLIL::SigBit &other) const
 
bool operator== (const RTLIL::SigBit &other) const
 
bool operator!= (const RTLIL::SigBit &other) const
 

Data Fields

RTLIL::Wirewire
 
union {
   RTLIL::State   data
 
   int   offset
 
}; 
 

Detailed Description

Definition at line 905 of file rtlil.h.

Constructor & Destructor Documentation

RTLIL::SigBit::SigBit ( )
inline

Definition at line 913 of file rtlil.h.

RTLIL::Wire * wire
Definition: rtlil.h:907
RTLIL::State data
Definition: rtlil.h:909
#define NULL
RTLIL::SigBit::SigBit ( RTLIL::State  bit)
inline

Definition at line 914 of file rtlil.h.

914 : wire(NULL), data(bit) { }
RTLIL::Wire * wire
Definition: rtlil.h:907
RTLIL::State data
Definition: rtlil.h:909
#define NULL
RTLIL::SigBit::SigBit ( bool  bit)
inline

Definition at line 915 of file rtlil.h.

915 : wire(NULL), data(bit ? RTLIL::S1 : RTLIL::S0) { }
RTLIL::Wire * wire
Definition: rtlil.h:907
RTLIL::State data
Definition: rtlil.h:909
#define NULL
RTLIL::SigBit::SigBit ( RTLIL::Wire wire)
inline

Definition at line 916 of file rtlil.h.

916 : wire(wire), offset(0) { log_assert(wire && wire->width == 1); }
RTLIL::Wire * wire
Definition: rtlil.h:907
int width
Definition: rtlil.h:826
int offset
Definition: rtlil.h:910
#define log_assert(_assert_expr_)
Definition: log.h:85
RTLIL::SigBit::SigBit ( RTLIL::Wire wire,
int  offset 
)
inline

Definition at line 917 of file rtlil.h.

917 : wire(wire), offset(offset) { log_assert(wire != nullptr); }
RTLIL::Wire * wire
Definition: rtlil.h:907
int offset
Definition: rtlil.h:910
#define log_assert(_assert_expr_)
Definition: log.h:85
RTLIL::SigBit::SigBit ( const RTLIL::SigChunk chunk)
inline

Definition at line 918 of file rtlil.h.

918 : wire(chunk.wire) { log_assert(chunk.width == 1); if (wire) offset = chunk.offset; else data = chunk.data[0]; }
RTLIL::Wire * wire
Definition: rtlil.h:907
RTLIL::State data
Definition: rtlil.h:909
int offset
Definition: rtlil.h:910
RTLIL::Wire * wire
Definition: rtlil.h:885
#define log_assert(_assert_expr_)
Definition: log.h:85
std::vector< RTLIL::State > data
Definition: rtlil.h:886
RTLIL::SigBit::SigBit ( const RTLIL::SigChunk chunk,
int  index 
)
inline

Definition at line 919 of file rtlil.h.

919 : wire(chunk.wire) { if (wire) offset = chunk.offset + index; else data = chunk.data[index]; }
RTLIL::Wire * wire
Definition: rtlil.h:907
RTLIL::State data
Definition: rtlil.h:909
int offset
Definition: rtlil.h:910
RTLIL::Wire * wire
Definition: rtlil.h:885
std::vector< RTLIL::State > data
Definition: rtlil.h:886
RTLIL::SigBit::SigBit ( const RTLIL::SigSpec sig)
inline

Definition at line 1112 of file rtlil.h.

1112  {
1113  log_assert(sig.size() == 1 && sig.chunks().size() == 1);
1114  *this = SigBit(sig.chunks().front());
1115 }
int size() const
Definition: rtlil.h:1019
#define log_assert(_assert_expr_)
Definition: log.h:85
const std::vector< RTLIL::SigChunk > & chunks() const
Definition: rtlil.h:1016

+ Here is the call graph for this function:

Member Function Documentation

bool RTLIL::SigBit::operator!= ( const RTLIL::SigBit other) const
inline

Definition at line 934 of file rtlil.h.

934  {
935  return (wire != other.wire) || (wire ? (offset != other.offset) : (data != other.data));
936  }
RTLIL::Wire * wire
Definition: rtlil.h:907
RTLIL::State data
Definition: rtlil.h:909
int offset
Definition: rtlil.h:910
bool RTLIL::SigBit::operator< ( const RTLIL::SigBit other) const
inline

Definition at line 922 of file rtlil.h.

922  {
923  if (wire == other.wire)
924  return wire ? (offset < other.offset) : (data < other.data);
925  if (wire != nullptr && other.wire != nullptr)
926  return wire->name < other.wire->name;
927  return wire < other.wire;
928  }
RTLIL::Wire * wire
Definition: rtlil.h:907
RTLIL::State data
Definition: rtlil.h:909
int offset
Definition: rtlil.h:910
RTLIL::IdString name
Definition: rtlil.h:825
bool RTLIL::SigBit::operator== ( const RTLIL::SigBit other) const
inline

Definition at line 930 of file rtlil.h.

930  {
931  return (wire == other.wire) && (wire ? (offset == other.offset) : (data == other.data));
932  }
RTLIL::Wire * wire
Definition: rtlil.h:907
RTLIL::State data
Definition: rtlil.h:909
int offset
Definition: rtlil.h:910

Field Documentation

union { ... }
RTLIL::State RTLIL::SigBit::data

Definition at line 909 of file rtlil.h.

int RTLIL::SigBit::offset

Definition at line 910 of file rtlil.h.

RTLIL::Wire* RTLIL::SigBit::wire

Definition at line 907 of file rtlil.h.


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