Beginning FPGA Programming - Partie68
Beginning FPGA Programming - Partie68
Beginning FPGA Programming - Partie68
end if;
end if;
end process;
end if;
end process;
end if;
end process;
333
Chapter 14 ■ How Fast Can You Run? Ask the Accelerometer!
334
Chapter 14 ■ How Fast Can You Run? Ask the Accelerometer!
335
Chapter 14 ■ How Fast Can You Run? Ask the Accelerometer!
14.3.3.3 Temperature_accelerometer_sensor_top.vhd Code
The code in Listing 14-3 is the top-level design file for this project. It has the system clock (50 MHz) input and
ADT7420 IC interfaces which include I2C SCL and SDA wires. The USER_LED is included for fun. The purpose
of this module is to connect all of the external wires to the correct modules and to generate the correct clock
(29.5 MHz) for the uartTOi2c module. Please read the comments to better understand the details of the design.
We will simulate the design later and so you should have a better idea how it works after that.
entity temperature_accelerometer_sensor_top is
port(
-- Clock ins, SYS_CLK = 50MHz
SYS_CLK : in std_logic;
336
Chapter 14 ■ How Fast Can You Run? Ask the Accelerometer!
begin
dealy_p: process(SYS_CLK)
begin
if(rising_edge(SYS_CLK) )THEN
delay_8 <= delay_8(6 downto 0)&locked; -- create active LOW reset
END IF;
END PROCESS;
337