/// assign write_or_w = (dma_en_r?(dma_dav && todev_ready && ()):fis_data_valid); // do not fill the buffer if FIFO is not ready for DMA,
assignwrite_or_w=(dma_en_r?(dma_dav&&todev_ready&&(!todev_full_r||watch_prd_end_w)):fis_data_valid);// do not fill the buffer if FIFO is not ready for DMA,
// When watching for FIS end, do not fill/use output register in the same cycle
always@(posedgemclk)begin
// Mutliplex between DMA and FIS output to the output routed to transmit FIFO
...
...
@@ -209,7 +221,13 @@ module ahci_fis_transmit #(
if(hba_rst)todev_type<=3;// invalid? - no, now first and last word in command FIS (impossible?)