Programming a Traffic Light Controller In verilog using Quartus Prime Lite...

D

Dave Wood

Guest
Hi everyone,
( Don\'t know if this is even the right place to post a question but ill try my luck)
So basically I am a student and I have a final project to build a traffic light control system using Verilog, and then I am to program my FPGA board which is a De10-lite. I feel like the coding aspect of the project isn\'t bad.. I have cases and such set up to switch the device to different states based on clock pulses and user input on the FPGA board. My one question is: how am I supposed to translate my code that I\'ve been working hard on and make it so it will work with the FPGA board. I need my lights to work as the traffic lights ( both north-south and east- west roads) and I have pedestrian walk signals that can interrupt the traffic lights to let pedestrians cross as well as off peak and peak times determined by a switch. I don\'t really know how to translate the code into a function device and the resources I\'ve been trying to find have been less than helpful. If this isn\'t the correct spot to post something about this particular issue could someone point me in a direction that can be helpful? Or if this is a spot to get some help? I would greatly appreciate all the help I can get.
Thanks in advance,
Dave Wood
 
On 11/18/20 10:49 PM, Dave Wood wrote:
Hi everyone,
( Don\'t know if this is even the right place to post a question but ill try my luck)
So basically I am a student and I have a final project to build a traffic light control system using Verilog, and then I am to program my FPGA board which is a De10-lite. I feel like the coding aspect of the project isn\'t bad. I have cases and such set up to switch the device to different states based on clock pulses and user input on the FPGA board. My one question is: how am I supposed to translate my code that I\'ve been working hard on and make it so it will work with the FPGA board. I need my lights to work as the traffic lights ( both north-south and east- west roads) and I have pedestrian walk signals that can interrupt the traffic lights to let pedestrians cross as well as off peak and peak times determined by a switch. I don\'t really know how to translate the code into a function device and the resources I\'ve been trying to find have been less than helpful. If this isn\'t the correct spot to post something about this particular issue could someone point me in a direction that can be helpful? Or if this is a spot to get some help? I would greatly appreciate all the help I can get.
Thanks in advance,
Dave Wood

Most FPGAs have enough drive strength that you can just connect an LED
(with current limiting resistor) to the output and it can make it glow
or not. Similarly, a switch (with a pull up resistor) can be brought
into an input pin a device.

Your design will have a module at its top level, and the inputs and
outputs of the madule will become pins of the device. You will need to
use features of the FPGA design software to map your module inputs and
outputs to the specific pins you have attached the switches and LEDs to.


It looks like that board already has a number of displays and switches
attached, so first you need to decide how to map the parts of the board
to your \'traffic ligts\' and inputs. Then you need to find out what pins
those connect to with the documentation of the board. Then you can use
the FPGA software to map those pins to your signals.

 
Richard Damon <Richard@damon-family.org> wrote:
It looks like that board already has a number of displays and switches
attached, so first you need to decide how to map the parts of the board
to your \'traffic ligts\' and inputs. Then you need to find out what pins
those connect to with the documentation of the board. Then you can use
the FPGA software to map those pins to your signals.

Unless the OP already has a template design (eg from their professor) it
might be worth starting with an example project that already targets that
board.

If you download the \'DE10Lite CD-ROM\' (which is a Zipfile, don\'t know why
they call it a CD) from here:
https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=218&No=1021&PartNo=4
(requires login)

there\'s usually a series of example projects. Terasic usually provide a
\'Golden Top\' project which is an empty shell that\'s ready for you to drop
your code into (there are other projects for talking to things like Ethernet
and off-chip memory, which you don\'t need for now).

Wiring up your code to the clock and LEDs provided in that project should be
fairly straightforward (a few minutes work), and then you can build it in
Quartus.

Theo
 
Theo <theom+news@chiark.greenend.org.uk> wrote:
Wiring up your code to the clock and LEDs provided in that project should be
fairly straightforward (a few minutes work), and then you can build it in
Quartus.

PS My brief guide to using Quartus:
https://www.cl.cam.ac.uk/teaching/2021/ECAD+Arch/exercise-fpga.html
 

Welcome to EDABoard.com

Sponsor

Back
Top