)
)
fsm.act("SEND_WRITE_DMA_CMD",
- transport.sink.stb.eq(1),
+ transport.sink.stb.eq(sink.stb),
transport.sink.sop.eq(1),
transport.sink.eop.eq(1),
transport.sink.type.eq(fis_types["REG_H2D"]),
def __init__(self):
self.submodules.hdd = HDD(
phy_debug=False,
- link_random_level=25, link_debug=False,
+ link_random_level=50, link_debug=False,
transport_debug=False, transport_loopback=False,
command_debug=False,
hdd_debug=True)
self.submodules.command = SATACommand(self.transport)
self.submodules.streamer = CommandStreamer()
- streamer_ack_randomizer = AckRandomizer(command_tx_description(32), level=0)
+ streamer_ack_randomizer = AckRandomizer(command_tx_description(32), level=50)
self.submodules += streamer_ack_randomizer
self.submodules.logger = CommandLogger()
- logger_ack_randomizer = AckRandomizer(command_rx_description(32), level=25)
+ logger_ack_randomizer = AckRandomizer(command_rx_description(32), level=50)
self.submodules += logger_ack_randomizer
self.comb += [
Record.connect(self.streamer.source, streamer_ack_randomizer.sink),
sink.ack.eq(1)
)
).Else(
- sink.ack.eq(1)
+ sink.ack.eq(sink.stb)
)
)
fsm.act("SEND_REG_H2D_CMD",
_encode_cmd(sink, fis_reg_h2d_layout, encoded_cmd),
cmd_len.eq(fis_reg_h2d_cmd_len-1),
- cmd_send.eq(sink.stb),
+ cmd_send.eq(1),
If(cmd_done,
sink.ack.eq(1),
NextState("IDLE")
_encode_cmd(sink, fis_data_layout, encoded_cmd),
cmd_len.eq(fis_data_cmd_len-1),
cmd_with_data.eq(1),
- cmd_send.eq(sink.stb),
+ cmd_send.eq(1),
If(cmd_done,
NextState("SEND_DATA")
)
self.comb += \
If(cmd_send,
- link.sink.stb.eq(1),
+ link.sink.stb.eq(sink.stb),
link.sink.sop.eq(cnt==0),
link.sink.eop.eq((cnt==cmd_len) & ~cmd_with_data),
Case(cnt, cmd_cases),
- inc_cnt.eq(link.sink.ack),
- cmd_done.eq((cnt==cmd_len) & link.sink.ack)
+ inc_cnt.eq(sink.stb & link.sink.ack),
+ cmd_done.eq((cnt==cmd_len) & link.sink.stb & link.sink.ack)
).Elif(data_send,
link.sink.stb.eq(sink.stb),
link.sink.sop.eq(0),