drtio: clear read request in satellite only after reply has been fully sent

Otherwise, chan_sel become invalid before the end of the packet, which
can cause the interconnect to invalidate i_timestamp and i_data which results
in corruption of the end of the packet.
This commit is contained in:
Sebastien Bourdeauducq 2018-09-20 08:53:45 +08:00
parent b86b6dcc09
commit 251d90c3d5
1 changed files with 2 additions and 4 deletions

View File

@ -227,16 +227,14 @@ class RTPacketSatellite(Module):
tx_fsm.act("READ_OVERFLOW",
tx_dp.send("read_reply_noevent", overflow=1),
clear_read_request.eq(1),
If(tx_dp.packet_last,
NextState("IDLE")
)
If(tx_dp.packet_last, NextState("IDLE"))
)
tx_fsm.act("READ",
tx_dp.send("read_reply",
timestamp=self.cri.i_timestamp,
data=self.cri.i_data),
clear_read_request.eq(1),
If(tx_dp.packet_last,
clear_read_request.eq(1),
NextState("IDLE")
)
)