x393  1.0
FPGAcodeforElphelNC393camera
focus_sharp393.v
Go to the documentation of this file.
1 
39 
78  // This file may be used to define same pre-processor macros to be included into each parsed file
79 `ifndef SYSTEM_DEFINES
80  `define SYSTEM_DEFINES
81  // TODO: Later compare instantiate/infer
82  `define INSTANTIATE_DSP48E1
83  `define DEBUG_DCT1D// undefine after debugging is over // `define USE_OLD_DCT
84 
85 // Parameters from x393_sata project
86  `define USE_DRP
87  `define ALIGN_CLOCKS
88 // `define STRAIGHT_XCLK
89  `define USE_DATASCOPE
90 // `define DATASCOPE_INCOMING_RAW
91  `define PRELOAD_BRAMS
92 // `define AHCI_SATA 1
93 // `define DEBUG_ELASTIC
94 // End of parameters from x393_sata project
95 
96  `define PRELOAD_BRAMS
97  `define DISPLAY_COMPRESSED_DATA // if HISPI is not defined, parallel sensor interface is used for all channels
98  `define HISPI /*************** CHANGE here and x393_hispi/x393_parallel in bitstream tool settings ****************/// `define USE_OLD_XDCT393
99 // `define USE_PCLK2X
100 // `define USE_XCLK2X
101  `define REVERSE_LANES 1 `define DEBUG_RING 1 `define USE_HARD_CURPARAMS// Adjustment of actual hardware may break simulation // `define DEBUG_SENS_MEM_PAGES 1
102 // `define MCLK_VCO_MULT 16
103 // DDR3 memory speed grade and density
104  `define sg25 1// `define sg15E 1
105 // `define sg187E 1
106  `define den4096Mb 1
107  `define MCLK_VCO_MULT 16// `define MCLK_VCO_MULT 18
108 // `define MCLK_VCO_MULT 20
109 
110  `define MEMBRIDGE_DEBUG_WRITE 1// Enviroment-dependent options
111  `ifdef IVERILOG
112  `define SIMULATION
113  `define OPEN_SOURCE_ONLY
114  `endif
115 
116  `ifdef COCOTB
117  `define SIMULATION
118  `define OPEN_SOURCE_ONLY
119  `endif
120 
121  `ifdef CVC
122  `define SIMULATION
123  `define OPEN_SOURCE_ONLY
124  `endif // CVC
125 
126 // will not use simultaneous reset in shift registers, just and input data with ~rst
127  `define SHREG_SEQUENTIAL_RESET 1// synthesis does to recognize global clock as G input of the primitive latch
128  `undef INFER_LATCHES
129  // define when using CDC - it does not support them
130  `undef IGNORE_ATTR
131 //`define MEMBRIDGE_DEBUG_READ 1
132  `define use200Mhz 1 `define USE_CMD_ENCOD_TILED_32_RD 1 // chn 0 is read from memory and write to memory
133  `define def_enable_mem_chn0
134  `define def_read_mem_chn0
135  `define def_write_mem_chn0
136  `undef def_scanline_chn0
137  `undef def_tiled_chn0
138 
139  // chn 1 is scanline r+w
140  `define def_enable_mem_chn1
141  `define def_read_mem_chn1
142  `define def_write_mem_chn1
143  `define def_scanline_chn1
144  `undef def_tiled_chn1
145 
146  // chn 2 is tiled r+w
147  `define def_enable_mem_chn2
148  `define def_read_mem_chn2
149  `define def_write_mem_chn2
150  `undef def_scanline_chn2
151  `define def_tiled_chn2
152 
153  // chn 3 is scanline r+w (reuse later)
154  `define def_enable_mem_chn3
155  `define def_read_mem_chn3
156  `define def_write_mem_chn3
157  `define def_scanline_chn3
158  `undef def_tiled_chn3
159 
160  // chn 4 is tiled r+w (reuse later)
161  `define def_enable_mem_chn4
162  `define def_read_mem_chn4
163  `define def_write_mem_chn4
164  `undef def_scanline_chn4
165  `define def_tiled_chn4
167  // chn 5 is disabled
168  `undef def_enable_mem_chn5
170  // chn 6 is disabled
171  `undef def_enable_mem_chn6
172 
173  // chn 7 is disabled
174  `undef def_enable_mem_chn7
175 
176  // chn 8 is scanline w (sensor channel 0)
177  `define def_enable_mem_chn8
178  `undef def_read_mem_chn8
179  `define def_write_mem_chn8
180  `define def_scanline_chn8
181  `undef def_tiled_chn8
182 
183  // chn 9 is scanline w (sensor channel 1)
184  `define def_enable_mem_chn9
185  `undef def_read_mem_chn9
186  `define def_write_mem_chn9
187  `define def_scanline_chn9
188  `undef def_tiled_chn9
190  // chn 10 is scanline w (sensor channel 2)
191  `define def_enable_mem_chn10
192  `undef def_read_mem_chn10
193  `define def_write_mem_chn10
194  `define def_scanline_chn10
195  `undef def_tiled_chn10
197  // chn 11 is scanline w (sensor channel 3)
198  `define def_enable_mem_chn11
199  `undef def_read_mem_chn11
200  `define def_write_mem_chn11
201  `define def_scanline_chn11
202  `undef def_tiled_chn11
203 
204  // chn 12 is tiled read (compressor channel 0)
205  `define def_enable_mem_chn12
206  `define def_read_mem_chn12
207  `undef def_write_mem_chn12
208  `undef def_scanline_chn12
209  `define def_tiled_chn12
210 
211  // chn 12 is tiled read (compressor channel 1)
212  `define def_enable_mem_chn13
213  `define def_read_mem_chn13
214  `undef def_write_mem_chn13
215  `undef def_scanline_chn13
216  `define def_tiled_chn13
217 
218  // chn 12 is tiled read (compressor channel 2)
219  `define def_enable_mem_chn14
220  `define def_read_mem_chn14
221  `undef def_write_mem_chn14
222  `undef def_scanline_chn14
223  `define def_tiled_chn14
224 
225  // chn 12 is tiled read (compressor channel 3)
226  `define def_enable_mem_chn15
227  `define def_read_mem_chn15
228  `undef def_write_mem_chn15
229  `undef def_scanline_chn15
230  `define def_tiled_chn15
231 `endif
232 
233 `timescale 1ns/1ps
234 // TODO: Modify to work with other modes (now only on color)
235 // NOTE: when removing clk2x, temporarily use clk here, just keep mode ==0 (disabled)
237  input clk, // pixel clock, posedge
238  input clk2x, // 2x pixel clock
239  input en, // enable (0 resets)
240  input mclk, // system clock to write tables
241  input tser_we, // enable write to a table
242  input tser_a_not_d, // address/not data distributed to submodules
243  input [ 7:0] tser_d, // byte-wide serialized tables address/data to submodules
244  input [ 1:0] mode, // focus mode (combine image with focus info) - 0 - none, 1 - replace, 2 - combine all, 3 - combine woi
245  input firsti, // first macroblock
246  input lasti, // last macroblock
247  input [ 2:0] tni, // block number in a macronblock - 0..3 - Y, >=4 - color (sync to stb)
248  input stb, // strobe that writes ctypei, dci
249  input start, // marks first input pixel (needs 1 cycle delay from previous DCT stage)
250  input [12:0] di, // [11:0] pixel data in (signed)
251  input quant_ds, // quantizator ds
252  input [12:0] quant_d, // [11:0]quantizator data output
253  input [15:0] quant_dc_tdo, // [15:0], MSB aligned coefficient for the DC component (used in focus module)
254  output reg [12:0] do, // [11:0] pixel data out, make timing ignore (valid 1.5 clk earlier that Quantizer output)
255  output reg ds, // data out strobe (one ahead of the start of dv)
256  output reg [31:0] hifreq); //[31:0]) // accumulated high frequency components in a frame sub-window
257 
258  wire [15:0] tdo;
259  reg [ 5:0] tba;
260  reg [11:0] wnd_reg; // intermediate register
261  reg wnd_wr; // writing window
262  reg [ 2:0] wnd_a; // window register address
263 
264  // next measured in 8x8 blocks, totalwidth - write one less than needed (i.e. 511 fro the 512-wide window)
265  // blocks on the border are included
266  reg [ 8:0] wnd_left;
267  reg [ 8:0] wnd_right;
268  reg [ 8:0] wnd_top;
269  reg [ 8:0] wnd_bottom;
270  reg [ 8:1] wnd_totalwidth;
271  reg [ 3:0] filt_sel0; // select filter number, 0..14 (15 used for window parameters)
272  reg [ 3:0] filt_sel; // select filter number, 0..14 (15 used for window parameters)
273  reg stren; // strength (visualization)
274  reg [ 2:0] ic;
275  reg [ 2:0] oc;
276  wire first,last; //valid at start (with first di word), switches immediately after
277  wire [ 2:0] tn;
278  reg [39:0] acc_frame;
279  reg [12:0] pre_do;
280  reg pre_ds;
281  reg need_corr_max; // limit output by quant_dc_tdo
282  reg [11:0] fdo; // focus data output
283  reg start_d; //start delayed by 1
284  reg [ 2:0] tn_d; //tn delayed by 1
285 
286  wire out_mono;
287  wire out_window;
288  wire [12:0] combined_qf;
289  wire [12:0] next_do;
290  wire [12:0] fdo_minus_max;
291  reg [11:0] di_d;
292  reg [11:0] d1;
293  reg [8:0] start2;
294 // reg [7:0] finish2;
295  reg [6:0] finish2; // bit[7] never used
296  reg [5:0] use_k_dly;
297  reg [23:0] acc_blk; // accumulator for the sum ((a[i]*d[i])^2)
298  reg [22:0] sum_blk; // accumulator for the sum ((a[i]*d[i])^2), copied at block end
299  reg acc_ldval; // value to load to acc_blk: 0 - 24'h0, 1 - 24'h7fffff
300  wire acc_clear=start2[8];
301  wire acc_add=use_k_dly[4];
302  wire acc_corr=use_k_dly[5];
303  wire acc_to_out=finish2[6];
304  wire [17:0] mult_a;
305  wire [17:0] mult_b;
306  wire [35:0] mult_p;
307 
308  reg [17:0] mult_s; //truncated and saturated (always positive) multiplier result (before calculating squared)
309  reg next_ac; // next will be AC component
310  reg use_coef; // use multiplier for the first operation - DCT coeff. by table elements
311  reg started_luma;// started Luma block
312  reg luma_dc_out; // 1 cycle ahead of the luma DC component out (optionally combined with the WOI (mode=3))
313  reg luma_dc_acc; // 1 cycle ahead of the luma DC component out (always combined with the WOI)
314  reg was_last_luma;
315  reg copy_acc_frame;
316 
317  wire twe;
318  wire [15:0] tdi;
319  wire [22:0] ta;
320 
321  assign fdo_minus_max[12:0]= {1'b0,fdo[11:0]}-{1'b0,quant_dc_tdo[15:5]};
322  assign combined_qf[12:0]=stren?({quant_d[12:0]}+{1'b0,fdo[11:0]}): //original image plus positive
323  ({quant_d[12],quant_d[12:1]}+ // half original
324  {fdo_minus_max[12],fdo_minus_max[12:1]}); // plus half signed
325  assign next_do[12:0] = (mode[1:0]==2'h1)?(luma_dc_out?fdo_minus_max[12:0]:13'h0):
326  ((mode[1] && luma_dc_out )? combined_qf[12:0]: {quant_d[12:0]} );
327 
328  always @ (posedge clk) begin
329  if (!en) ic[2:0] <= 3'b0;
330  else if (stb) ic[2:0] <= ic[2:0]+1;
331  if (!en) oc[2:0] <= 3'b0;
332  else if (start) oc[2:0] <= oc[2:0]+1;
333  end
334 
335 // writing window parameters in the last bank of a table
336  always @ (posedge mclk) begin
337  if (twe) begin
338  wnd_reg[11:0] <= tdi[11:0] ;
339  wnd_a <= ta[2:0];
340  end
341  wnd_wr <= twe && (ta[9:3]==7'h78) ; // first 8 location in the last 64-word bank
342  if (wnd_wr) begin
343  case (wnd_a[2:0])
344  3'h0: wnd_left[8:0] <= wnd_reg[11:3] ;
345  3'h1: wnd_right[8:0] <= wnd_reg[11:3] ;
346  3'h2: wnd_top[8:0] <= wnd_reg[11:3] ;
347  3'h3: wnd_bottom[8:0] <= wnd_reg[11:3] ;
348  3'h4: wnd_totalwidth[8:1] <= wnd_reg[11:4] ;
349  3'h5: filt_sel0[3:0] <= wnd_reg[3:0] ;
350  3'h6: stren <= wnd_reg[0] ;
351  default: begin end
352  endcase
353  end
354  end
355 
356 // determine if this block needs to be processed (Y, inside WOI)
357  reg [ 7:0] mblk_hor; //horizontal macroblock (2x2 blocks) counter
358  reg [ 7:0] mblk_vert; //vertical macroblock (2x2 blocks) counter
359  wire start_of_line= (first || (mblk_hor[7:0] == wnd_totalwidth[8:1]));
360  wire first_in_macro= (tn[2:0]==3'h0);
361  reg in_woi; // maybe specified as slow
362 
363  always @(posedge clk) begin
364  if (first_in_macro && start) mblk_hor[7:0] <= start_of_line? 8'h0:(mblk_hor[7:0]+1);
365  if (first_in_macro && start && start_of_line) mblk_vert[7:0] <= first? 8'h0:(mblk_vert[7:0]+1);
366  start_d <= start;
367  tn_d[2:0] <= tn[2:0];
368  if (start_d) in_woi <= !tn_d[2] &&
369  ({mblk_hor [7:0],tn_d[0]} >= wnd_left[8:0]) &&
370  ({mblk_hor [7:0],tn_d[0]} <= wnd_right[8:0]) &&
371  ({mblk_vert[7:0],tn_d[1]} >= wnd_top[8:0]) &&
372  ({mblk_vert[7:0],tn_d[1]} <= wnd_bottom[8:0]);
373  end
374 
375 //Will use posedge sclk to balance huffman and system
376 
377 // wire clkdiv2;
378 // FD i_clkdiv2(.C(clk), .D(!clkdiv2), .Q(clkdiv2));
379 
380  reg clkdiv2=0;
381  always @ (posedge clk) begin
382  clkdiv2 <= ~clkdiv2;
383  end
384 
385 
386  reg [2:0] clksync;
387  wire csync=clksync[2];
388  always @ (posedge clk2x) begin
389  clksync[2:0] <= {(clksync[1]==clksync[0]),clksync[0],clkdiv2};
390  end
391 
392  always @ (posedge clk) begin
393  if (di[11]==di[12]) di_d[11:0] <=di[11:0];
394  else di_d[11:0] <= {~di[11],{11{di[11]}}}; //saturate
395  end
396 
397  assign mult_a[17:0] = use_coef ? {1'b0,tdo[15:0],1'b0}: mult_s[17:0];
398  assign mult_b[17:0] = use_coef ? {d1[10:0],{7{d1[0]}}}: mult_s[17:0];
399 
400  always @ (posedge clk2x) begin
401  filt_sel[3:0] <= filt_sel0[3:0];
402  if (clksync[2]) d1[11:0]<=di_d[11:0];
403  start2[8:0] <= {start2[7:0], start && csync};
404 // finish2[7:0]<= {finish2[6:0],use_coef && !next_ac};
405  finish2[6:0]<= {finish2[5:0],use_coef && !next_ac}; // finish2[7] was never used
406  if (!en || start2[0]) tba[5:0] <= 6'h0;
407  else if (!csync && (tba[5:0] != 6'h3f)) tba[5:0] <= tba[5:0] + 1;
408 // mult_s[17:0] <= (&mult_p[35:31] || !(&mult_p[35:31]))?mult_p[31:14]:18'h1ffff;
409  mult_s[17:0] <= (&mult_p[35:31] || !(|mult_p[35:31]))?mult_p[31:14]:18'h1ffff;
410  next_ac <= en && (start2[3] || (next_ac && ((tba[5:0] != 6'h3f) || csync )));
411  use_coef <= next_ac && !csync;
412  use_k_dly[5:0] <= {use_k_dly[4:0],use_coef};
413  acc_ldval <= !(|start2[7:6]);
414  if (acc_clear || (acc_corr && acc_blk[23])) acc_blk[23:0] <= {1'b0,{23{acc_ldval}}};
415  else if (acc_add) acc_blk[23:0] <= acc_blk[23:0] + mult_p[31:8]; // mult_p[35:8];
416  if (acc_to_out) fdo[11:0] <= (|acc_blk[23:20])?12'hfff:acc_blk[19:8]; // positive, 0..0xfff
417  if (acc_to_out) sum_blk[22:0] <= acc_blk[22:0]; // accumulator for the sum ((a[i]*d[i])^2), copied at block end
418  end
419 
420 // acc_blk will (after corr) be always with MSB=0 - max 24'h7fffff
421 // for image output - max 24'h0fffff->12 bit signed, shifted
422 // combining output
423 //assign combined_qf[12:0]={quant_d[11],quant_d[11:0]}+{fdo[11],fdo[11:0]};
424 
425 // SRL16 i_out_mono (.Q(out_mono), .A0(1'b1), .A1(1'b1), .A2(1'b1), .A3(1'b1), .CLK(clk), .D(started_luma)); // timing not critical
426 // SRL16 i_out_window (.Q(out_window), .A0(1'b1), .A1(1'b1), .A2(1'b1), .A3(1'b1), .CLK(clk), .D(in_woi)); // timing not critical
427  dly_16 #(.WIDTH(1)) i_out_mono(.clk(clk), .rst(1'b0), .dly(4'd15), .din(started_luma), .dout(out_mono)); // timing not critical
428  dly_16 #(.WIDTH(1)) i_out_window(.clk(clk),.rst(1'b0), .dly(4'd15), .din(in_woi), .dout(out_window)); // timing not critical
429 
430  always @ (posedge clk) begin
431  if (start) started_luma <= !tn[2];
432  luma_dc_out <= quant_ds && out_mono && ((mode[1:0]!=3) || out_window);
434  was_last_luma <= en && last && out_mono;
436  if (first && first_in_macro) acc_frame[39:0] <= 40'h0;
437  else if (luma_dc_acc) acc_frame[39:0] <= acc_frame[39:0] + sum_blk[22:0];
438  if (copy_acc_frame) hifreq[31:0] <= acc_frame[39:8];
439  pre_ds <= quant_ds;
440  ds <= pre_ds;
441  pre_do[12:0] <= next_do[12:0];
442  need_corr_max <=luma_dc_out && (mode[1:0]!=2'h0);
443  do[12:0] <= (need_corr_max && !pre_do[12] && (pre_do[11] || (pre_do[10:0]>quant_dc_tdo[15:5])) )?
444  {2'b0,quant_dc_tdo[15:5]} :
445  pre_do[12:0];
446  end
447 
449  .MODE_16_BITS (1),
450  .NUM_CHN (1)
451  ) table_ad_receive_i (
452  .clk (mclk), // input
453  .a_not_d (tser_a_not_d), // input
454  .ser_d (tser_d), // input[7:0]
455  .dv (tser_we), // input
456  .ta (ta), // output[22:0]
457  .td (tdi), // output[15:0]
458  .twe (twe) // output
459  );
460 
461 
462 /*
463  MULT18X18SIO #(
464  .AREG(1), // Enable the input registers on the A port (1=on, 0=off)
465  .BREG(1), // Enable the input registers on the B port (1=on, 0=off)
466  .B_INPUT("DIRECT"), // B cascade input "DIRECT" or "CASCADE"
467  .PREG(1) // Enable the input registers on the P port (1=on, 0=off)
468  ) i_focus_mult (
469  .BCOUT(), // 18-bit cascade output
470  .P(mult_p), // 36-bit multiplier output
471  .A(mult_a), // 18-bit multiplier input
472  .B(mult_b), // 18-bit multiplier input
473  .BCIN(18'h0), // 18-bit cascade input
474  .CEA(en), // Clock enable input for the A port
475  .CEB(en), // Clock enable input for the B port
476  .CEP(en), // Clock enable input for the P port
477  .CLK(sclk), // Clock input
478  .RSTA(1'b0), // Synchronous reset input for the A port
479  .RSTB(1'b0), // Synchronous reset input for the B port
480  .RSTP(1'b0) // Synchronous reset input for the P port
481  );
482 */
483  reg [35:0] mult_p_r;
484  reg [17:0] mult_a_r;
485  reg [17:0] mult_b_r;
486  assign mult_p = mult_p_r;
487  always @(posedge clk2x) begin
488  mult_a_r <= mult_a;
489  mult_b_r <= mult_b;
491  end
492 
493 /*
494  RAM16X1D i_tn0 (.D(tni[0]),.DPO(tn[0]),.A0(ic[0]),.A1(ic[1]),.A2(1'b0),.A3(1'b0),.DPRA0(oc[0]),.DPRA1(oc[1]),.DPRA2(1'b0),.DPRA3(1'b0),.WCLK(clk),.WE(stb));
495  RAM16X1D i_tn1 (.D(tni[1]),.DPO(tn[1]),.A0(ic[0]),.A1(ic[1]),.A2(1'b0),.A3(1'b0),.DPRA0(oc[0]),.DPRA1(oc[1]),.DPRA2(1'b0),.DPRA3(1'b0),.WCLK(clk),.WE(stb));
496  RAM16X1D i_tn2 (.D(tni[2]),.DPO(tn[2]),.A0(ic[0]),.A1(ic[1]),.A2(1'b0),.A3(1'b0),.DPRA0(oc[0]),.DPRA1(oc[1]),.DPRA2(1'b0),.DPRA3(1'b0),.WCLK(clk),.WE(stb));
497  RAM16X1D i_first (.D(firsti),.DPO(first),.A0(ic[0]),.A1(ic[1]),.A2(1'b0),.A3(1'b0),.DPRA0(oc[0]),.DPRA1(oc[1]),.DPRA2(1'b0),.DPRA3(1'b0),.WCLK(clk),.WE(stb));
498  RAM16X1D i_last (.D(lasti), .DPO(last), .A0(ic[0]),.A1(ic[1]),.A2(1'b0),.A3(1'b0),.DPRA0(oc[0]),.DPRA1(oc[1]),.DPRA2(1'b0),.DPRA3(1'b0),.WCLK(clk),.WE(stb));
499 */
500  reg [ 4:0] ram4[0:3];
501  always @ (posedge clk) begin
502  ram4[ic[1:0]] <= {lasti,firsti,tni[2:0]};
503  end
504  assign {last,first,tn[2:0]} = ram4[oc[1:0]];
505 // is it correct posedge sclk on rd, negedge on wr and no xclk?
506 /*
507  RAMB16_S18_S18 i_focus_dct_tab (
508  .DOA(tdo[15:0]), // Port A 16-bit Data Output
509  .DOPA(), // Port A 2-bit Parity Output
510  .ADDRA({filt_sel[3:0],tba[2:0],tba[5:3]}), // Port A 10-bit Address Input
511  .CLKA(sclk), // Port A Clock
512  .DIA(16'b0), // Port A 16-bit Data Input
513  .DIPA(2'b0), // Port A 2-bit parity Input
514  .ENA(1'b1), // Port A RAM Enable Input
515  .SSRA(1'b0), // Port A Synchronous Set/Reset Input
516  .WEA(1'b0), // Port A Write Enable Input
517 
518  .DOB(), // Port B 16-bit Data Output
519  .DOPB(), // Port B 4-bit Parity Output
520  .ADDRB({ta[9:0]}), // Port B 2-bit Address Input
521  .CLKB(!sclk), // Port B Clock
522  .DIB(tdi[15:0]), // Port B 16-bit Data Input
523  .DIPB(2'b0), // Port-B 2-bit parity Input
524  .ENB(1'b1), // PortB RAM Enable Input
525  .SSRB(1'b0), // Port B Synchronous Set/Reset Input
526  .WEB(twe) // Port B Write Enable Input
527  );
528 */
530  .REGISTERS (0),
531  .LOG2WIDTH_WR (4),
532  .LOG2WIDTH_RD (4),
533  .DUMMY (0)
534 `ifdef PRELOAD_BRAMS, .INIT_00 (256'h000008880FFF0FFF0888044401110111000008880FFF0FFF0888044401110000)
535 , .INIT_01 (256'h00000222044408880FFF0FFF088808880000044408880FFF0FFF088804440444)
536 , .INIT_02 (256'h0000000001110222044408880FFF0FFF000001110222044408880FFF0FFF0FFF)
537 , .INIT_03 (256'h0000000000000000000000000000000000000000000001110222044408880888)
538 , .INIT_04 (256'h00008888FFFFFFFF888844441111111100008888FFFFFFFF8888444411110000)
539 , .INIT_05 (256'h0000222244448888FFFFFFFF88888888000044448888FFFFFFFF888844444444)
540 , .INIT_06 (256'h000000001111222244448888FFFFFFFF00001111222244448888FFFFFFFFFFFF)
541 , .INIT_07 (256'h0000000000000000000000000000000000000000000011112222444488888888)
542 
543 `endif
544  ) i_focus_dct_tab (
545  .rclk (clk), // input
546  .raddr ({filt_sel[3:0],tba[2:0],tba[5:3]}), // input[9:0]
547  .ren (1'b1), // input
548  .regen (1'b1), // input
549  .data_out (tdo[15:0]), // output[31:0]
550  .wclk (mclk), // input
551  .waddr (ta[9:0]), // input[8:0]
552  .we (twe), // input
553  .web (4'hf), // input[3:0]
554  .data_in (tdi[15:0]) // input[31:0]
555  );
556 
557 endmodule
558 
559 
10332clk
Definition: dly_16.v:44
2385acc_framereg[39:0]
i_out_window dly_16
[15:0] 2363quant_dc_tdo
[NUM_CHN-1:0] 11054twe
[ 7:0] 2353tser_d
table_ad_receive_i table_ad_receive
reg [12:0] 2364do
2377filt_sel0reg[3:0]
2384tnwire[2:0]
2378filt_selreg[3:0]
2372wnd_leftreg[8:0]
2394combined_qfwire[12:0]
[1 << LOG2WIDTH_WR-1:0] 11597data_in
2410mult_bwire[17:0]
2395next_dowire[12:0]
[1 << LOG2WIDTH_RD-1:0] 11592data_out
[0:3] 2434ram4reg[4:0]
[13-LOG2WIDTH_RD:0] 11589raddr
2397di_dreg[11:0]
2429clksyncreg[2:0]
2369wnd_regreg[11:0]
2403sum_blkreg[22:0]
2376wnd_totalwidthreg[8:1]
2400finish2reg[6:0]
i_focus_dct_tab ram18_var_w_var_r
[WIDTH-1:0] 10336dout
Definition: dly_16.v:48
[MODE_16_BITS?15:7:0] 11053td
reg [31:0] 2366hifreq
2431mult_p_rreg[35:0]
2412mult_sreg[17:0]
[12:0] 2362quant_d
2432mult_a_rreg[17:0]
2399start2reg[8:0]
2389fdoreg[11:0]
[WIDTH-1:0] 10335din
Definition: dly_16.v:47
2375wnd_bottomreg[8:0]
2374wnd_topreg[8:0]
2396fdo_minus_maxwire[12:0]
2411mult_pwire[35:0]
2371wnd_areg[2:0]
2409mult_awire[17:0]
[23-MODE_16_BITS:0] 11052ta
2423mblk_horreg[7:0]
[13-LOG2WIDTH_WR:0] 11594waddr
2424mblk_vertreg[7:0]
2422tawire[22:0]
2367tdowire[15:0]
[ 1:0] 2354mode
2402acc_blkreg[23:0]
2421tdiwire[15:0]
2391tn_dreg[2:0]
2373wnd_rightreg[8:0]
2401use_k_dlyreg[5:0]
2386pre_doreg[12:0]
10333rst
Definition: dly_16.v:45
[NUM_CHN-1:0] 11051dv
2433mult_b_rreg[17:0]
[3:0] 10334dly
Definition: dly_16.v:46