CIRCT  20.0.0git
Namespaces | Macros | Functions
RandomizeRegisterInit.cpp File Reference
#include "circt/Dialect/FIRRTL/AnnotationDetails.h"
#include "circt/Dialect/FIRRTL/FIRRTLAnnotations.h"
#include "circt/Dialect/FIRRTL/FIRRTLInstanceGraph.h"
#include "circt/Dialect/FIRRTL/FIRRTLOps.h"
#include "circt/Dialect/FIRRTL/FIRRTLTypes.h"
#include "circt/Dialect/FIRRTL/Passes.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/Pass/Pass.h"
#include "llvm/Support/Parallel.h"
#include "circt/Dialect/FIRRTL/Passes.h.inc"
Include dependency graph for RandomizeRegisterInit.cpp:

Go to the source code of this file.

Namespaces

 circt
 The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
 
 circt::firrtl
 

Macros

#define GEN_PASS_DEF_RANDOMIZEREGISTERINIT
 

Functions

static void createRandomizationAttributes (FModuleOp mod)
 Create attributes indicating the required size of random initialization values for each register in the module, and mark which range of these values each register should consume. More...
 

Macro Definition Documentation

◆ GEN_PASS_DEF_RANDOMIZEREGISTERINIT

#define GEN_PASS_DEF_RANDOMIZEREGISTERINIT

Definition at line 26 of file RandomizeRegisterInit.cpp.

Function Documentation

◆ createRandomizationAttributes()

static void createRandomizationAttributes ( FModuleOp  mod)
static

Create attributes indicating the required size of random initialization values for each register in the module, and mark which range of these values each register should consume.

The goal is for registers to always read the same random bits for the same seed, regardless of optimizations that might remove registers.

Definition at line 53 of file RandomizeRegisterInit.cpp.

References assert(), and circt::firrtl::getBitWidth().