At the same time, I use a vivado debug tool to read value in the CW305, however, the addr received by board is different with the send addr(0, 6, 0, 0)
BTW if you are using our example ECC target, then the “K” register is 256 bits / 32 bytes, so trying to read or write more than 32 bytes will result in undefined behaviour (it will probably wrap around, but there are no guarantees).
Be mindful of pBYTECOUNT_SIZE in Verilog, and ensure that target.bytecount_size has the same value.
Understand that when you do target.fpga_write(address, ...), address gets left-shifted by target.bytecount_size before getting put onto the FPGA address bus.
Also make sure your CW305 FW is up to date (target.fw_version_str should be 0.53.0).