x393  1.0
FPGAcodeforElphelNC393camera
sens_histogram.v
Go to the documentation of this file.
1 
39 `timescale 1ns/1ps
40  // TODO: get rid of pclk2x by doubling memories (making 1 write port and 2 read ones)
41  // How to erase?
42  // Alternative: copy/erase to a separate buffer in the beginning/end of a frame?
43 
44 module sens_histogram #(
45  parameter HISTOGRAM_RAM_MODE = "BUF32", // "NOBUF", // valid: "NOBUF" (32-bits, no buffering), "BUF18", "BUF32"
46  parameter HISTOGRAM_ADDR = 'h33c,
47  parameter HISTOGRAM_ADDR_MASK = 'h7fe,
48  parameter HISTOGRAM_LEFT_TOP = 'h0,
49  parameter HISTOGRAM_WIDTH_HEIGHT = 'h1, // 1.. 2^16, 0 - use HACT
50  parameter [1:0] XOR_HIST_BAYER = 2'b00// 11 // invert bayer setting
51 `ifdef DEBUG_RING
52  ,parameter DEBUG_CMD_LATENCY = 2 // SuppressThisWarning VEditor - not used
53 `endif
54 
55 )(
56  input mrst, // @posedge mclk, sync reset
57  input prst, // @posedge pclk, sync reset
58  input pclk, // global clock input, pixel rate (96MHz for MT9P006)
59  input pclk2x,
60  input sof,
61  input eof,
62  input hact,
63  input [7:0] hist_di, // 8-bit pixel data
64 
65  input mclk,
66  input hist_en, // @mclk - gracefully enable/disable histogram
67  input hist_rst, // @mclk - immediately disable if true
68  output hist_rq,
69  input hist_grant,
70  output [31:0] hist_do,
71  output hist_dv,
72  input [7:0] cmd_ad, // byte-serial command address/data (up to 6 bytes: AL-AH-D0-D1-D2-D3
73  input cmd_stb, // strobe (with first byte) for the command a/d
74  input monochrome // tie to 0 to reduce hardware
75 `ifdef DEBUG_RING
76  ,output debug_do, // output to the debug ring
77  input debug_sl, // 0 - idle, (1,0) - shift, (1,1) - load // SuppressThisWarning VEditor - not used
78  input debug_di // input from the debug ring
79 `endif
80 );
81 
82  localparam PXD_2X_LATENCY = 2;
84 
85 // reg [7:0] hist_d;
86  reg [9:0] hist_addr;
87  reg [9:0] hist_addr_d;
88  reg [9:0] hist_addr_d2;
89  reg [9:0] hist_rwaddr;
90 
91  reg [31:0] to_inc; // multiplexed, registered (either from memory or from previously incremented/saturated value)
92 // wire [31:0] inc_w; // (before register)
93  reg [31:0] inc_r; // incremented value, registered
94  reg [31:0] inc_sat; // inc_r registered and possibly saturated (in 18-bit mode), just registered in 32-bit mode)
95  wire [31:0] hist_new;
96  reg hist_rwen; // read/write enable
97 // reg [2:0] hist_regen; // bram output register enable: [0] - ren, [1] - regen, [2] - next after regen
98  reg [1:0] hist_regen; // bram output register enable: [0] - ren, [1] - regen, [2] - next after regen
99  reg hist_we; // bram write enable
101 
104 
105  wire [1:0] pio_addr;
106  wire [31:0] pio_data;
107  wire pio_stb;
108 
109  reg [31:0] lt_mclk; // left+top @ posedge mclk
110  reg [31:0] wh_mclk; // width+height @ posedge mclk
111  reg [15:0] width_m1; // @posedge pclk
112  reg [15:0] height_m1; // @posedge pclk
113  reg [15:0] left; // @posedge pclk
114  reg [15:0] top; // @posedge pclk
115 
116  reg hist_en_pclk; // @pclk - gracefully enable/disable histogram
117  reg hist_rst_pclk; // @pclk - immediately disable if true
118  reg en;
119  reg en_new; // @ pclk - enable new frame
120 
121  reg en_mclk;
122 
125  reg pclk_sync; // CE for pclk2x, ~=pclk
126 
127  reg [1:0] bayer_pclk;
128 
129  reg [1:0] hact_d;
130 
131  reg top_margin; // above (before) active window
132  reg hist_done; // @pclk single cycle
134  reg vert_woi; // vertically in window TESTED ACTIVE
135  reg left_margin; // left of (before) active window
136  reg [2:0] woi; // @ pclk2x - inside WOI (and delayed
137  reg hor_woi; // vertically in window
138  reg [15:0] vcntr; // vertical (line) counter
139  reg [15:0] hcntr; // horizontal (pixel) counter
140  wire vcntr_zero_w; // vertical counter is zero
141  wire hcntr_zero_w; // horizontal counter is zero
142  reg same_addr1; // @pclk2x - current histogram address is the same as previous (it was different color, but for future monochrome?)
143  reg same_addr2; // @pclk2x - current histogram address is the same as before-previous (previous was different color)
144 
145 
146  reg hist_out; // some data yet to be sent out
148  reg [2:0] hist_re;
149  reg [9:0] hist_raddr;
151  wire hist_xfer_done_mclk; //@ mclk
152  wire hist_xfer_done; // @pclk
153  reg hist_xfer_busy; // @pclk, during histogram readout , immediately after woi (no gaps)
154  reg wait_readout; // only used in NOBUF mode, in outher modes readout is expected to be always finished in time
155 
156 `ifdef DEBUG_RING
157  reg [15:0] debug_line_cntr;
158  reg [15:0] debug_lines;
159 `endif
160 
163  assign vcntr_zero_w = !(|vcntr);
164  assign hcntr_zero_w = !(|hcntr);
165 // assign inc_w = to_inc+1;
166 
167  assign hist_rq = hist_rq_r;
168  assign hist_dv = hist_re[2];
170 
171 //AF2015-new mod
172  wire line_start_w = hact && !hact_d[0]; // // tested active
174  reg frame_active; // until done
176 // reg hist_rst_pclk2x;
177 
178  wire hlstart; // histogram line start @ posedge pclk2x
179  reg [7:0] pxd_ram [0:15] ; // crossing clock boundary
180  reg [1:0] bayer_ram [0:15] ; // crossing clock boundary
181  reg [0:0] woi_ram [0:15] ; // horizontal WOI to pclk2x
182  reg [3:0] pxd_wa;
183  reg [3:0] pxd_wa_woi;
184  reg [3:0] pxd_ra;
185  reg [3:0] pxd_ra_start; // start value of the pxd_ra counter to account for left margin
186 
187 // reg [1:0] bayer_pclk;
188  wire [1:0] bayer_2x = bayer_ram[pxd_ra];
189  wire [7:0] pxd_2x = pxd_ram[pxd_ra];
193 
194 `ifdef DEBUG_RING
195  always @ (posedge pclk) begin
196  if (sof) debug_line_cntr <= 0;
198 
200  end
201 `endif
202 
203  always @ (posedge pclk) begin
204  if (!hact) pxd_wa <= 0;
205  else pxd_wa <= pxd_wa + 1;
206 
207  if (!hact) pxd_wa_woi <= -PXD_2X_LATENCY;
208  else pxd_wa_woi <= pxd_wa_woi + 1;
209 
210  if (hist_en_pclk && hact) pxd_ram[pxd_wa] <= hist_di;
212  if (hist_en_pclk && hact_d[1]) woi_ram[pxd_wa_woi] <= hor_woi; // PXD_2X_LATENCY;
213 
214  end
215 
216 
217  always @ (posedge mclk) begin
220  end
221 
222  always @ (posedge pclk) begin
223  if (set_left_top_pclk) {top,left} <= lt_mclk[31:0];
225  end
226 
227  // process WOI
228  always @ (posedge pclk) begin
229  hact_d <= {hact_d[0],hact};
230  if (!en) pre_first_line <= 0;
231  else if (sof && en_new) pre_first_line <= 1;
232  else if (hact) pre_first_line <= 0;
233 
234  if (!en) top_margin <= 0;
235  else if (sof && en_new) top_margin <= 1;
236  else if (vcntr_zero_w & line_start_w) top_margin <= 0;
237 
238  if (!en ||(pre_first_line && !hact)) vert_woi <= 0;
240 
241  hist_done <= vert_woi && (eof || (vcntr_zero_w && line_start_w)); // hist done never asserted, line_start_w - active
242 
243  if (!en || hist_done) frame_active <= 0;
244  else if (sof && en_new) frame_active <= 1;
245 
246 
247  if ((pre_first_line && !hact) || !frame_active) vcntr <= top;
248  else if (line_start_w) vcntr <= vcntr_zero_w ? height_m1 : (vcntr - 1);
249 
250  if (!frame_active) left_margin <= 0;
251  else if (!hact_d[0]) left_margin <= 1;
252  else if (hcntr_zero_w) left_margin <= 0;
253 
254  // !hact_d[0] to limit by right margin if window is set wrong
255  if (!vert_woi || wait_readout || !hact_d[0]) hor_woi <= 0; // postpone WOI if reading out/erasing histogram (no-buffer mode)
256  else if (hcntr_zero_w) hor_woi <= left_margin && vert_woi;
257 
258  if (!hact_d[0]) hcntr <= left;
259  else if (hcntr_zero_w && left_margin) hcntr <= width_m1;
260  else if (left_margin || hor_woi) hcntr <= hcntr - 1;
261 
262  if (!en) hist_bank_pclk <= 0;
263  else if (hist_done && (HISTOGRAM_RAM_MODE != "NOBUF")) hist_bank_pclk <= !hist_bank_pclk;
264  // hist_xfer_busy to extend en
265  if (!en) hist_xfer_busy <= 0;
266  else if (hist_xfer_done) hist_xfer_busy <= 0;
267  else if (vcntr_zero_w && vert_woi) hist_xfer_busy <= 1;
268 
271 
272  if (hist_rst_pclk) en <= 0;
273  else if (hist_en_pclk) en <= 1;
274  else if (!top_margin && !vert_woi && !hist_xfer_busy) en <= 0;
275 
277 
278  if (monochrome_pclk) bayer_pclk[1] <= 0;
279  else if (!hact && hact_d[0]) bayer_pclk[1] <= !bayer_pclk[1];
280  else if (pre_first_line && !hact) bayer_pclk[1] <= XOR_HIST_BAYER[1];
281 
282  if (monochrome_pclk) bayer_pclk[0] <= 0;
283  else if (!hact) bayer_pclk[0] <= XOR_HIST_BAYER[0];
284  else bayer_pclk[0] <= ~bayer_pclk[0];
285 
286  end
287 
288  always @(posedge pclk2x) begin
291  pxd_ra_start <= left[3:0];
292 
293  if (!hist_en_pclk2x || hlstart || !(hor_woi_2x || (|woi))) pclk_sync <= 0;
294  else pclk_sync <= ~pclk_sync;
295 
296  if (hlstart) pxd_ra <= pxd_ra_start;
297  else if (pclk_sync) pxd_ra <= pxd_ra + 1;
298 
299  end
300 
301 
302 
303  always @(posedge pclk2x) begin
304  if (pclk_sync) begin
305  woi <= {woi[1:0],hor_woi_2x};
309  same_addr1 <= monochrome_2x && woi[0] && woi[1] && (hist_addr_d == hist_addr); // reduce hardware if hard-wire to gnd
310  same_addr2 <= woi[0] && woi[2] && (hist_addr_d2 == hist_addr);
311  if (same_addr1) to_inc <= inc_r; // only used in monochrome mode
312  else if (same_addr2) to_inc <= inc_sat;
313  else to_inc <= hist_new;
314 
315  if (HISTOGRAM_RAM_MODE != "BUF18") inc_sat <= inc_r;
316  else if (inc_r[18]) inc_sat <= 32'h3fff; // maximal value
317  else inc_sat <= {14'b0,inc_r[17:0]};
318  end
319  hist_rwen <= (woi[0] & ~pclk_sync) || (woi[2] & pclk_sync);
320  hist_regen <= {hist_regen[0], woi[0] & ~pclk_sync};
321  hist_we <= woi[2] & pclk_sync;
322 
323  if (woi[0] & ~pclk_sync) hist_rwaddr <= hist_addr;
324  else if (woi[2] & pclk_sync) hist_rwaddr <= hist_addr_d2;
325 
326  inc_r <= to_inc + 1;
327 
328  end
329  // after hist_out was off, require inactive grant before sending rq
331 
332  always @ (posedge mclk) begin
333  en_mclk <= en;
334 // monochrome_pclk <= monochrome;
335  if (!en_mclk) hist_out <= 0;
336  else if (hist_done_mclk) hist_out <= 1;
337  else if (&hist_raddr) hist_out <= 0;
338 
339  hist_out_d <= hist_out;
340  // reset address each time new transfer is started
341  if (!hist_out) hist_raddr <= 0;
342  else if (hist_re[0]) hist_raddr <= hist_raddr + 1;
343 
344 // prevent starting rq if grant is still on (back-to-back)
345  if (!hist_out) en_rq_start <= 0;
346  else if (!hist_grant) en_rq_start <= 1;
348 
349  if (!hist_out || (&hist_raddr[7:0])) hist_re[0] <= 0;
350  else if (hist_grant && hist_out) hist_re[0] <= 1;
351 
352  hist_re[2:1] <= hist_re[1:0];
353 
354  if (!en_mclk) hist_bank_mclk <= 0;
356 
357  end
358 
359  always @ (posedge pclk) begin
360  if (!en) wait_readout <= 0;
361  else if ((HISTOGRAM_RAM_MODE == "NOBUF") && hist_done) wait_readout <= 1;
362  else if (hist_xfer_done) wait_readout <= 0;
363 
365  end
366 
367 `ifdef DEBUG_RING
369  .SHIFT_WIDTH (64),
370  .READ_WIDTH (64),
371  .WRITE_WIDTH (32),
372  .DEBUG_CMD_LATENCY (DEBUG_CMD_LATENCY)
373  ) debug_slave_i (
374  .mclk (mclk), // input
375  .mrst (mrst), // input
376  .debug_di (debug_di), // input
377  .debug_sl (debug_sl), // input
378  .debug_do (debug_do), // output
379  .rd_data ({debug_lines[15:0], debug_line_cntr[15:0], width_m1[15:0], hcntr[15:0]}), // input[31:0]
380  .wr_data (), // output[31:0] - not used
381  .stb () // output - not used
382  );
383 `endif
384 
386  .ADDR (HISTOGRAM_ADDR),
387  .ADDR_MASK (HISTOGRAM_ADDR_MASK),
388  .NUM_CYCLES (6),
389  .ADDR_WIDTH (2),
390  .DATA_WIDTH (32),
391  .ADDR1 (0),
392  .ADDR_MASK1 (0),
393  .ADDR2 (0),
394  .ADDR_MASK2 (0)
395  ) cmd_deser_sens_histogram_i (
396  .rst (1'b0), // input
397  .clk (mclk), // input
398  .srst (mrst), // input
399  .ad (cmd_ad), // input[7:0]
400  .stb (cmd_stb), // input
401  .addr (pio_addr), // output[15:0]
402  .data (pio_data), // output[31:0]
403  .we (pio_stb) // output
404  );
405 
406  pulse_cross_clock pulse_cross_clock_hlstart_start_i (
407  .rst (prst), // input
408  .src_clk (pclk), // input
409  .dst_clk (pclk2x), // input
410  .in_pulse (hcntr_zero_w && left_margin && hact_d[0]), // input
411  .out_pulse (hlstart), // output
412  .busy() // output
413  );
414 
415 
416 
417  pulse_cross_clock pulse_cross_clock_lt_i (
418  .rst (mrst), // input
419  .src_clk (mclk), // input
420  .dst_clk (pclk), // input
421  .in_pulse (set_left_top_w), // input
422  .out_pulse (set_left_top_pclk), // output
423  .busy() // output
424  );
425 
426  pulse_cross_clock pulse_cross_clock_wh_i (
427  .rst (mrst), // input
428  .src_clk (mclk), // input
429  .dst_clk (pclk), // input
430  .in_pulse (set_width_height_w), // input
431  .out_pulse (set_width_height_pclk), // output
432  .busy() // output
433  );
434 
435  pulse_cross_clock pulse_cross_clock_hist_done_i (
436  .rst (prst), // input
437  .src_clk (pclk), // input
438  .dst_clk (mclk), // input
439  .in_pulse (hist_done), // input
440  .out_pulse (hist_done_mclk), // output
441  .busy() // output
442  );
443 
444  pulse_cross_clock pulse_cross_clock_hist_xfer_done_i (
445  .rst (mrst), // input
446  .src_clk (mclk), // input
447  .dst_clk (pclk), // input
448  .in_pulse (hist_xfer_done_mclk), // input
449  .out_pulse (hist_xfer_done), // output
450  .busy() // output
451  );
452  //TODO: make it double cycle in timing
453 
454  // select between 18-bit wide histogram data using a single BRAM or 2 BRAMs having full 32 bits
455  generate
456  if (HISTOGRAM_RAM_MODE=="BUF32")
457  sens_hist_ram_double sens_hist_ram_i (
458  .pclk2x (pclk2x), // input
459  .addr_a ({hist_bank_pclk,hist_rwaddr[9:0]}), // input[10:0]
460  .data_in_a (inc_sat), // input[31:0]
461  .data_out_a (hist_new), // output[31:0]
462  .en_a (hist_rwen), // input
463  .regen_a (hist_regen[1]), // input
464  .we_a (hist_we), // input
465  .mclk (mclk), // input
466  .addr_b ({hist_bank_mclk,hist_raddr[9:0]}), // input[10:0]
467  .data_out_b (hist_do), // output[31:0]
468  .re_b (hist_re[0]), // input
469  .regen_b (hist_re[1]) // input
470  );
471  else if (HISTOGRAM_RAM_MODE=="BUF18")
472  sens_hist_ram_single sens_hist_ram_i (
473  .pclk2x (pclk2x), // input
474  .addr_a ({hist_bank_pclk,hist_rwaddr[9:0]}), // input[10:0]
475  .data_in_a (inc_sat), // input[31:0]
476  .data_out_a (hist_new), // output[31:0]
477  .en_a (hist_rwen), // input
478  .regen_a (hist_regen[1]), // input
479  .we_a (hist_we), // input
480  .mclk (mclk), // input
481  .addr_b ({hist_bank_mclk,hist_raddr[9:0]}), // input[10:0]
482  .data_out_b (hist_do), // output[31:0]
483  .re_b (hist_re[0]), // input
484  .regen_b (hist_re[1]) // input
485  );
486  else if (HISTOGRAM_RAM_MODE=="NOBUF")
487  sens_hist_ram_nobuff sens_hist_ram_i (
488  .pclk2x (pclk2x), // input
489  .addr_a ({hist_bank_pclk,hist_rwaddr[9:0]}), // input[10:0]
490  .data_in_a (inc_sat), // input[31:0]
491  .data_out_a (hist_new), // output[31:0]
492  .en_a (hist_rwen), // input
493  .regen_a (hist_regen[1]), // input
494  .we_a (hist_we), // input
495  .mclk (mclk), // input
496  .addr_b ({hist_bank_mclk,hist_raddr[9:0]}), // input[10:0]
497  .data_out_b (hist_do), // output[31:0]
498  .re_b (hist_re[0]), // input
499  .regen_b (hist_re[1]) // input
500  );
501 
502  endgenerate
503 
504 
505 endmodule
506 
508  input pclk2x,
509  input [10:0] addr_a,
510  input [31:0] data_in_a,
511  output [31:0] data_out_a,
512  input en_a,
513  input regen_a,
514  input we_a,
515 
516  input mclk,
517  input [10:0] addr_b,
518  output [31:0] data_out_b,
519  input re_b,
520  input regen_b
521 );
522  wire [17:0] data_out_a18;
523  wire [17:0] data_out_b18;
524  assign data_out_b = {14'b0,data_out_b18};
525  assign data_out_a = {14'b0,data_out_a18};
527  .REGISTERS_A(1),
528  .REGISTERS_B(1),
529  .LOG2WIDTH_A(4), // 18 bits
530  .LOG2WIDTH_B(4), // 18 bits
531  .WRITE_MODE_A("NO_CHANGE"),
532  .WRITE_MODE_B("READ_FIRST")
533  ) ramtp_var_w_var_r_i (
534  .clk_a (pclk2x), // input
535  .addr_a (addr_a), // input[10:0]
536  .en_a (en_a), // input
537  .regen_a (regen_a), // input
538  .we_a (we_a), // input
539  .data_out_a (data_out_a18), // output[17:0]
540  .data_in_a (data_in_a[17:0]), // input[17:0]
541  .clk_b (mclk), // input
542  .addr_b (addr_b), // input[10:0]
543  .en_b (re_b), // input
544  .regen_b (regen_b), // input
545  .we_b (1'b1), // input
546  .data_out_b (data_out_b18), // output[17:0]
547  .data_in_b (18'b0) // input[17:0]
548  );
549 endmodule
550 // TODO: without ping-pong buffering as histograms are transferred to the system memory over axi master,
551 // it may be possible to use a single RAM block (if vertical blanking outside of selected window is sufficient)
552 
554  input pclk2x,
555  input [10:0] addr_a,
556  input [31:0] data_in_a,
557  output [31:0] data_out_a,
558  input en_a,
559  input regen_a,
560  input we_a,
561 
562  input mclk,
563  input [10:0] addr_b,
564  output [31:0] data_out_b,
565  input re_b,
566  input regen_b
567 );
568 
570  .REGISTERS_A(1),
571  .REGISTERS_B(1),
572  .LOG2WIDTH_A(4),
573  .LOG2WIDTH_B(4),
574  .WRITE_MODE_A("NO_CHANGE"),
575  .WRITE_MODE_B("READ_FIRST")
576  ) ramt_var_w_var_r_lo_i (
577  .clk_a (pclk2x), // input
578  .addr_a (addr_a), // input[10:0]
579  .en_a (en_a), // input
580  .regen_a (regen_a), // input
581  .we_a (we_a), // input
582  .data_out_a (data_out_a[15:0]), // output[15:0]
583  .data_in_a (data_in_a[15:0]), // input[15:0]
584  .clk_b (mclk), // input
585  .addr_b (addr_b), // input[10:0]
586  .en_b (re_b), // input
587  .regen_b (regen_b), // input
588  .we_b (1'b1), // input
589  .data_out_b (data_out_b[15:0]), // output[15:0]
590  .data_in_b (16'b0) // input[15:0]
591  );
592 
594  .REGISTERS_A(1),
595  .REGISTERS_B(1),
596  .LOG2WIDTH_A(4),
597  .LOG2WIDTH_B(4),
598  .WRITE_MODE_A("NO_CHANGE"),
599  .WRITE_MODE_B("READ_FIRST")
600  ) ramt_var_w_var_r_hi_i (
601  .clk_a (pclk2x), // input
602  .addr_a (addr_a), // input[10:0]
603  .en_a (en_a), // input
604  .regen_a (regen_a), // input
605  .we_a (we_a), // input
606  .data_out_a (data_out_a[31:16]),// output[15:0]
607  .data_in_a (data_in_a[31:16]), // input[15:0]
608  .clk_b (mclk), // input
609  .addr_b (addr_b), // input[10:0]
610  .en_b (re_b), // input
611  .regen_b (regen_b), // input
612  .we_b (1'b1), // input
613  .data_out_b (data_out_b[31:16]),// output[15:0]
614  .data_in_b (16'b0) // input[15:0]
615  );
616 endmodule
617 
619  input pclk2x,
620  input [10:0] addr_a,
621  input [31:0] data_in_a,
622  output [31:0] data_out_a,
623  input en_a,
624  input regen_a,
625  input we_a,
626 
627  input mclk,
628  input [10:0] addr_b,
629  output [31:0] data_out_b,
630  input re_b,
631  input regen_b
632 );
633 
635  .REGISTERS_A(1),
636  .REGISTERS_B(1),
637  .LOG2WIDTH_A(5), // 32 bits
638  .LOG2WIDTH_B(5),
639  .WRITE_MODE_A("NO_CHANGE"),
640  .WRITE_MODE_B("READ_FIRST")
641  ) ramt_var_w_var_r_i (
642  .clk_a (pclk2x), // input
643  .addr_a (addr_a[9:0]), // input[10:0]
644  .en_a (en_a), // input
645  .regen_a (regen_a), // input
646  .we_a (we_a), // input
647  .data_out_a (data_out_a[31:0]), // output[15:0]
648  .data_in_a (data_in_a[31:0]), // input[15:0]
649  .clk_b (mclk), // input
650  .addr_b (addr_b[9:0]), // input[10:0]
651  .en_b (re_b), // input
652  .regen_b (regen_b), // input
653  .we_b (1'b1), // input
654  .data_out_b (data_out_b[31:0]), // output[15:0]
655  .data_in_b (32'b0) // input[15:0]
656  );
657 
658 endmodule
659 
661  output hist_rq,
662  output [31:0] hist_do,
663  output hist_dv
664 `ifdef DEBUG_RING
665  , output debug_do,
666  input debug_di
667 `endif
668 );
669  assign hist_rq = 0;
670  assign hist_do = 0;
671  assign hist_dv = 0;
672 `ifdef DEBUG_RING
673  assign debug_do = debug_di;
674 `endif
675 
676 endmodule
7355bayer_pclkreg[1:0]
7356hact_dreg[1:0]
[7:0] 7308hist_di
debug_slave_i debug_slave
[14-LOG2WIDTH_A:0] 12040addr_a
[WRITE_WIDTH - 1 : 0] 10318wr_data
Definition: debug_slave.v:56
ramt_var_w_var_r_i ramt_var_w_var_r
[9 << LOG2WIDTH_A-3-1:0] 12107data_in_a
[14-LOG2WIDTH_A:0] 12102addr_a
[9 << LOG2WIDTH_A-3-1:0] 12106data_out_a
7331hist_newwire[31:0]
ramt_var_w_var_r_hi_i ramt_var_w_var_r
pulse_cross_clock_hist_xfer_done_i pulse_cross_clock
7298HISTOGRAM_WIDTH_HEIGHT'h1
[0:15] 7388woi_ramreg[0:0]
7394pxd_2xwire[7:0]
7393bayer_2xwire[1:0]
7341lt_mclkreg[31:0]
7375hist_xfer_done_mclkwire
[9 << LOG2WIDTH_B-3-1:0] 12114data_in_b
[14-LOG2WIDTH_B:0] 12109addr_b
7333hist_regenreg[1:0]
7342wh_mclkreg[31:0]
[ADDR_MASK2!=0?2:ADDR_MASK1!=0?1:0:0] 9935we
Definition: cmd_deser.v:60
7380debug_linesreg[15:0]
[1 << LOG2WIDTH_A-1:0] 12045data_in_a
7329inc_rreg[31:0]
7346topreg[15:0]
7389pxd_wareg[3:0]
[1 << LOG2WIDTH_B-1:0] 12052data_in_b
7372hist_rereg[2:0]
sens_hist_ram_i sens_hist_ram_single[generate]
[READ_WIDTH - 1 : 0] 10317rd_data
Definition: debug_slave.v:55
7391pxd_rareg[3:0]
[1 << LOG2WIDTH_A-1:0] 12044data_out_a
7392pxd_ra_startreg[3:0]
[31:0] 7314hist_do
ramtp_var_w_var_r_i ramtp_var_w_var_r
[0:15] 7386pxd_ramreg[7:0]
7379debug_line_cntrreg[15:0]
[DATA_WIDTH-1:0] 9934data
Definition: cmd_deser.v:59
[14-LOG2WIDTH_B:0] 12047addr_b
7353set_width_height_pclkwire
7345leftreg[15:0]
[7:0] 9931ad
Definition: cmd_deser.v:56
[ADDR_WIDTH-1:0] 9933addr
Definition: cmd_deser.v:58
sens_hist_ram_i sens_hist_ram_double[generate]
[9 << LOG2WIDTH_B-3-1:0] 12113data_out_b
7325hist_addr_dreg[9:0]
[1 << LOG2WIDTH_B-1:0] 12051data_out_b
7328to_increg[31:0]
7326hist_addr_d2reg[9:0]
7295HISTOGRAM_ADDR'h33c
7339pio_datawire[31:0]
7294HISTOGRAM_RAM_MODE"BUF32"
7324hist_addrreg[9:0]
7338pio_addrwire[1:0]
7327hist_rwaddrreg[9:0]
7390pxd_wa_woireg[3:0]
sens_hist_ram_i sens_hist_ram_nobuff[generate]
[0:15] 7387bayer_ramreg[1:0]
cmd_deser_sens_histogram_i cmd_deser
7373hist_raddrreg[9:0]
7364vcntrreg[15:0]
7330inc_satreg[31:0]
7411data_out_a18wire[17:0]
7344height_m1reg[15:0]
7337set_width_height_wwire
7365hcntrreg[15:0]
7412data_out_b18wire[17:0]
7343width_m1reg[15:0]
7296HISTOGRAM_ADDR_MASK'h7fe