You need to go back and check what memory is in the original design.
Then check what def loadweight()
is doing.
If your design is correct, then all data transfer is done through the DMA. The DMA API for sending and receiving is sendchannel.transfer() and recvchannel.transfer(). Check for those calls in the original design.
Cathal