inputtodev_ready// send FIFO has room for data (>= 8? dwords)
inputtodev_ready// send FIFO has room for data (>= 8? dwords)
,output[9:0]debug_01
// Add a possiblity to flush any data to FIFO if error was detected after data went there?
// Add a possiblity to flush any data to FIFO if error was detected after data went there?
);
);
localparamCLB_OFFS32='h200;// # In the second half of the register space (0x800..0xbff - 1KB)
localparamCLB_OFFS32='h200;// # In the second half of the register space (0x800..0xbff - 1KB)
...
@@ -152,6 +154,7 @@ module ahci_fis_transmit #(
...
@@ -152,6 +154,7 @@ module ahci_fis_transmit #(
wirect_re_w;// next cycle will be ct_re;
wirect_re_w;// next cycle will be ct_re;
reg[READ_CT_LATENCY:0]ct_re_r;
reg[READ_CT_LATENCY:0]ct_re_r;
wirect_stb=ct_re_r[READ_CT_LATENCY];
wirect_stb=ct_re_r[READ_CT_LATENCY];
regfis_dw_first;
regfis_dw_first;
...
@@ -204,7 +207,9 @@ module ahci_fis_transmit #(
...
@@ -204,7 +207,9 @@ module ahci_fis_transmit #(
// What else to wait for when
// What else to wait for when
assignfis_data_valid=ct_stb||(!dma_ct_busy&&dx_fis_pend_r);// no wait write to output register 'todev_data', ct_re_r[0] is throttled according to FIFO room availability
assignfis_data_valid=ct_stb||(!dma_ct_busy&&dx_fis_pend_r);// no wait write to output register 'todev_data', ct_re_r[0] is throttled according to FIFO room availability
assignct_re_w=todev_ready&&((cfis_acmd_left_r[4:1]!=0)||(cfis_acmd_left_r[0]&&!ct_re_r[0]));// Later add more sources
/// assign ct_re_w = todev_ready && ((cfis_acmd_left_r[4:1] != 0) || (cfis_acmd_left_r[0] && !ct_re_r[0])); // Later add more sources
assignct_re_w=todev_ready&&acfis_xmit_busy_r&&((cfis_acmd_left_r[4:1]!=0)||(cfis_acmd_left_r[0]&&!ct_re_r[0]));// Later add more sources