示例#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))
示例#2
0
文件: slice.py 项目: zhongzc/py-hcl
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))
示例#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