fault.random module

Source code
import random
from hwtypes import BitVector


def random_bv(width):
    return BitVector(random.randint(0, (1 << width) - 1), width)


def random_bit():
    return random.randint(0, 1)}

Functions

def random_bit()
Source code
def random_bit():
    return random.randint(0, 1)}
def random_bv(width)
Source code
def random_bv(width):
    return BitVector(random.randint(0, (1 << width) - 1), width)}