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

Public Member Functions

RTLIL::State next_bit ()
 
void operator() (RTLIL::SigSpec &sig)
 

Data Fields

int next_bit_mode
 
uint32_t next_bit_state
 

Detailed Description

Definition at line 29 of file setundef.cc.

Member Function Documentation

RTLIL::State SetundefWorker::next_bit ( )
inline

Definition at line 34 of file setundef.cc.

35  {
36  if (next_bit_mode == 0)
37  return RTLIL::State::S0;
38 
39  if (next_bit_mode == 1)
40  return RTLIL::State::S1;
41 
42  // xorshift32
47 
48  return ((next_bit_state >> (next_bit_state & 15)) & 16) ? RTLIL::State::S0 : RTLIL::State::S1;
49  }
#define log_assert(_assert_expr_)
Definition: log.h:85
int next_bit_mode
Definition: setundef.cc:31
uint32_t next_bit_state
Definition: setundef.cc:32

+ Here is the caller graph for this function:

void SetundefWorker::operator() ( RTLIL::SigSpec sig)
inline

Definition at line 51 of file setundef.cc.

52  {
53  for (auto &bit : sig)
54  if (bit.wire == NULL && bit.data > RTLIL::State::S1)
55  bit = next_bit();
56  }
#define NULL
RTLIL::State next_bit()
Definition: setundef.cc:34

+ Here is the call graph for this function:

Field Documentation

int SetundefWorker::next_bit_mode

Definition at line 31 of file setundef.cc.

uint32_t SetundefWorker::next_bit_state

Definition at line 32 of file setundef.cc.


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