|
VICON: Sistema de Visión configurable V1.0
Trabajo Fin de Master Carlos Manuel Gomez Jimenez
|
Processes | |
| p_wr_fifo | ( clk ) |
| p_rd_fifo | ( clk ) |
| p_phase | ( clk ) |
| p_fsm | ( clk ) |
Constants | |
| CLKS_PER_PHASE | integer := CLK_FREQ_HZ / ( I2C_FREQ_HZ * 4 ) |
Types | |
| fifo_mem_t | ( 0 to FIFO_DEPTH - 1 ) std_logic_vector ( 15 downto 0 ) |
| state_t | ( ST_IDLE , ST_START_0 , ST_START_1 , ST_START_2 , ST_START_3 , ST_TX_0 , ST_TX_1 , ST_TX_2 , ST_TX_3 , ST_RACK_0 , ST_RACK_1 , ST_RACK_2 , ST_RACK_3 , ST_RX_0 , ST_RX_1 , ST_RX_2 , ST_RX_3 , ST_MACK_0 , ST_MACK_1 , ST_MACK_2 , ST_MACK_3 , ST_DECIDE_AFTER_ADDR_WR , ST_DECIDE_AFTER_REG_ADDR , ST_LOAD_DATA_H , ST_DECIDE_AFTER_DATA_H , ST_DECIDE_AFTER_DATA_L , ST_LOAD_NEXT_DATA_H , ST_DECIDE_AFTER_ADDR_RD , ST_DECIDE_AFTER_RX_H , ST_DECIDE_AFTER_RX_L , ST_STOP_0 , ST_STOP_1 , ST_STOP_2 , ST_STOP_3 , ST_DONE , ST_ERROR_STOP , ST_ERROR ) |
Signals | |
| wr_mem | fifo_mem_t := ( others = > ( others = > ' 0 ' ) ) |
| Memoria de la FIFO de escritura (FIFO_DEPTH entradas de 16 bits) | |
| wr_wr_ptr | integer range 0 to FIFO_DEPTH - 1 := 0 |
| Puntero de escritura de la WR FIFO. | |
| wr_rd_ptr | integer range 0 to FIFO_DEPTH - 1 := 0 |
| Puntero de lectura de la WR FIFO. | |
| wr_count | integer range 0 to FIFO_DEPTH := 0 |
| Número de entradas ocupadas en la WR FIFO. | |
| wr_full_i | std_logic |
| Indicador de WR FIFO llena (combinacional) | |
| wr_empty_i | std_logic |
| Indicador de WR FIFO vacía (combinacional) | |
| wr_pop | std_logic := ' 0 ' |
| Pulso de pop interno de la WR FIFO (generado por la FSM) | |
| wr_dout | std_logic_vector ( 15 downto 0 ) |
| Dato en la cabeza de la WR FIFO (combinacional sobre wr_rd_ptr) | |
| rd_mem | fifo_mem_t := ( others = > ( others = > ' 0 ' ) ) |
| Memoria de la FIFO de lectura (FIFO_DEPTH entradas de 16 bits) | |
| rd_wr_ptr | integer range 0 to FIFO_DEPTH - 1 := 0 |
| Puntero de escritura de la RD FIFO. | |
| rd_rd_ptr | integer range 0 to FIFO_DEPTH - 1 := 0 |
| Puntero de lectura de la RD FIFO. | |
| rd_count | integer range 0 to FIFO_DEPTH := 0 |
| Número de entradas ocupadas en la RD FIFO. | |
| rd_full_i | std_logic |
| Indicador de RD FIFO llena (combinacional) | |
| rd_empty_i | std_logic |
| Indicador de RD FIFO vacía (combinacional) | |
| rd_push | std_logic := ' 0 ' |
| Pulso de push interno de la RD FIFO (generado por la FSM tras recibir un registro) | |
| rd_din | std_logic_vector ( 15 downto 0 ) := ( others = > ' 0 ' ) |
| Dato a escribir en la RD FIFO (rx_high & rx_byte) | |
| state | state_t := ST_IDLE |
| seq_next | state_t := ST_IDLE |
| r_rw | std_logic := ' 0 ' |
| r_addr_dev | std_logic_vector ( 6 downto 0 ) := ( others = > ' 0 ' ) |
| r_addr_reg | std_logic_vector ( 7 downto 0 ) := ( others = > ' 0 ' ) |
| r_num_regs | integer range 1 to FIFO_DEPTH := 1 |
| reg_cnt | integer range 0 to FIFO_DEPTH := 0 |
| start_rd_mode | std_logic := ' 0 ' |
| tx_byte | std_logic_vector ( 7 downto 0 ) := ( others = > ' 0 ' ) |
| rx_byte | std_logic_vector ( 7 downto 0 ) := ( others = > ' 0 ' ) |
| bit_cnt | integer range 0 to 7 := 7 |
| wr_word | std_logic_vector ( 15 downto 0 ) := ( others = > ' 0 ' ) |
| rx_high | std_logic_vector ( 7 downto 0 ) := ( others = > ' 0 ' ) |
| send_nack | std_logic := ' 0 ' |
| phase_cnt | integer range 0 to CLKS_PER_PHASE - 1 := 0 |
| phase_tick | std_logic := ' 0 ' |
| scl_r | std_logic := ' 1 ' |
| sda_out_r | std_logic := ' 1 ' |
| sda_oe | std_logic := ' 1 ' |
| busy_i | std_logic := ' 0 ' |
| done_i | std_logic := ' 0 ' |
| error_i | std_logic := ' 0 ' |
Definition at line 74 of file i2c_controller.vhd.
| p_fsm | ( | clk ) |
Definition at line 293 of file i2c_controller.vhd.
| p_phase | ( | clk ) |
Definition at line 274 of file i2c_controller.vhd.
| p_rd_fifo | ( | clk ) |
Definition at line 247 of file i2c_controller.vhd.
| p_wr_fifo | ( | clk ) |
Definition at line 214 of file i2c_controller.vhd.
| bit_cnt integer range 0 to 7 := 7 |
Definition at line 167 of file i2c_controller.vhd.
| busy_i std_logic := ' 0 ' |
Definition at line 196 of file i2c_controller.vhd.
| CLKS_PER_PHASE integer := CLK_FREQ_HZ / ( I2C_FREQ_HZ * 4 ) |
Definition at line 76 of file i2c_controller.vhd.
| done_i std_logic := ' 0 ' |
Definition at line 197 of file i2c_controller.vhd.
| error_i std_logic := ' 0 ' |
Definition at line 198 of file i2c_controller.vhd.
| fifo_mem_t ( 0 to FIFO_DEPTH - 1 ) std_logic_vector ( 15 downto 0 ) |
Definition at line 81 of file i2c_controller.vhd.
| phase_cnt integer range 0 to CLKS_PER_PHASE - 1 := 0 |
Definition at line 183 of file i2c_controller.vhd.
| phase_tick std_logic := ' 0 ' |
Definition at line 184 of file i2c_controller.vhd.
| r_addr_dev std_logic_vector ( 6 downto 0 ) := ( others = > ' 0 ' ) |
Definition at line 156 of file i2c_controller.vhd.
| r_addr_reg std_logic_vector ( 7 downto 0 ) := ( others = > ' 0 ' ) |
Definition at line 157 of file i2c_controller.vhd.
| r_num_regs integer range 1 to FIFO_DEPTH := 1 |
Definition at line 158 of file i2c_controller.vhd.
| r_rw std_logic := ' 0 ' |
Definition at line 155 of file i2c_controller.vhd.
| rd_count integer range 0 to FIFO_DEPTH := 0 |
Número de entradas ocupadas en la RD FIFO.
Definition at line 108 of file i2c_controller.vhd.
| rd_din std_logic_vector ( 15 downto 0 ) := ( others = > ' 0 ' ) |
Dato a escribir en la RD FIFO (rx_high & rx_byte)
Definition at line 116 of file i2c_controller.vhd.
| rd_empty_i std_logic |
Indicador de RD FIFO vacía (combinacional)
Definition at line 112 of file i2c_controller.vhd.
| rd_full_i std_logic |
Indicador de RD FIFO llena (combinacional)
Definition at line 110 of file i2c_controller.vhd.
| rd_mem fifo_mem_t := ( others = > ( others = > ' 0 ' ) ) |
Memoria de la FIFO de lectura (FIFO_DEPTH entradas de 16 bits)
Definition at line 102 of file i2c_controller.vhd.
| rd_push std_logic := ' 0 ' |
Pulso de push interno de la RD FIFO (generado por la FSM tras recibir un registro)
Definition at line 114 of file i2c_controller.vhd.
| rd_rd_ptr integer range 0 to FIFO_DEPTH - 1 := 0 |
Puntero de lectura de la RD FIFO.
Definition at line 106 of file i2c_controller.vhd.
| rd_wr_ptr integer range 0 to FIFO_DEPTH - 1 := 0 |
Puntero de escritura de la RD FIFO.
Definition at line 104 of file i2c_controller.vhd.
| reg_cnt integer range 0 to FIFO_DEPTH := 0 |
Definition at line 159 of file i2c_controller.vhd.
| rx_byte std_logic_vector ( 7 downto 0 ) := ( others = > ' 0 ' ) |
Definition at line 166 of file i2c_controller.vhd.
| rx_high std_logic_vector ( 7 downto 0 ) := ( others = > ' 0 ' ) |
Definition at line 175 of file i2c_controller.vhd.
| scl_r std_logic := ' 1 ' |
Definition at line 189 of file i2c_controller.vhd.
| sda_oe std_logic := ' 1 ' |
Definition at line 191 of file i2c_controller.vhd.
| sda_out_r std_logic := ' 1 ' |
Definition at line 190 of file i2c_controller.vhd.
| send_nack std_logic := ' 0 ' |
Definition at line 178 of file i2c_controller.vhd.
Definition at line 150 of file i2c_controller.vhd.
| start_rd_mode std_logic := ' 0 ' |
Definition at line 162 of file i2c_controller.vhd.
Definition at line 149 of file i2c_controller.vhd.
| state_t ( ST_IDLE , ST_START_0 , ST_START_1 , ST_START_2 , ST_START_3 , ST_TX_0 , ST_TX_1 , ST_TX_2 , ST_TX_3 , ST_RACK_0 , ST_RACK_1 , ST_RACK_2 , ST_RACK_3 , ST_RX_0 , ST_RX_1 , ST_RX_2 , ST_RX_3 , ST_MACK_0 , ST_MACK_1 , ST_MACK_2 , ST_MACK_3 , ST_DECIDE_AFTER_ADDR_WR , ST_DECIDE_AFTER_REG_ADDR , ST_LOAD_DATA_H , ST_DECIDE_AFTER_DATA_H , ST_DECIDE_AFTER_DATA_L , ST_LOAD_NEXT_DATA_H , ST_DECIDE_AFTER_ADDR_RD , ST_DECIDE_AFTER_RX_H , ST_DECIDE_AFTER_RX_L , ST_STOP_0 , ST_STOP_1 , ST_STOP_2 , ST_STOP_3 , ST_DONE , ST_ERROR_STOP , ST_ERROR ) |
Definition at line 121 of file i2c_controller.vhd.
| tx_byte std_logic_vector ( 7 downto 0 ) := ( others = > ' 0 ' ) |
Definition at line 165 of file i2c_controller.vhd.
| wr_count integer range 0 to FIFO_DEPTH := 0 |
Número de entradas ocupadas en la WR FIFO.
Definition at line 91 of file i2c_controller.vhd.
| wr_dout std_logic_vector ( 15 downto 0 ) |
Dato en la cabeza de la WR FIFO (combinacional sobre wr_rd_ptr)
Definition at line 99 of file i2c_controller.vhd.
| wr_empty_i std_logic |
Indicador de WR FIFO vacía (combinacional)
Definition at line 95 of file i2c_controller.vhd.
| wr_full_i std_logic |
Indicador de WR FIFO llena (combinacional)
Definition at line 93 of file i2c_controller.vhd.
| wr_mem fifo_mem_t := ( others = > ( others = > ' 0 ' ) ) |
Memoria de la FIFO de escritura (FIFO_DEPTH entradas de 16 bits)
Definition at line 85 of file i2c_controller.vhd.
| wr_pop std_logic := ' 0 ' |
Pulso de pop interno de la WR FIFO (generado por la FSM)
Definition at line 97 of file i2c_controller.vhd.
| wr_rd_ptr integer range 0 to FIFO_DEPTH - 1 := 0 |
Puntero de lectura de la WR FIFO.
Definition at line 89 of file i2c_controller.vhd.
| wr_word std_logic_vector ( 15 downto 0 ) := ( others = > ' 0 ' ) |
Definition at line 172 of file i2c_controller.vhd.
| wr_wr_ptr integer range 0 to FIFO_DEPTH - 1 := 0 |
Puntero de escritura de la WR FIFO.
Definition at line 87 of file i2c_controller.vhd.