parameterSENSOR_FIFO_DELAY=7// approxiametly half (1 << SENSOR_FIFO_2DEPTH) - how long to wait after getting HACT on FIFO before stering it on output
parameterSENSOR_FIFO_DELAY=5// 7 // approxiametly half (1 << SENSOR_FIFO_2DEPTH) - how long to wait after getting HACT on FIFO before stering it on output
)(
// input rst,
inputiclk,// input -synchronous clock
...
...
@@ -45,7 +45,8 @@ module sensor_fifo #(
regsof_r,eof_r;
wirewe;
// output clock domain
wirepre_re,re_w,re;
// wire pre_re;
wirere;// re_w,re;
regre_r;
reg[1:0]pre_hact;
reghact_out_r;
...
...
@@ -86,14 +87,44 @@ module sensor_fifo #(
);
// output clock domain
assignpre_re=nempty&&!re_r;
assignre_w=re_r&&nempty;// to protect from false positive on nempty
assignre=(re_w&&!pre_hact)||hact_out_r;
// assign pre_re = nempty && !re_r;
// Generating first read (for hact), then wait to fill half FIFO and continue continuous read until hact end
// assign re_w = re_r && nempty; // to protect from false positive on nempty
// assign re = (re_w && !pre_hact) || hact_out_r; // no check for nempty - producing un-interrupted stream
assignre=(re_r&&nempty&&!pre_hact[0])||hact_out_r;// no check for nempty - producing un-interrupted stream
assignpxd_out=pxd_r;
assigndata_valid=hact_out_r;
assignsof=sof_r;
assigneof=eof_r;
always@(posedgepclk)begin
if(prst)re_r<=0;
elsere_r<=nempty&&!re_r&&!pre_hact[0];// only generate one cycle (after SOF of HACT)
`include"includes/x393_parameters.vh"// SuppressThisWarning VEditor - not used
...
...
@@ -54,7 +57,7 @@ module x393_testbench02 #(
`ifdefIVERILOG
// $display("IVERILOG is defined");
`ifdefNON_VDT_ENVIROMENT
parameterlxtname="x393.lxt";
parameterfstname="x393.fst";
`else
`include"IVERILOG_INCLUDE.v"
`endif// NON_VDT_ENVIROMENT
...
...
@@ -62,12 +65,12 @@ module x393_testbench02 #(
// $display("IVERILOG is not defined");
`ifdefCVC
`ifdefNON_VDT_ENVIROMENT
parameterlxtname="x393.fst";
parameterfstname="x393.fst";
`else// NON_VDT_ENVIROMENT
`include"IVERILOG_INCLUDE.v"
`endif// NON_VDT_ENVIROMENT
`else
parameterlxtname="x393.lxt";
parameterfstname="x393.fst";
`endif// CVC
`endif// IVERILOG
`defineDEBUG_WR_SINGLE1
...
...
@@ -75,9 +78,14 @@ module x393_testbench02 #(
//`include "includes/x393_cur_params_sim.vh" // parameters that may need adjustment, should be before x393_localparams.vh
`include"includes/x393_cur_params_target.vh"// SuppressThisWarning VEditor - not used parameters that may need adjustment, should be before x393_localparams.vh
`include"includes/x393_localparams.vh"// SuppressThisWarning VEditor - not used