def test_mem_copy():

  data = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ]
  data_bytes = Bytes(18)
  for i in range(18):
    data_bytes[i] = data[i]

  mem_copy( data_bytes, 4, 12, 4 )

  data_ref = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 5, 6, 7, 16, 17 ]
  data_ref_bytes = Bytes(18)
  for i in range(18):
    data_ref_bytes[i] = data_ref[i]

  assert data_bytes == data_ref_bytes

#-------------------------------------------------------------------------
# MemCopy
#-------------------------------------------------------------------------
# An example model that simply copies n bytes from a source pointer to a
# destination pointer in a memory.
dataset/ETHPy150Open cornell-brg/pymtl/pclib/fl/BytesMemPortAdapter_test.py/test_mem_copy/original