x393  1.0
FPGAcodeforElphelNC393camera
sensor_i2c.v
Go to the documentation of this file.
1 
39 `timescale 1ns/1ps
40 `undef I2C_FRAME_INDEPENDENT
41 module sensor_i2c#(
42  parameter SENSI2C_ABS_ADDR = 'h410,
43  parameter SENSI2C_REL_ADDR = 'h420,
44  parameter SENSI2C_ADDR_MASK = 'h7f0, // both for SENSI2C_ABS_ADDR and SENSI2C_REL_ADDR
45  parameter SENSI2C_CTRL_ADDR = 'h402,
46  parameter SENSI2C_CTRL_MASK = 'h7fe,
47  parameter SENSI2C_CTRL = 'h0,
48  parameter SENSI2C_STATUS = 'h1,
49  parameter SENSI2C_STATUS_REG = 'h20,
50  // Control register bits
51  parameter SENSI2C_CMD_TABLE = 29, // [29]: 1 - write to translation table (ignore any other fields), 0 - write other fields
52  parameter SENSI2C_CMD_TAND = 28, // [28]: 1 - write table address (8 bits), 0 - write table data (28 bits)
53  parameter SENSI2C_CMD_RESET = 14, // [14] reset all FIFO (takes 16 clock pulses), also - stops i2c until run command
54  parameter SENSI2C_CMD_RUN = 13, // [13:12]3 - run i2c, 2 - stop i2c (needed before software i2c), 1,0 - no change to run state
55  parameter SENSI2C_CMD_RUN_PBITS = 1,
56  parameter SENSI2C_CMD_SOFT_SDA = 6, // [7:6] - SDA software control: 0 - nop, 1 - low, 2 - active high, 3 - float
57  parameter SENSI2C_CMD_SOFT_SCL = 4, // [5:4] - SCL software control: 0 - nop, 1 - low, 2 - active high, 3 - float
58  parameter SENSI2C_CMD_FIFO_RD = 3, // advance I2C read data FIFO by 1
59  parameter SENSI2C_CMD_ACIVE = 2, // [2] - SENSI2C_CMD_ACIVE_EARLY0, SENSI2C_CMD_ACIVE_SDA
60  parameter SENSI2C_CMD_ACIVE_EARLY0 = 1, // release SDA==0 early if next bit ==1
61  parameter SENSI2C_CMD_ACIVE_SDA = 0, // drive SDA=1 during the second half of SCL=1
62 
63  //i2c page table bit fields
64  parameter SENSI2C_TBL_RAH = 0, // high byte of the register address
65  parameter SENSI2C_TBL_RAH_BITS = 8,
66  parameter SENSI2C_TBL_RNWREG = 8, // read register (when 0 - write register
67  parameter SENSI2C_TBL_SA = 9, // Slave address in write mode
68  parameter SENSI2C_TBL_SA_BITS = 7,
69  parameter SENSI2C_TBL_NBWR = 16, // number of bytes to write (1..10)
70  parameter SENSI2C_TBL_NBWR_BITS = 4,
71  parameter SENSI2C_TBL_NBRD = 16, // number of bytes to read (1 - 8) "0" means "8"
72  parameter SENSI2C_TBL_NBRD_BITS = 3,
73  parameter SENSI2C_TBL_NABRD = 19, // number of address bytes for read (0 - 1 byte, 1 - 2 bytes)
74  parameter SENSI2C_TBL_DLY = 20, // bit delay (number of mclk periods in 1/4 of SCL period)
75  parameter SENSI2C_TBL_DLY_BITS= 8,
76  parameter NUM_FRAME_BITS = 4
77 )(
78  input mrst, // @ posedge mclk
79  input mclk, // global clock, half DDR3 clock, synchronizes all I/O through the command port
80  input [7:0] cmd_ad, // byte-serial command address/data (up to 6 bytes: AL-AH-D0-D1-D2-D3
81  input cmd_stb, // strobe (with first byte) for the command a/d
82 // status will {frame_num[3:0],busy,sda,scl} - read outside of this module?
83 // Or still use status here but program it in other bits?
84 // increase address range over 5 bits?
85 // borrow 0x1e?
86  output [7:0] status_ad, // status address/data - up to 5 bytes: A - {seq,status[1:0]} - status[2:9] - status[10:17] - status[18:25]
87  output status_rq, // input request to send status downstream
88  input status_start,// Acknowledge of the first status packet byte (address)
89  input frame_sync, // @posedge mclk increment/reset frame number
90  input [NUM_FRAME_BITS-1:0] frame_num_seq, // frame number from the command sequencer (to sync i2c)
91  input sda_in, // i2c SDA input
92  input scl_in, // i2c SCL input
93  output scl_out, // i2c SCL output
94  output sda_out, // i2c SDA output
95  output scl_en, // i2c SCL enable
96  output sda_en // i2c SDA enable
97 // output busy,
98 // output [3:0] frame_num
99 
100 );
101 // TODO: Make sure that using more than 64 commands will just send them during next frame, not loose?
102 // 0x0..0xf write directly to the frame number [3:0] modulo 16, except if you write to the frame
103 // "just missed" - in that case data will go to the current frame.
104 // 0x10 - write i2c commands to be sent ASAP
105 // 0x11 - write i2c commands to be sent after the next frame starts
106 // ...
107 // 0x1e - write i2c commands to be sent after the next 14 frames start
108 // 0x1e - program status? Or
109 // 0x1f - control register:
110 // [14] - reset all FIFO (takes 16 clock pulses), also - stops i2c until run command
111 // [13:12] - 3 - run i2c, 2 - stop i2c (needed before software i2c), 1,0 - no change to run state
112 // [11] - if 1, use [10:9] to set command bytes to send after slave address (0..3)
113 // [10:9] - number of bytes to send, valid if [11] is set
114 // [8] - set duration of quarter i2c cycle in system clock cycles - nominal value 100 (0x64)
115 // [7:0] - duration of quater i2c cycle (applied if [8] is set)
116 
117  wire we_abs;
118  wire we_rel;
119  wire we_cmd;
120  wire wen;
121  wire [31:0] di;
122  wire [3:0] wa;
123  reg [31:0] di_r; // 32 bit command takes 6 cycles, so di_r can hold data for up to this long
124  reg [3:0] wpage0; // FIFO page where ASAP writes go
125  reg [3:0] wpage_prev; // unused page, currently being cleared
126  reg [3:0] page_r; // FIFO page where current i2c commands are taken from
127 
128  reg [3:0] wpage_wr; // FIFO page where current write goes (reading from write address)
129  reg [3:0] wpage_wr_only; // as, wpage_wr but uses rel[0] after frame sync, not wpage_prev (for fifo_fill)
130  reg [1:0] wpage0_inc; // increment wpage0 (after frame sync or during reset)
132  reg run_cmd;
133  reg twe;
137  reg reset_on; // reset FIFO in progress
138  reg i2c_enrun; // enable i2c
139  reg we_fifo_wp; // enable writing to fifo write pointer memory
140  reg req_clr; // request for clearing fifo_wp (delay frame sync if previous is not yet sent out), also used for clearing all
141  wire pre_wpage0_inc; // ready to increment
142 
143  wire [3:0] frame_num=wpage0[3:0];
144 //fifo write pointers (dual port distributed RAM)
145  reg [5:0] fifo_wr_pointers_ram [0:15]; // dual ported read?
146  wire [5:0] fifo_wr_pointers_outw; // pointer dual-ported RAM - write port out, valid next after command
147  wire [5:0] fifo_wr_pointers_outr; // pointer dual-ported RAM - read port out
148 
151 // command i2c fifo (RAMB16_S9_S18)
152  reg [9:0] i2c_cmd_wa; // wite address for the current pair of 16-bit data words - changed to a single 32-bit word
153  // {page[3:0],word[5:0],MSW[0]}
154  reg i2c_cmd_we; // write enable to blockRAM
155 
156  reg [1:0] page_r_inc; // increment page_r[2:0]; - signal and delayed version
157  reg [5:0] rpointer; // FIFO read pointer for current page
158 
159  reg i2c_start; // initiate i2c register write sequence
160  wire i2c_run; // i2c sequence is in progress (early end)
161  reg i2c_run_d; // i2c sequence is in progress (early end)
162  wire [1:0] byte_number; // byte number to send next (3-2-1-0)
163  wire [1:0] seq_mem_re;
164  wire [7:0] i2c_data;
165  wire [7:0] i2c_rdata; // data read over i2c bus
166  wire i2c_rvalid; // i2c_rdata single-cycle strobe
167  wire i2c_fifo_nempty; // i2c read fifo has data
168  reg i2c_fifo_rd; // read i2c FIFO
169  reg i2c_fifo_cntrl; // i2c FIFO odd/even byte
170  wire [7:0] i2c_fifo_dout; // i2c FIFO data out
171  reg busy;
172  reg [3:0] busy_cntr;
173 
176 
177  reg [1:0] wen_r;
178  reg wen_fifo; // [1] was not used - we_fifo_wp was used instead
179 
180  reg scl_en_soft; // software i2c control signals (used when i2c controller is disabled)
181  reg scl_soft;
183  reg sda_soft;
184 
185  wire sda_hard;
187  wire scl_hard;
188 
189 `ifdef I2C_FRAME_INDEPENDENT
190  localparam sync_to_seq = 0;
191 `else
193 `endif
194  reg [5:0] last_wp; // last written write pointer
195  reg [5:0] last_wp_d; // last written write pointer, delayed to match rpointer
196  reg was_asap;
197  reg [3:0] last_wpage; // last written to page (or zeroed)
198  reg [5:0] fifo_fill; // number of words written to the other (not current) page, or difference wp-rp for the current
199  wire [5:0] fifo_wr_pointers_next; // pointer value to be written to fifo_wr_pointers_ram[wpage_wr]
200 
201  assign set_ctrl_w = we_cmd && ((wa & ~SENSI2C_CTRL_MASK) == SENSI2C_CTRL );// ==0
202  assign set_status_w = we_cmd && ((wa & ~SENSI2C_CTRL_MASK) == SENSI2C_STATUS );// ==0
203  assign pre_wpage0_inc = (!wen && !(|wen_r) && !wpage0_inc[0]) && (req_clr || reset_on) ;
204 /// assign pre_wpage0_inc = (!wen && !(|wen_r) && !(|wpage0_inc)) && (req_clr || reset_on) ;
205 
206  assign fifo_wr_pointers_outw = fifo_wr_pointers_ram[wpage_wr[3:0]]; // valid next after command
208 
209 
210  assign wen=set_ctrl_w || we_rel || we_abs; //remove set_ctrl_w?
211 
212 // assign scl_en = i2c_enrun;
213  assign scl_out = i2c_enrun? scl_hard: scl_soft ;
214  assign scl_en = i2c_enrun? 1'b1: scl_en_soft ;
215  assign sda_out = i2c_enrun? sda_hard: sda_soft ;
217  assign fifo_wr_pointers_next = wpage0_inc[1]? 6'h0:(fifo_wr_pointers_outw_r[5:0]+1);
218 
220 
221  reg alive_fs;
222  always @ (posedge mclk) begin
223  if (set_status_w) alive_fs <= 0;
224  else if (frame_sync) alive_fs <= 1;
225  end
226 
227 
228  cmd_deser #(
229  .ADDR (SENSI2C_ABS_ADDR),
230  .ADDR_MASK (SENSI2C_ADDR_MASK),
231  .NUM_CYCLES (6),
232  .ADDR_WIDTH (4),
233  .DATA_WIDTH (32),
234  .ADDR1 (SENSI2C_REL_ADDR),
235  .ADDR_MASK1 (SENSI2C_ADDR_MASK),
236  .ADDR2 (SENSI2C_CTRL_ADDR),
237  .ADDR_MASK2 (SENSI2C_CTRL_MASK)
238  ) cmd_deser_sens_i2c_i (
239  .rst (1'b0), // rst), // input
240  .clk (mclk), // input
241  .srst (mrst), // input
242  .ad (cmd_ad), // input[7:0]
243  .stb (cmd_stb), // input
244  .addr (wa), // output[15:0]
245  .data (di), // output[31:0]
246  .we ({we_cmd,we_rel,we_abs}) // output
247  );
248 
249  status_generate #(
250  .STATUS_REG_ADDR(SENSI2C_STATUS_REG),
251  .PAYLOAD_BITS(7+6+3+10) // STATUS_PAYLOAD_BITS)
252  ) status_generate_sens_i2c_i (
253  .rst (1'b0), // rst), // input
254  .clk (mclk), // input
255  .srst (mrst), // input
256  .we (set_status_w), // input
257  .wd (di[7:0]), // input[7:0]
258  .status ({reset_on, req_clr,
259  fifo_fill[5:0],
260  frame_num[3:0],
262  i2c_fifo_dout[7:0],
263  sda_in, scl_in}), // input[25:0]
264  .ad (status_ad), // output[7:0]
265  .rq (status_rq), // output
266  .start (status_start) // input
267  );
268  fifo_same_clock #(
269  .DATA_WIDTH(8),
270  .DATA_DEPTH(4)
271  ) fifo_same_clock_i2c_rdata_i (
272  .rst (1'b0), // input
273  .clk (mclk), // input
274  .sync_rst (mrst), // input
275  .we (i2c_rvalid), // input
276  .re (i2c_fifo_rd), // input
277  .data_in (i2c_rdata), // input[15:0]
278  .data_out (i2c_fifo_dout), // output[15:0]
279  .nempty (i2c_fifo_nempty), // output
280  .half_full () // output reg
281  );
282 
283  always @ (posedge mclk) begin
284  if (wen) di_r <= di; // 32 bit command takes 6 cycles, so di_r can hold data for up to this long
285  wen_r <= {wen_r[0],wen}; // is it needed?
286 // wen_fifo <= {wen_fifo[0],we_rel || we_abs};
287  wen_fifo <= we_rel || we_abs;
288 
289 // signals related to writing to i2c FIFO
290 // delayed versions of address, data write strobe
291 // if (wen) wad [ 3:0] <= wa[ 3:0];
292 // if (wen || wen_d[0]) di_1[15:0] <= di[15:0];
293 // di_2[15:0] <= di_1[15:0];
294 // di_3[15:0] <= di_2[15:0];
295 // wen_d[4:0] <= {wen_d[3:1],wen_d[0] && !is_ctl,wen};
296 // wen_d[3:0] <= {wen_d[2:1],wen_d[0] && !is_ctl,wen};
297 // software i2c signals
298 // wen_i2c_soft <= wen_d[0] && is_ctl;
299 
300 // decoded commands, valid next cycle after we_*
306 
307  if (reset_cmd || mrst) i2c_enrun <= 1'b0;
308  else if (run_cmd) i2c_enrun <= di_r[SENSI2C_CMD_RUN - 1 -: SENSI2C_CMD_RUN_PBITS]; // [12];
309 
310  if (i2c_enrun || mrst) scl_en_soft <= 0;
312 
314 
315  if (i2c_enrun || mrst) sda_en_soft <= 0;
317 
319 
320  if (active_cmd) begin
323  end
324 
325 // write pointer memory
327  // reset pointers in all 16 pages:
328  reset_on <= reset_cmd || (reset_on && !(wpage0_inc[0] && ( wpage0[3:0] == 4'hf)));
329  // request to clear pointer(s)? for one page - during reset or delayed frame sync (if previous was not finished)
330  req_clr <= frame_sync || (req_clr && !wpage0_inc[0]);
331 
332 `ifndef I2C_FRAME_INDEPENDENT
333  sync_to_seq <= frame_sync || (reset_on && ( wpage0[3:0] == 4'hf));
334 `endif
335 
336 
337  if (reset_cmd) wpage0 <= 0;
338  else if (wpage0_inc[0]) wpage0 <= wpage0 + 1;
339  else if (sync_to_seq) wpage0 <= frame_num_seq;
340 
341  if (reset_cmd) wpage_prev <= 4'hf;
342  else if (wpage0_inc[0]) wpage_prev <= wpage0;
343  else if (sync_to_seq) wpage_prev <= frame_num_seq - 1 ;
344 
345 
346  if (we_abs) wpage_wr <= ((wa==wpage_prev)? wpage0[3:0] : wa);
347  else if (we_rel) wpage_wr <= wpage0+wa;
348  else if (wpage0_inc[0]) wpage_wr <= wpage_prev; // only for erasing?
349 
350  we_fifo_wp <= wen_fifo || wpage0_inc[0];
351 
352 
354 
355  // write to dual-port pointer memory
356 // if (we_fifo_wp) fifo_wr_pointers_ram[wpage_wr] <= wpage0_inc[1]? 6'h0:(fifo_wr_pointers_outw_r[5:0]+1);
357  if (we_fifo_wp) begin
361  end
362 /*
363  reg [5:0] last_wp_d; // last written write pointer, delayed to match rpointer
364  reg was_asap;
365 
366 */
367  last_wp_d <= last_wp; // to match rrpointer
368  was_asap <= (last_wpage == wpage0);
369 
370  if (we_abs) wpage_wr_only <= ((wa==wpage_prev)? wpage0[3:0] : wa);
371  else if (we_rel) wpage_wr_only <= wpage0 + wa;
372  else if (wpage0_inc[0]) wpage_wr_only <= wpage0 + 1;
373 
374 // fifo_fill <= last_wp - ((last_wpage == wpage0)? rpointer : 6'b0); // for current frame use wp-rp, for other pages - just wp
375  fifo_fill <= last_wp_d - (was_asap ? rpointer : 6'b0); // for current frame use wp-rp, for other pages - just wp
376 
377  fifo_wr_pointers_outr_r[5:0] <= fifo_wr_pointers_outr[5:0]; // just register distri
379  i2c_cmd_we <= !reset_cmd && wen_fifo; // [0];
380 
381 // signals related to reading from i2c FIFO
382 `ifdef I2C_FRAME_INDEPENDENT
383  if (reset_on) page_r <= 0;
384  else if (page_r_inc[0]) page_r <= page_r+1;
385 `else
387  else if (page_r_inc[0]) page_r <= page_r+1;
388 `endif
389 
390 //############ rpointer should start not from 0, but form value in another RAM???
391  if (reset_cmd || page_r_inc[0]) rpointer[5:0] <= 6'h0;
392  else if (i2c_run_d && ! i2c_run) rpointer[5:0] <= rpointer[5:0] + 1;
393 
395  page_r_inc[1:0] <= {page_r_inc[0],
396  !i2c_run && // not i2c in progress
397  !page_r_inc[0] && // was not incrementing in previous cycle
398  (rpointer == fifo_wr_pointers_outr_r) && // nothing left for this page
399  (page_r != wpage0)}; // not already the write-open current page
400  if (wen) busy_cntr <= 4'hf;
401  else if (|busy_cntr) busy_cntr <= busy_cntr-1;
402 
403  busy <= (i2c_enrun && ((rpointer[5:0]!= fifo_wr_pointers_outr_r[5:0]) || (page_r!=wpage0))) ||
404  (|busy_cntr) ||
405  i2c_run ||
406  reset_on;
407 
408  i2c_run_d <= i2c_run;
409 
410  if (mrst) i2c_fifo_cntrl <= 0;
412 
413 
414  end
415 
416  sensor_i2c_prot #(
417  .SENSI2C_TBL_RAH (SENSI2C_TBL_RAH), // high byte of the register address
419  .SENSI2C_TBL_RNWREG (SENSI2C_TBL_RNWREG), // read register (when 0 - write register
420  .SENSI2C_TBL_SA (SENSI2C_TBL_SA), // Slave address in write mode
422  .SENSI2C_TBL_NBWR (SENSI2C_TBL_NBWR), // number of bytes to write (1..10)
424  .SENSI2C_TBL_NBRD (SENSI2C_TBL_NBRD), // number of bytes to read (1 - 8) "0" means "8"
426  .SENSI2C_TBL_NABRD (SENSI2C_TBL_NABRD), // number of address bytes for read (0 - 1 byte, 1 - 2 bytes)
427  .SENSI2C_TBL_DLY (SENSI2C_TBL_DLY), // bit delay (number of mclk periods in 1/4 of SCL period)
429  ) sensor_i2c_prot_i(
430  .mrst (mrst), // input
431  .mclk (mclk), // input
432  .i2c_rst (reset_cmd), // input
433  .i2c_start (i2c_start), // input
434  .active_sda (active_sda), // input
435  .early_release_0 (early_release_0), // input
436  .tand (di_r[SENSI2C_CMD_TAND]), // input
437  .td (di_r[SENSI2C_CMD_TAND-1:0]), // input[27:0]
438  .twe (twe), // input
439  .sda_in (sda_in), // input
440  .sda (sda_hard), // output
441  .sda_en (sda_en_hard), // output
442  .scl (scl_hard), // output
443  .i2c_run (i2c_run), // output reg
444  .i2c_busy (), //i2c_busy), // output reg
445  .seq_mem_ra (byte_number), // output[1:0] reg
446  .seq_mem_re (seq_mem_re), // output[1:0]
447  .seq_rd (i2c_data), // input[7:0]
448  .rdata (i2c_rdata), // output[7:0]
449  .rvalid (i2c_rvalid) // output
450  );
451 
452 
453 
454  ram_var_w_var_r #(
455  .REGISTERS(1), // try to delay i2c_byte_start by one more cycle
456  .LOG2WIDTH_WR(5),
457  .LOG2WIDTH_RD(3)
458  ) i_fifo (
459  .rclk (mclk), // input
460  .raddr ({page_r[3:0], rpointer[5:0], byte_number[1:0]}), // input[11:0]
461  .ren (seq_mem_re[0]), // input
462  .regen (seq_mem_re[1]), // input
463  .data_out (i2c_data[7:0]), // output[7:0]
464  .wclk (mclk), // input
465  .waddr (i2c_cmd_wa), // input[9:0]
466  .we (i2c_cmd_we), // input
467  .web (8'hff), // input[7:0]
468  .data_in (di_r) // input[31:0]
469  );
470 
471 endmodule
472 
473 
8204wpage_prevreg[3:0]
Definition: sensor_i2c.v:125
[DATA_WIDTH-1:0] 10430data_in
8207wpage_wr_onlyreg[3:0]
Definition: sensor_i2c.v:129
8235i2c_datawire[7:0]
Definition: sensor_i2c.v:164
8259last_wpagereg[3:0]
Definition: sensor_i2c.v:195
8150SENSI2C_REL_ADDR'h420
Definition: sensor_i2c.v:43
8153SENSI2C_CTRL_MASK'h7fe
Definition: sensor_i2c.v:46
[1 << LOG2WIDTH_WR-1:0] 11872data_in
i_fifo ram_var_w_var_r
Definition: sensor_i2c.v:449
8233byte_numberwire[1:0]
Definition: sensor_i2c.v:162
status_generate_sens_i2c_i status_generate
Definition: sensor_i2c.v:247
8217we_fifo_wpreg
Definition: sensor_i2c.v:139
8198we_cmdwire
Definition: sensor_i2c.v:119
8240i2c_fifo_cntrlreg
Definition: sensor_i2c.v:169
[14-LOG2WIDTH_WR:0] 11869waddr
8166SENSI2C_CMD_ACIVE_EARLY01
Definition: sensor_i2c.v:60
8230i2c_startreg
Definition: sensor_i2c.v:159
8249scl_softreg
Definition: sensor_i2c.v:181
8156SENSI2C_STATUS_REG'h20
Definition: sensor_i2c.v:49
8222fifo_wr_pointers_outwwire[5:0]
Definition: sensor_i2c.v:146
[7:0] 8183cmd_ad
Definition: sensor_i2c.v:80
[ 1:0] 8344seq_mem_re
8243busy_cntrreg[3:0]
Definition: sensor_i2c.v:172
8152SENSI2C_CTRL_ADDR'h402
Definition: sensor_i2c.v:45
8154SENSI2C_CTRL'h0
Definition: sensor_i2c.v:47
8162SENSI2C_CMD_SOFT_SDA6
Definition: sensor_i2c.v:56
8234seq_mem_rewire[1:0]
Definition: sensor_i2c.v:163
8231i2c_runwire
Definition: sensor_i2c.v:160
8159SENSI2C_CMD_RESET14
Definition: sensor_i2c.v:53
8155SENSI2C_STATUS'h1
Definition: sensor_i2c.v:48
cmd_deser_sens_i2c_i cmd_deser
Definition: sensor_i2c.v:226
8151SENSI2C_ADDR_MASK'h7f0
Definition: sensor_i2c.v:44
8209reset_cmdreg
Definition: sensor_i2c.v:131
8202di_rreg[31:0]
Definition: sensor_i2c.v:123
8149SENSI2C_ABS_ADDR'h410
Definition: sensor_i2c.v:42
8167SENSI2C_CMD_ACIVE_SDA0
Definition: sensor_i2c.v:61
8239i2c_fifo_rdreg
Definition: sensor_i2c.v:168
8216i2c_enrunreg
Definition: sensor_i2c.v:138
8168SENSI2C_TBL_RAH0
Definition: sensor_i2c.v:64
[ADDR_MASK2!=0?2:ADDR_MASK1!=0?1:0:0] 9935we
Definition: cmd_deser.v:60
[0:15] 8221fifo_wr_pointers_ramreg[5:0]
Definition: sensor_i2c.v:145
8246wen_rreg[1:0]
Definition: sensor_i2c.v:177
8214early_release_0reg
Definition: sensor_i2c.v:136
8208wpage0_increg[1:0]
Definition: sensor_i2c.v:130
8252sda_hardwire
Definition: sensor_i2c.v:185
8203wpage0reg[3:0]
Definition: sensor_i2c.v:124
8177SENSI2C_TBL_NABRD19
Definition: sensor_i2c.v:73
8255sync_to_seqreg
Definition: sensor_i2c.v:190
8238i2c_fifo_nemptywire
Definition: sensor_i2c.v:167
8212active_cmdreg
Definition: sensor_i2c.v:134
8171SENSI2C_TBL_SA9
Definition: sensor_i2c.v:67
8164SENSI2C_CMD_FIFO_RD3
Definition: sensor_i2c.v:58
8180NUM_FRAME_BITS4
Definition: sensor_i2c.v:76
8224fifo_wr_pointers_outw_rreg[5:0]
Definition: sensor_i2c.v:149
8196we_abswire
Definition: sensor_i2c.v:117
8163SENSI2C_CMD_SOFT_SCL4
Definition: sensor_i2c.v:57
8157SENSI2C_CMD_TABLE29
Definition: sensor_i2c.v:51
[1 << LOG2WIDTH_RD-1:0] 11867data_out
8223fifo_wr_pointers_outrwire[5:0]
Definition: sensor_i2c.v:147
8228page_r_increg[1:0]
Definition: sensor_i2c.v:156
8244set_ctrl_wwire
Definition: sensor_i2c.v:174
[DATA_WIDTH-1:0] 9934data
Definition: cmd_deser.v:59
8187status_start
Definition: sensor_i2c.v:88
fifo_same_clock_i2c_rdata_i fifo_same_clock
Definition: sensor_i2c.v:266
8200diwire[31:0]
Definition: sensor_i2c.v:121
8218req_clrreg
Definition: sensor_i2c.v:140
8179SENSI2C_TBL_DLY_BITS8
Definition: sensor_i2c.v:75
8170SENSI2C_TBL_RNWREG8
Definition: sensor_i2c.v:66
8261fifo_wr_pointers_nextwire[5:0]
Definition: sensor_i2c.v:197
8201wawire[3:0]
Definition: sensor_i2c.v:122
8158SENSI2C_CMD_TAND28
Definition: sensor_i2c.v:52
[14-LOG2WIDTH_RD:0] 11864raddr
8169SENSI2C_TBL_RAH_BITS8
Definition: sensor_i2c.v:65
[DATA_WIDTH-1:0] 10431data_out
8206wpage_wrreg[3:0]
Definition: sensor_i2c.v:128
8197we_relwire
Definition: sensor_i2c.v:118
8236i2c_rdatawire[7:0]
Definition: sensor_i2c.v:165
8176SENSI2C_TBL_NBRD_BITS3
Definition: sensor_i2c.v:72
8248scl_en_softreg
Definition: sensor_i2c.v:180
[7:0] 9931ad
Definition: cmd_deser.v:56
[ADDR_WIDTH-1:0] 9933addr
Definition: cmd_deser.v:58
8227i2c_cmd_wereg
Definition: sensor_i2c.v:154
8241i2c_fifo_doutwire[7:0]
Definition: sensor_i2c.v:170
8237i2c_rvalidwire
Definition: sensor_i2c.v:166
8213active_sdareg
Definition: sensor_i2c.v:135
8205page_rreg[3:0]
Definition: sensor_i2c.v:126
8232i2c_run_dreg
Definition: sensor_i2c.v:161
8199wenwire
Definition: sensor_i2c.v:120
8262alive_fsreg
Definition: sensor_i2c.v:219
8160SENSI2C_CMD_RUN13
Definition: sensor_i2c.v:54
8260fifo_fillreg[5:0]
Definition: sensor_i2c.v:196
8225fifo_wr_pointers_outr_rreg[5:0]
Definition: sensor_i2c.v:150
8161SENSI2C_CMD_RUN_PBITS1
Definition: sensor_i2c.v:55
8254scl_hardwire
Definition: sensor_i2c.v:187
[NUM_FRAME_BITS-1:0] 8189frame_num_seq
Definition: sensor_i2c.v:90
8174SENSI2C_TBL_NBWR_BITS4
Definition: sensor_i2c.v:70
8215reset_onreg
Definition: sensor_i2c.v:137
8251sda_softreg
Definition: sensor_i2c.v:183
reg [1:0] 8343seq_mem_ra
sensor_i2c_prot_i sensor_i2c_prot
Definition: sensor_i2c.v:411
8173SENSI2C_TBL_NBWR16
Definition: sensor_i2c.v:69
8219pre_wpage0_incwire
Definition: sensor_i2c.v:141
8250sda_en_softreg
Definition: sensor_i2c.v:182
8245set_status_wwire
Definition: sensor_i2c.v:175
8226i2c_cmd_wareg[9:0]
Definition: sensor_i2c.v:152
8172SENSI2C_TBL_SA_BITS7
Definition: sensor_i2c.v:68
8257last_wp_dreg[5:0]
Definition: sensor_i2c.v:193
8210run_cmdreg
Definition: sensor_i2c.v:132
8220frame_numwire[3:0]
Definition: sensor_i2c.v:143
[7:0] 8185status_ad
Definition: sensor_i2c.v:86
8258was_asapreg
Definition: sensor_i2c.v:194
[ALL_BITS-1:0] 10777status
8247wen_fiforeg
Definition: sensor_i2c.v:178
8256last_wpreg[5:0]
Definition: sensor_i2c.v:192
8165SENSI2C_CMD_ACIVE2
Definition: sensor_i2c.v:59
8229rpointerreg[5:0]
Definition: sensor_i2c.v:157
8253sda_en_hardwire
Definition: sensor_i2c.v:186
8175SENSI2C_TBL_NBRD16
Definition: sensor_i2c.v:71
8178SENSI2C_TBL_DLY20
Definition: sensor_i2c.v:74