if((ts_in[3]&&(ts_in[1:0]==0))||write_size)time_ram0[ts_in[3:2]]<=ts_in[3]?({imgsz4[5:0],flush?2'b0:bytes_in}):ts_dout;//ts_in[3:2] == 2'b10 when write_size
if((!ts_in[3]&&(ts_in[1:0]==0))||write_size)time_ram0[ts_in[3:2]]<=ts_in[3]?({imgsz4[5:0],flush?2'b0:bytes_in}):ts_dout;//ts_in[3:2] == 2'b10 when write_size