Exemplo n.º 1
0
def _(lf, rt):
    w = max(lf.hcl_type.width, rt.hcl_type.width) + 1
    t = UIntT(w)
    return ExprHolder(t, ConnSide.RT, Add(lf, rt))
Exemplo n.º 2
0
def _(uint, high: int, low: int):
    check_bit_width(uint, high, low)
    t = UIntT(high - low + 1)
    return ExprHolder(t, ConnSide.RT, Bits(uint, high, low))
Exemplo n.º 3
0
    def __init__(self, value: int):
        self.value = value

        w = unsigned_num_bin_len(value)
        self.hcl_type = UIntT(w)
        self.conn_side = ConnSide.RT