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.
 

Mr.LB

Newbie level 6
Joined
Mar 22, 2010
Messages
11
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,293
Location
heaven
Activity points
1,345
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?
 

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
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
 

shahidE636

Junior Member level 3
Joined
Dec 1, 2008
Messages
29
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
Lahore/Karachi
Activity points
1,455
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)
 

devas

Full Member level 2
Joined
Jun 16, 2009
Messages
129
Helped
42
Reputation
84
Reaction score
11
Trophy points
1,298
Activity points
2,004
Re: How to generate delay?

Wait statements are not synthesizable.

You need counters when the proposed code must be synthesizable.

Devas
 

shyam4908

Newbie level 6
Joined
Dec 1, 2009
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,402
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

Top