

def __init__(s, mem_ifc_types, src_ptr, dest_ptr, nbytes):
    s.src_ptr = src_ptr
    s.dest_ptr = dest_ptr
    s.nbytes = nbytes
    s.done = False
    s.memreq = InValRdyBundle(mem_ifc_types.req)
    s.memresp = OutValRdyBundle(mem_ifc_types.resp)
    s.mem = BytesMemPortAdapter(src_ptr.memreq, s.memresp)

    @s.tick_fl
    def logic():
        if (not s.reset):
            mem_copy(s.mem, s.src_ptr, s.dest_ptr, s.nbytes)
            s.done = True

dataset/ETHPy150Open cornell-brg/pymtl/pclib/fl/BytesMemPortAdapter_test.py MemCopy.__init__/VarMisuse@70/112 `s`->`src_ptr`