41 input xclk,
// pixel clock, posedge 42 input xclk2x,
// twice frequency - uses negedge inside 43 input en,
// will reset if ==0 (sync to xclk) 44 input [
15:
0]
di,
// data in (sync to xclk) 45 input ds,
// din valid (sync to xclk) 47 output dav,
// FIFO output latch has data (fifo_or_full) 54 reg ds1;
// ds delayed by one xclk to give time to block ram to write data. Not needed likely. 57 reg sync_we;
// single xclk2x period pulse for each ds@xclk 58 reg en2x;
// en sync to xclk2x; 63 reg [
2:
0]
nempty_r;
// output register and RAM registers not empty 64 wire [
3:
0]
nempty;
// output register and RAM register and RAM internal are not empty 69 assign many = &(
nempty);
// memory and all the register chain are full 75 always @ (
posedge xclk)
begin // input stage, no overrun detection. TODO: propagate half-full? 120 .
ren (
re[
3]),
// input 124 .
waddr (
wa[
9:
0]),
// input[9:0] 126 .
web (
4'hf),
// input[3:0]
[1 << LOG2WIDTH_WR-1:0] 11597data_in
[1 << LOG2WIDTH_RD-1:0] 11592data_out
[13-LOG2WIDTH_RD:0] 11589raddr
[13-LOG2WIDTH_WR:0] 11594waddr