Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to generate the 30s delay, traffic light, vhdl code

Status
Not open for further replies.

alle

Newbie level 2
Joined
Mar 22, 2010
Messages
2
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Singapore
Activity points
1,294
Any ways that I can generate a 30s delay for my traffic light vhdl code? the red light will stay for 30s, yellow light for 2s. How to generate these delay? Pls help.
 

How to generate delay?

DESIGN A COUNTER AND BE CAREFUL WITH YOU SYSTEM CLOCK FOR EXAMPLE YOU HAVE A CLOCK FO 40M ,25ns FOR ONE CYCLE.YOU WILL DESIGN A COUNTER OF (30S+2S)/25NS

IT ISN'T VERY DIFFICULT,IS IT?
 
Re: How to generate delay?

perhaps not for you but it is for me.. since im just starting to adapt to vhdl couple of days ago.. thats why i need some directions
 
Re: How to generate delay?

Use Wait statements with time.

example is :


Wait for 100ns;


where ns is for nano-sec. you can mili-sec (ms) or only sec (s)
 

Re: How to generate delay?

Wait statements are not synthesizable.

You need counters when the proposed code must be synthesizable.

Devas
 
Re: How to generate delay?

you need a set of counter to implement the timers...

First up all u need to find the 1micro-second tick..the generation of this depends on the clock operating frequency of your circuit..for example if u r operation @ 200Mhz.. then u need to design a counter to increment for every clock and once the counter reaches 200.. a pulse is generated, which indicates 1micro-second tick..use this tick to generate millisecond.. and the millisecond count to sec counter and second count tick to generate the required timers...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top