Group:
Contents
Module Description *
Display Module *
User Interface Module *
Mileage Module *
Direction Module *
Speed Module *
Trip Odometer Module *
Clock Module *
Projected Distance Module *
Possible Additional Modules *
High Level VHDL (entity) *
VHDL: *
entity clock is *
VHDL: *
entity speed is *
VHDL: *
entity mileage is *
VHDL: *
entity trip_odometer is *
VHDL: *
entity direction is *
VHDL: *
entity project_distance is *
VHDL: *
entity display_mode is *
VHDL: *
entity alterra_chip is *
Additional Information *
Appendix *
Project Modules *
Design Diagram *
Time Management *
port( sethour, setminute: in std_logic
minutes: out std_logic_vector (5 downto 0)
counter: out std_logic_vector (6 downto 0));
setminute: Input from button2. When in display time mode, the minutes increase by one each time button2 is pushed.
hour: When needed, this vector provides the current hour to the display entity.
minutes: When needed, this vector provides the current minute to the display entity.
counter: provides timing for any entity that requires it. Increments every ½ second.
port( revolution: in std_logic
counter: in std_logic_vector (6 downto 0)
velocity: out std_logic_vector (7 downto 0));
counter: Provided by the clock entity, counter will be used to determine velocity.
velocity: When needed, this vector provides the current velocity of the vehicle to the display entity.
port( litres: in std_logic_vector(13 downto 0)
revolution: in std_logic
km/litre: out std_logic_vector (8 downto 0));
km/litre: When needed, this vector will provide the current mileage to the display entity.
port( revolution, reset: in std_logic
trip_odometer: out std_logic_vector (9 downto 0));
Reset: When trip_odometer mode is selected, the distance traveled will reset to zero when button1 is pressed.
Trip_odometer: When needed, this vector will provide the current distance traveled to the display entity. Will reset to zero when 1000 km is reached.
port( direct1: in std_logic_vector (2 downto 0)
direct2: out std_logic_vector (2 downto 0));
direct2: When needed, this vector will provide the current direction the vehicle is travelling to the display entity.
port( litres: in std_logic_vector (2 downto 0)
km/litres: in std_logic_vector (8 downto 0)
projected_km: out std_logic_vector (9 downto 0));
km/litres: As described in entity mileage.
projected_km: When needed, this vector provides the display entity with the distance the vehicle can go on the remaining fuel.
port( select, button1, button2: in std_logic
km/litre: in std_logic_vector (8 downto 0)
trip_odometer: in std_logic_vector (9 downto 0)
direct2: in std_logic_vector (2 downto 0)
projected_km: in std_logic_vector (9 downto 0)
display: out std_logic_vector (15 downto 0));
button1: Used to set the hour, when in the clock display mode. Used as a reset in the trip odometer mode. In all other modes the button pulses will be ignored.
button2: Used to set the minutes, when the ASM is in the clock display mode.
minutes: As described in entity clock.
counter: As described in entity clock.
km/litre: As described in entity mileage.
trip_odometer: As described in entity trip_odometer.
direct2: As described in entity direction.
projected_km: As described in entity projected_distance
display: This vector provides whatever output necessary to display the selected information on the LCD.
port( select, button1, button2, revolution: in std_logic
litres: in std_logic_vector(13 downto 0)
direct1: in std_logic_vector (2 downto 0)
display: out std_logic_vector (15 downto 0));
button1: As described in the entity display.
button2: As described in the entity display.
TESTING | To test our design we will construct our system on a board and by using switches and buttons test each module individually. Inputs will be simulated using the switches and with the buttons we can toggle between states. If the output matches are expected values then the system will work. |
ADDITIONAL PARTS | We require a 2 line by 16 character wide LCD display and three pushbuttons. Also for testing purposes, we need an additional button to simulate the number of revolutions, 14 switches to represent liters of gas and 3 more switches for direction parameters. We are still in the process of acquiring these parts. We have spoken to Morris Locker and he advises us to ensure our chip has enough current to drive the LCD. He did tell us that he does have these in stock and he is ordering more, however we will report back to him and see if they will be available. |
CHIP | The chip we are planning to use is the Altera chip because it is a reprogrammable FPGA. We do not require RAM or a microprocessor. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Student Application Notes |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|