frontend/axi: emits the write command only if we have the write data

This commit is contained in:
Florent Kermarrec 2018-11-12 19:17:31 +01:00
parent 6fa891d5d6
commit 7973b7d361
1 changed files with 9 additions and 6 deletions

View File

@ -180,12 +180,15 @@ class LiteDRAMAXI2NativeW(Module):
# Command
self.comb += [
self.cmd_request.eq(aw.valid & w_buffer.source.valid),
If(self.cmd_grant,
port.cmd.valid.eq(aw.valid & w_buffer.source.valid),
aw.ready.eq(port.cmd.ready),
port.cmd.we.eq(1),
port.cmd.addr.eq(aw.addr >> ashift)
# Emits the command only if we have the data
If(w_buffer.source.valid,
self.cmd_request.eq(aw.valid),
If(self.cmd_grant,
port.cmd.valid.eq(aw.valid),
aw.ready.eq(port.cmd.ready),
port.cmd.we.eq(1),
port.cmd.addr.eq(aw.addr >> ashift)
)
)
]