x393  1.0
FPGAcodeforElphelNC393camera
sensor_i2c Module Reference
Inheritance diagram for sensor_i2c:
Collaboration diagram for sensor_i2c:

Static Public Member Functions

Always Constructs

ALWAYS_390  ( mclk )
ALWAYS_391  ( mclk )

Public Attributes

Inputs

mrst  
mclk  
cmd_ad   [ 7 : 0 ]
cmd_stb  
status_start  
frame_sync  
frame_num_seq   [NUM_FRAME_BITS - 1 : 0 ]
sda_in  
scl_in  

Outputs

status_ad   [ 7 : 0 ]
status_rq  
scl_out  
sda_out  
scl_en  
sda_en  

Parameters

SENSI2C_ABS_ADDR  'h410
SENSI2C_REL_ADDR  'h420
SENSI2C_ADDR_MASK  'h7f0
SENSI2C_CTRL_ADDR  'h402
SENSI2C_CTRL_MASK  'h7fe
SENSI2C_CTRL  'h0
SENSI2C_STATUS  'h1
SENSI2C_STATUS_REG  'h20
SENSI2C_CMD_TABLE   29
SENSI2C_CMD_TAND   28
SENSI2C_CMD_RESET   14
SENSI2C_CMD_RUN   13
SENSI2C_CMD_RUN_PBITS   1
SENSI2C_CMD_SOFT_SDA   6
SENSI2C_CMD_SOFT_SCL   4
SENSI2C_CMD_FIFO_RD   3
SENSI2C_CMD_ACIVE   2
SENSI2C_CMD_ACIVE_EARLY0   1
SENSI2C_CMD_ACIVE_SDA   0
SENSI2C_TBL_RAH   0
SENSI2C_TBL_RAH_BITS   8
SENSI2C_TBL_RNWREG   8
SENSI2C_TBL_SA   9
SENSI2C_TBL_SA_BITS   7
SENSI2C_TBL_NBWR   16
SENSI2C_TBL_NBWR_BITS   4
SENSI2C_TBL_NBRD   16
SENSI2C_TBL_NBRD_BITS   3
SENSI2C_TBL_NABRD   19
SENSI2C_TBL_DLY   20
SENSI2C_TBL_DLY_BITS   8
NUM_FRAME_BITS   4

Signals

wire  we_abs
wire  we_rel
wire  we_cmd
wire  wen
wire[ 31 : 0 ]  di
wire[ 3 : 0 ]  wa
reg[ 31 : 0 ]  di_r
reg[ 3 : 0 ]  wpage0
reg[ 3 : 0 ]  wpage_prev
reg[ 3 : 0 ]  page_r
reg[ 3 : 0 ]  wpage_wr
reg[ 3 : 0 ]  wpage_wr_only
reg[ 1 : 0 ]  wpage0_inc
reg  reset_cmd
reg  run_cmd
reg  twe
reg  active_cmd
reg  active_sda
reg  early_release_0
reg  reset_on
reg  i2c_enrun
reg  we_fifo_wp
reg  req_clr
wire  pre_wpage0_inc
wire[ 3 : 0 ]  frame_num
reg[ 5 : 0 ]  fifo_wr_pointers_ram [ 0 : 15 ]
wire[ 5 : 0 ]  fifo_wr_pointers_outw
wire[ 5 : 0 ]  fifo_wr_pointers_outr
reg[ 5 : 0 ]  fifo_wr_pointers_outw_r
reg[ 5 : 0 ]  fifo_wr_pointers_outr_r
reg[ 9 : 0 ]  i2c_cmd_wa
reg  i2c_cmd_we
reg[ 1 : 0 ]  page_r_inc
reg[ 5 : 0 ]  rpointer
reg  i2c_start
wire  i2c_run
reg  i2c_run_d
wire[ 1 : 0 ]  byte_number
wire[ 1 : 0 ]  seq_mem_re
wire[ 7 : 0 ]  i2c_data
wire[ 7 : 0 ]  i2c_rdata
wire  i2c_rvalid
wire  i2c_fifo_nempty
reg  i2c_fifo_rd
reg  i2c_fifo_cntrl
wire[ 7 : 0 ]  i2c_fifo_dout
reg  busy
reg[ 3 : 0 ]  busy_cntr
wire  set_ctrl_w
wire  set_status_w
reg[ 1 : 0 ]  wen_r
reg  wen_fifo
reg  scl_en_soft
reg  scl_soft
reg  sda_en_soft
reg  sda_soft
wire  sda_hard
wire  sda_en_hard
wire  scl_hard
reg  sync_to_seq
reg[ 5 : 0 ]  last_wp
reg[ 5 : 0 ]  last_wp_d
reg  was_asap
reg[ 3 : 0 ]  last_wpage
reg[ 5 : 0 ]  fifo_fill
wire[ 5 : 0 ]  fifo_wr_pointers_next
reg  alive_fs

