// axi_dirty_r <= (|afi_wacount) || (|afi_rcount); // afi_wacount of afi_rcount are non-zero (assuming afi_wcount should be zero as addresses are posted first
// if (abort_or_reset && axi_dirty_r) abort_busy_hclk <= 1'b1;
addr_data_rq_r<=addr_data_rq_w;
prd_start_hclk_r<=prd_start_hclk;
if(hrst||cmd_abort_hclk)prd_enabled<=0;
elseif(prd_start_hclk_r)prd_enabled<=1;// presedence over cmd_start_hclk
if(hrst||abort_or_reset)prd_enabled<=0;
elseif(prd_start_hclk_r)prd_enabled<=1;// precedence over cmd_start_hclk
elseif(cmd_start_hclk)prd_enabled<=0;
...
...
@@ -388,17 +441,21 @@ module ahci_dma (
/// if (addr_data_rq) data_len <= ((|qwcount[21:7]) || (&qwcount[6:3]))? 4'hf: qwcount[6:3]; // early calculate
if(addr_data_rq_r)data_len<=((|qwcount[21:7])||(&qwcount[6:3]))?4'hf:qwcount[6:3];// early calculate
/// if (wcount_set) qwcount[21:1] <= wcount[21:1] + data_addr[2:1]; //minus 1
/// else if (axi_set_addr_data_w) qwcount[21:7] <= qwcount[21:7] - 1; // may get negative