Programming a Traffic Light Controller In verilog using Quartus Prime Lite

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi everyone,
 ( Don't know if this is even the right place to post a question but ill tr
y my luck)
So basically I am a student and I have a final project to build a traffic l
ight control system using Verilog, and then I am to program my FPGA board w
hich 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 bas
ed on clock pulses and user input on the FPGA board. My one question is: ho
w am I supposed to translate my code that I've been working hard on and mak
e it so it will work with the FPGA board. I need my lights to work as the t
raffic lights ( both north-south and east- west roads) and I have pedestria
n walk signals that can interrupt the traffic lights to let pedestrians cro
ss as well as off peak and peak times determined by a switch. I don't reall
y 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 corr
ect 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 hel
p? I would greatly appreciate all the help I can get.
Thanks in advance,
Dave Wood  

Re: Programming a Traffic Light Controller In verilog using Quartus Prime Lite
On 11/18/20 10:49 PM, Dave Wood wrote:
> Hi everyone,

>  ( Don't know if this is even the right place to p

ost a question but ill try my luck)
> So basically I
am a student and I have a final project to build a tra
ffic 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 ha
ve cases and such set up to switch the device to diffe
rent states based on clock pulses and user input on th
e 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-sou
th and east- west roads) and I have pedestrian walk si
gnals that can interrupt the traffic lights to let ped
estrians cross as well as off peak and peak times dete
rmined by a switch. I don't really know how to transla
te the code into a function device and the resources I
've been trying to find have been less than helpful. I
f this isn't the correct spot to post something about
this particular issue could someone point me in a dire
ction 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  
>  
 
Mo
st FPGAs have enough drive strength that you can just
connect an LED
(with current limiting resistor) to th
e 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 mod
ule at its top level, and the inputs and
outputs of t
he madule will become pins of the device. You will nee
d to
use features of the FPGA design software to map
your module inputs and
outputs to the specific pins y
ou have attached the switches and LEDs to.
 
 
It loo
ks like that board already has a number of displays an
d 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
thos
e connect to with the documentation of the board. Then
 you can use
the FPGA software to map those pins to y
our signals.


Re: Programming a Traffic Light Controller In verilog using Quartus Prime Lite
Quoted text here. Click to load it

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&CategoryNo21%8&No10%21&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

Re: Programming a Traffic Light Controller In verilog using Quartus Prime Lite
Quoted text here. Click to load it

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

Site Timeline