Module Instances

cmd_deser::cmd_deser_sens_i2c_i   Module cmd_deser
status_generate::status_generate_sens_i2c_i   Module status_generate
fifo_same_clock::fifo_same_clock_i2c_rdata_i   Module fifo_same_clock
sensor_i2c_prot::sensor_i2c_prot_i   Module sensor_i2c_prot
ram_var_w_var_r::i_fifo   Module ram_var_w_var_r

Detailed Description

Definition at line 41 of file sensor_i2c.v.

Member Function Documentation

ALWAYS_390 (   mclk  
)
Always Construct

Definition at line 220 of file sensor_i2c.v.

ALWAYS_391 (   mclk  
)
Always Construct

Definition at line 281 of file sensor_i2c.v.

Member Data Documentation

SENSI2C_ABS_ADDR 'h410
Parameter

Definition at line 42 of file sensor_i2c.v.

SENSI2C_REL_ADDR 'h420
Parameter

Definition at line 43 of file sensor_i2c.v.

SENSI2C_ADDR_MASK 'h7f0
Parameter

Definition at line 44 of file sensor_i2c.v.

SENSI2C_CTRL_ADDR 'h402
Parameter

Definition at line 45 of file sensor_i2c.v.

SENSI2C_CTRL_MASK 'h7fe
Parameter

Definition at line 46 of file sensor_i2c.v.

SENSI2C_CTRL 'h0
Parameter

Definition at line 47 of file sensor_i2c.v.

SENSI2C_STATUS 'h1
Parameter

Definition at line 48 of file sensor_i2c.v.

SENSI2C_STATUS_REG 'h20
Parameter

Definition at line 49 of file sensor_i2c.v.

SENSI2C_CMD_TABLE 29
Parameter

Definition at line 51 of file sensor_i2c.v.

SENSI2C_CMD_TAND 28
Parameter

Definition at line 52 of file sensor_i2c.v.

SENSI2C_CMD_RESET 14
Parameter

Definition at line 53 of file sensor_i2c.v.

SENSI2C_CMD_RUN 13
Parameter

Definition at line 54 of file sensor_i2c.v.

SENSI2C_CMD_RUN_PBITS 1
Parameter

Definition at line 55 of file sensor_i2c.v.

SENSI2C_CMD_SOFT_SDA 6
Parameter

Definition at line 56 of file sensor_i2c.v.

SENSI2C_CMD_SOFT_SCL 4
Parameter

Definition at line 57 of file sensor_i2c.v.

SENSI2C_CMD_FIFO_RD 3
Parameter

Definition at line 58 of file sensor_i2c.v.

SENSI2C_CMD_ACIVE 2
Parameter

Definition at line 59 of file sensor_i2c.v.

Definition at line 60 of file sensor_i2c.v.

SENSI2C_CMD_ACIVE_SDA 0
Parameter

Definition at line 61 of file sensor_i2c.v.

SENSI2C_TBL_RAH 0
Parameter

Definition at line 64 of file sensor_i2c.v.

SENSI2C_TBL_RAH_BITS 8
Parameter

Definition at line 65 of file sensor_i2c.v.

SENSI2C_TBL_RNWREG 8
Parameter

Definition at line 66 of file sensor_i2c.v.

