by andylgh »
# coding: cp936
if __name__ == '__main__':
test_dat = bytearray()
for i in range(0,2048):
test_dat.append(i%256)
print(len(test_dat))
with open(r'\\.\xillybus_write_32','wb',buffering=-1) as wfd:
with open(r'\\.\xillybus_read_32','rb',buffering=-1) as rfd:
with open(r'test.bin','wb',buffering=-1) as fd:
#write file
w_num = wfd.write(test_dat)
wfd.flush()
print('w_num = %0d'%(w_num))
#read file
rdata = rfd.read(2048)
print(len(rdata))
w_num = fd.write(rdata)
fd.flush()
the bundle demo k7,there are 2KB fifo in FPGA write32 and read32 are loopback。the example above i first write 2KB to fpga_fifo and then read 2KB ,the test is success
now i change : rdata = rfd.read(2048) -》 rdata = rfd.read(2048 + 4) , the test is block at read()
According to my understanding, it should be able to return to 2048. It should not be blocked ?
# coding: cp936
if __name__ == '__main__':
test_dat = bytearray()
for i in range(0,2048):
test_dat.append(i%256)
print(len(test_dat))
with open(r'\\.\xillybus_write_32','wb',buffering=-1) as wfd:
with open(r'\\.\xillybus_read_32','rb',buffering=-1) as rfd:
with open(r'test.bin','wb',buffering=-1) as fd:
#write file
w_num = wfd.write(test_dat)
wfd.flush()
print('w_num = %0d'%(w_num))
#read file
rdata = rfd.read(2048)
print(len(rdata))
w_num = fd.write(rdata)
fd.flush()
the bundle demo k7,there are 2KB fifo in FPGA write32 and read32 are loopback。the example above i first write 2KB to fpga_fifo and then read 2KB ,the test is success
now i change : rdata = rfd.read(2048) -》 rdata = rfd.read(2048 + 4) , the test is block at read()
According to my understanding, it should be able to return to 2048. It should not be blocked ?