VICON: Sistema de Visión configurable V1.0
Trabajo Fin de Master Carlos Manuel Gomez Jimenez
Loading...
Searching...
No Matches
testbench.vhd
Go to the documentation of this file.
1library IEEE;
2use IEEE.STD_LOGIC_1164.ALL;
3
4entity testbench is
5end testbench;
6
7architecture Structural of testbench is
8 -- 1. SENALES DE INFRAESTRUCTURA
9 signal clk_base : std_logic;
10 signal rst_raw : std_logic;
11 -- 2. SENALES DEL BUS I2C (Solo para I2C!)
12 signal sclk_bus : std_logic;
13 signal sda_bus : std_logic := 'H'; -- Pull-up virtual
14 signal done_sig : std_logic;
15
16begin
17
18 -- Generador inicial de seNales (basado en tu tb_dut.vhd)
19 u_reloj : entity work.clk_reset_gen
20 port map (
21 clk_out => clk_base, -- Reloj de 100MHz para el MMCM
22 reset_out => rst_raw -- Reset inicial
23 );
24
25
26
27 -- Instancia del DUT (El Maestro I2C)
28 u_dut : entity work.TOP
29 generic map ( SENSOR_ADDR => "1011100" )
30 port map (
31 clk => clk_base, -- Usa el reloj del MMCM
32 reset => rst_raw, -- Reset sincronizado
33 sclk => sclk_bus, -- Genera el reloj I2C
34 sdata => sda_bus, -- Datos I2C
35 done => done_sig
36 );
37
38 -- Instancia del Agente (El Esclavo I2C)
39 u_sensor : entity work.mt9v111_agent
40 generic map ( I2C_ADDR => "1011100" )
41 port map (
42 scl => sclk_bus, -- Escucha el reloj del DUT
43 sda => sda_bus, -- Escucha/Habla en el bus
44 pixclk => open, fval => open, lval => open, dout => open
45 );
46
47 sda_bus <= 'H';
48end Structural;
Definition TOP.vhd:8
inout sdata std_logic
Definition TOP.vhd:19
in reset std_logic
Definition TOP.vhd:17
SENSOR_ADDR std_logic_vector( 6 downto 0) := "1011100"
Definition TOP.vhd:14
in clk std_logic
Definition TOP.vhd:16
out done std_logic
Definition TOP.vhd:21
out sclk std_logic
Definition TOP.vhd:18
out reset_out std_logic
out clk_out std_logic
out pixclk std_logic
Definition mt9v111.vhd:18
in scl std_logic
Definition mt9v111.vhd:22
I2C_ADDR std_logic_vector( 6 downto 0) := "1011100"
Definition mt9v111.vhd:13
out dout std_logic_vector( 7 downto 0)
Definition mt9v111.vhd:21
out lval std_logic
Definition mt9v111.vhd:20
inout sda std_logic
Definition mt9v111.vhd:24
out fval std_logic
Definition mt9v111.vhd:19
std_logic := 'H' sda_bus
Definition testbench.vhd:13