SENSI2C_TBL_SA 9
Parameter

Definition at line 67 of file sensor_i2c.v.

SENSI2C_TBL_SA_BITS 7
Parameter

Definition at line 68 of file sensor_i2c.v.

SENSI2C_TBL_NBWR 16
Parameter

Definition at line 69 of file sensor_i2c.v.

SENSI2C_TBL_NBWR_BITS 4
Parameter

Definition at line 70 of file sensor_i2c.v.

SENSI2C_TBL_NBRD 16
Parameter

Definition at line 71 of file sensor_i2c.v.

SENSI2C_TBL_NBRD_BITS 3
Parameter

Definition at line 72 of file sensor_i2c.v.

SENSI2C_TBL_NABRD 19
Parameter

Definition at line 73 of file sensor_i2c.v.

SENSI2C_TBL_DLY 20
Parameter

Definition at line 74 of file sensor_i2c.v.

SENSI2C_TBL_DLY_BITS 8
Parameter

Definition at line 75 of file sensor_i2c.v.

NUM_FRAME_BITS 4
Parameter

Definition at line 76 of file sensor_i2c.v.

mrst
Input

Definition at line 78 of file sensor_i2c.v.

mclk
Input

Definition at line 79 of file sensor_i2c.v.

cmd_ad [ 7 : 0 ]
Input

Definition at line 80 of file sensor_i2c.v.

cmd_stb
Input

Definition at line 81 of file sensor_i2c.v.

status_ad [ 7 : 0 ]
Output

Definition at line 86 of file sensor_i2c.v.

status_rq
Output

Definition at line 87 of file sensor_i2c.v.

status_start
Input

Definition at line 88 of file sensor_i2c.v.

frame_sync
Input

Definition at line 89 of file sensor_i2c.v.

frame_num_seq [NUM_FRAME_BITS - 1 : 0 ]
Input

Definition at line 90 of file sensor_i2c.v.

sda_in
Input

Definition at line 91 of file sensor_i2c.v.

scl_in
Input

Definition at line 92 of file sensor_i2c.v.

scl_out
Output

Definition at line 93 of file sensor_i2c.v.

sda_out
Output

Definition at line 94 of file sensor_i2c.v.

scl_en
Output

Definition at line 95 of file sensor_i2c.v.

sda_en
Output

Definition at line 96 of file sensor_i2c.v.

we_abs
Signal

Definition at line 117 of file sensor_i2c.v.

we_rel
Signal

Definition at line 118 of file sensor_i2c.v.

we_cmd
Signal

Definition at line 119 of file sensor_i2c.v.

wen
Signal

Definition at line 120 of file sensor_i2c.v.

di
Signal

Definition at line 121 of file sensor_i2c.v.

wa
Signal

Definition at line 122 of file sensor_i2c.v.

di_r
Signal

Definition at line 123 of file sensor_i2c.v.

wpage0
Signal

Definition at line 124 of file sensor_i2c.v.

wpage_prev
Signal

Definition at line 125 of file sensor_i2c.v.

page_r
Signal

Definition at line 126 of file sensor_i2c.v.

wpage_wr
Signal

Definition at line 128 of file sensor_i2c.v.

wpage_wr_only
Signal

Definition at line 129 of file sensor_i2c.v.

wpage0_inc
Signal

Definition at line 130 of file sensor_i2c.v.

reset_cmd
Signal

Definition at line 131 of file sensor_i2c.v.

run_cmd
Signal

Definition at line 132 of file sensor_i2c.v.

twe
Signal

Definition at line 133 of file sensor_i2c.v.

active_cmd
Signal

Definition at line 134 of file sensor_i2c.v.

active_sda
Signal

Definition at line 135 of file sensor_i2c.v.

Definition at line 136 of file sensor_i2c.v.

reset_on
Signal

Definition at line 137 of file sensor_i2c.v.

i2c_enrun
Signal

Definition at line 138 of file sensor_i2c.v.

we_fifo_wp
Signal

Definition at line 139 of file sensor_i2c.v.

req_clr
Signal

