This instruction will teach you basics of how to make an elevator control on your Altera DE2-115 Board. We will be using Verilog to implement this control. This basic control takes two inputs from the user via two switches, one for current level, and the second for target level. Then the board will simulate the progress of the elevator using LEDs, each LED will correspond to each floors. When the target level is reached, the LED will stop there. To display our current level and target level in more easier way, we will use 7-Segment Display to show our current floor and our target level. The project file on Quartus is attached as a zip file, and the report is also attached. The report has instructions.
Step 1: Setup Your Environment
To start, first plug in the power supply to your FPGA to power it on, then plug in USB Type A to your computer's USB port, and USB Type B to your FPGA Board, in our case it was an Altera DE2-115 Cyclone IV E FPGA Board. Now, if you are on Windows 7 or later version, the drivers should automatically download for this Board when you plug in both USBs. If not, then follow this guide here: https://www.altera.com/support/support-resources/d...
If you have not already installed Quartus 2 to program in Verilog, then you should do so now. You should be able to use Quartus 2 Version 10. or any newer version to code. The project code is in the zip file attached.
You should be ready to start on this project.
Step 2: Verilog
On Verilog you will need inputs as switches and 7-Segment Display as an output to display your target level, the floor you want to go to. Also we used registers to use our green LED to show the progress of the elevator. So the green LEDs are also another output. We decided to do only up to 6 floors. However you can take it to more than that in your version if you wish to do so. Each of our switch is for different level. You will need two sets of switches, one for current level, and one for target level. Each of these set will require 7 switches, the first switch sort of initializes and the rest of them are used to control the elevator.
Finally for this step, you will need to use the LEDs to monitor your progress, although this is not necessary but it looks cool. To control LEDs, we used a clk as a counter to light up LEDs one by one. The delay between LEDs is just 1 sec in our project. Each LED will correspond to the floor the elevator is positioned. Once the elevator reaches the target level, the LED will stop on that floor and the current level will be displayed on the 7-Segment Display.
Once you are done, compile it, fix any errors, and then program it. Test your code and fix if there is any problem.