//reset_data_counters; // reset data transfer counters (only when DMA and compressor are disabled)
//reset_data_counters; // reset data transfer counters (only when DMA and compressor are disabled)
// if (reset_data_counters ) etrax_dma[3:0] <= 0; // not needed to be reset after frame, and that was wrong (to early)
// if (reset_data_counters ) etrax_dma[3:0] <= 0; // not needed to be reset after frame, and that was wrong (to early)
if(!en)etrax_dma[3:0]<=0;// Now en here waits for flashing to end, so it should not be too early
if(!en)etrax_dma[3:0]<=0;// Now en here waits for flashing to end, so it should not be too early
elseif(qv)etrax_dma[3:0]<=etrax_dma[3:0]+1;
elseif(qv)etrax_dma[3:0]<=etrax_dma[3:0]+1;
...
@@ -366,4 +410,21 @@ end
...
@@ -366,4 +410,21 @@ end
dly_16#(.WIDTH(1))i_pre_flush_end_delayed(.clk(~clk),.rst(1'b0),.dly(14),.din(size_out[1]),.dout(pre_flush_end_delayed));// dly=14+1 // rather arbitrary?
dly_16#(.WIDTH(1))i_pre_flush_end_delayed(.clk(~clk),.rst(1'b0),.dly(14),.din(size_out[1]),.dout(pre_flush_end_delayed));// dly=14+1 // rather arbitrary?
assigndone=flush_end_delayed;
assigndone=flush_end_delayed;
// extract strart of frame run from different clock, re-clock from the source