Definition at line 140 of file sensor_i2c.v.

Definition at line 141 of file sensor_i2c.v.

frame_num
Signal

Definition at line 143 of file sensor_i2c.v.

fifo_wr_pointers_ram [ 0 : 15 ]
Signal

Definition at line 145 of file sensor_i2c.v.

Definition at line 146 of file sensor_i2c.v.

Definition at line 147 of file sensor_i2c.v.

Definition at line 149 of file sensor_i2c.v.

Definition at line 150 of file sensor_i2c.v.

i2c_cmd_wa
Signal

Definition at line 152 of file sensor_i2c.v.

i2c_cmd_we
Signal

Definition at line 154 of file sensor_i2c.v.

page_r_inc
Signal

Definition at line 156 of file sensor_i2c.v.

rpointer
Signal

Definition at line 157 of file sensor_i2c.v.

i2c_start
Signal

Definition at line 159 of file sensor_i2c.v.

i2c_run
Signal

Definition at line 160 of file sensor_i2c.v.

i2c_run_d
Signal

Definition at line 161 of file sensor_i2c.v.

byte_number
Signal

Definition at line 162 of file sensor_i2c.v.

seq_mem_re
Signal

Definition at line 163 of file sensor_i2c.v.

i2c_data
Signal

Definition at line 164 of file sensor_i2c.v.

i2c_rdata
Signal

Definition at line 165 of file sensor_i2c.v.

i2c_rvalid
Signal

Definition at line 166 of file sensor_i2c.v.

Definition at line 167 of file sensor_i2c.v.

i2c_fifo_rd
Signal

Definition at line 168 of file sensor_i2c.v.

Definition at line 169 of file sensor_i2c.v.

i2c_fifo_dout
Signal

Definition at line 170 of file sensor_i2c.v.

busy
Signal

Definition at line 171 of file sensor_i2c.v.

busy_cntr
Signal

Definition at line 172 of file sensor_i2c.v.

set_ctrl_w
Signal

Definition at line 174 of file sensor_i2c.v.

set_status_w
Signal

Definition at line 175 of file sensor_i2c.v.

wen_r
Signal

Definition at line 177 of file sensor_i2c.v.

wen_fifo
Signal

Definition at line 178 of file sensor_i2c.v.

scl_en_soft
Signal

Definition at line 180 of file sensor_i2c.v.

scl_soft
Signal

Definition at line 181 of file sensor_i2c.v.

sda_en_soft
Signal

Definition at line 182 of file sensor_i2c.v.

sda_soft
Signal

Definition at line 183 of file sensor_i2c.v.

sda_hard
Signal

Definition at line 185 of file sensor_i2c.v.

sda_en_hard
Signal

Definition at line 186 of file sensor_i2c.v.

scl_hard
Signal

Definition at line 187 of file sensor_i2c.v.

sync_to_seq
Signal

Definition at line 190 of file sensor_i2c.v.

last_wp
Signal

Definition at line 192 of file sensor_i2c.v.

last_wp_d
Signal

Definition at line 193 of file sensor_i2c.v.

was_asap
Signal

Definition at line 194 of file sensor_i2c.v.

last_wpage
Signal

Definition at line 195 of file sensor_i2c.v.

fifo_fill
Signal

Definition at line 196 of file sensor_i2c.v.

Definition at line 197 of file sensor_i2c.v.

alive_fs
Signal

Definition at line 219 of file sensor_i2c.v.

cmd_deser cmd_deser_sens_i2c_i
Module Instance

Definition at line 226 of file sensor_i2c.v.

fifo_same_clock fifo_same_clock_i2c_rdata_i
Module Instance

Definition at line 266 of file sensor_i2c.v.

ram_var_w_var_r i_fifo
Module Instance

Definition at line 449 of file sensor_i2c.v.

sensor_i2c_prot sensor_i2c_prot_i
Module Instance

Definition at line 411 of file sensor_i2c.v.

status_generate status_generate_sens_i2c_i
Module Instance

Definition at line 247 of file sensor_i2c.v.


The documentation for this Module was generated from the following files: