SlideShare a Scribd company logo
1 of 6
Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14
Rahel Mekonnen
1
ELECTRICAL ENGINEERING
School of Engineering
EGRE 254 – DIGITAL LOGIC DESIGN
Laboratory No.10: State Machine Design
Lecture Course Instructor: R. Klenke
Lab Section: Thursday 1530
Date Performed: 4 April 2014
Date Due: 22 April 2014
Student's Name: Jacob Ramey
Partner's Name: Rahel Mekonnen
Honor Pledge: I have neither given nor received any unauthorized help on this
lab. Signed:
_____________________________________________
Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14
Rahel Mekonnen
2
Introduction:
The purpose of thislabis to designastate machine that controlsthe operationof twostoplights.It
shouldfollow the normal operationof the stoplightaswell asthe follow the ‘quiet’model,whichis
slightlydifferent.There mustbe aninputincorporatedsothatwhenasserted,all inputswill hold atthe
Redstate.
Background and Theory:
To construct a Moore state machine that keepsanycars fromcrashing,we mustincorporate a
couple safetymeasures.
Figure 1: Showing the orientation of the stoplights- this will affect the design since we must make it so anytime
one light is green, the other is red to avoid crashes.
There needstobe 2 inputs- the firstshouldbe behave that,whenasserted,the machinewill
switchto a red state andholdthere until the inputisturnedoff. The secondinputshouldswitchthe
stoplightcontrollerfromabusyroad model toa quietroadmodel- Busy(2R,4G,1Y) and the quietmodel
will followasimilarsetuptothe one inthe previouslabreports.
Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14
Rahel Mekonnen
3
Procedure:
First,designaMoore state machine withthe parametersdescribed.Draw the state transition
table,the state diagram,andthe minimal expressionsforeachflipflopsvariables.Create the circuitthat
was designedfromthe above descriptioninXilinuxISEsuite.
Whenbuildingthe circuitinXilinux use the Dflipflopthatisinthe libraryalreadyandthe
necessaryAND,OR,NOT,NOR,XOR or NANDlogicforstate transitionsandoutputs.Simulate the results
inXilinux ISimshowingthe correctoperationof the problemstatementaswell asthe resetfunctionality.
It isimportantto showall the outputsfor eachlight.
Submita printoutof the schematicandsimulationoutputs,aswell asthe state transition
diagramthat was drawnfor the problemstatement.Show the resultstothe TA at the beginningof the
labperiod- handwrittenprelabswill notbe accepted.
Once the correct resultshave beensimulatedandsignedoff bythe TA’sorinstructors,hookup
the LEDs onthe cadetboard and attach themto the Pmodsas seenin Figure 2. In orderto buildthe
stoplightcircuitdescribedbelow, twoPmodconnectorswill be needed.
Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14
Rahel Mekonnen
4
Figure 2: Schematic showing the configuration of the components for the stoplight. A Pmod transition is placed in
series with an LED and a resistor.
Generate the programmingfile necessarytoinstalltothe FPGA so that itfunctionsasa
stoplight.Connectthe Pmodstothe FPGA as and inserieswiththe LED sothat whenthe FPGA closes
the path and allowselectricitytoflow(behavinglikeaswitch),thatparticular LED will turnon.
Experimental Results
Figure 3: Schematic of actual design implemented into Xilinux
Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14
Rahel Mekonnen
5
Figure 4: Simulation Results of the above schematic in figure 3
Figure 5: The VDHL code necessary to get the simulation results shown in Figure 4.
Figure 6: the User constraints file
Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14
Rahel Mekonnen
6
Conclusion
The use of an FPGA isa great wayto designa logical systemif one isavailableforuse.After
designingthe programinXilinux ISEandsimulatingthe results,the circuitwasable tobe programmed
ontoa boardthat carriesall the necessarylogicgatestoimplementthe functionsdefinedinthe
program.WhenconnectingPmodstothe FPGA and the BASYS2 board,the transistors are connectedin
serieswiththe LED andact as a switch- turningthe LED on or off at the appropriate times.The
groundingof the LEDs was not directlydone onthe board,butthe groundingof the Pmodwassufficient
for the entire circuitsince all currentflowedintothe Pmod.

More Related Content

Similar to State Machine Design - Traffic Light Controller EGRE 254

En erouting slm_v4050
En erouting slm_v4050En erouting slm_v4050
En erouting slm_v4050
i10network
 
En erouting slm_v4050
En erouting slm_v4050En erouting slm_v4050
En erouting slm_v4050
i10network
 
Single-Stage Power-Factor-Correction Circuit with Flyback Converter to Drive ...
Single-Stage Power-Factor-Correction Circuit with Flyback Converter to Drive ...Single-Stage Power-Factor-Correction Circuit with Flyback Converter to Drive ...
Single-Stage Power-Factor-Correction Circuit with Flyback Converter to Drive ...
Asoka Technologies
 
En erouting ilm_v4050 - para correção
En erouting ilm_v4050 - para correçãoEn erouting ilm_v4050 - para correção
En erouting ilm_v4050 - para correção
i10network
 

Similar to State Machine Design - Traffic Light Controller EGRE 254 (20)

Project main page 1
Project main page 1Project main page 1
Project main page 1
 
ECET 405 Entire Course NEW
ECET 405 Entire Course NEWECET 405 Entire Course NEW
ECET 405 Entire Course NEW
 
LAB MANUAL
LAB MANUALLAB MANUAL
LAB MANUAL
 
Weekly report1
Weekly report1Weekly report1
Weekly report1
 
Ecet 405 Effective Communication - snaptutorial.com
Ecet 405  Effective Communication - snaptutorial.comEcet 405  Effective Communication - snaptutorial.com
Ecet 405 Effective Communication - snaptutorial.com
 
ESL report
ESL reportESL report
ESL report
 
The Design and Construction of a low cost Propeller Led Display.
The Design and Construction of a low cost Propeller Led Display.The Design and Construction of a low cost Propeller Led Display.
The Design and Construction of a low cost Propeller Led Display.
 
4 - Simulation and analysis of different DCT techniques on MATLAB (presented ...
4 - Simulation and analysis of different DCT techniques on MATLAB (presented ...4 - Simulation and analysis of different DCT techniques on MATLAB (presented ...
4 - Simulation and analysis of different DCT techniques on MATLAB (presented ...
 
IRJET- PLC using Renesas Controller
IRJET-  	  PLC using Renesas ControllerIRJET-  	  PLC using Renesas Controller
IRJET- PLC using Renesas Controller
 
Ecet 405 Enhance teaching-snaptutorial.com
Ecet 405  Enhance teaching-snaptutorial.comEcet 405  Enhance teaching-snaptutorial.com
Ecet 405 Enhance teaching-snaptutorial.com
 
ECET 405 Education Organization - snaptutorial.com
ECET 405  Education Organization - snaptutorial.comECET 405  Education Organization - snaptutorial.com
ECET 405 Education Organization - snaptutorial.com
 
Yamini softech m.tech titles(2013 14)
Yamini softech m.tech titles(2013 14)Yamini softech m.tech titles(2013 14)
Yamini softech m.tech titles(2013 14)
 
Single-Stage Buck-Derived LED Driver With Improved Efficiency and Power Facto...
Single-Stage Buck-Derived LED Driver With Improved Efficiency and Power Facto...Single-Stage Buck-Derived LED Driver With Improved Efficiency and Power Facto...
Single-Stage Buck-Derived LED Driver With Improved Efficiency and Power Facto...
 
Digital Energy Meter Project Report
Digital Energy Meter Project ReportDigital Energy Meter Project Report
Digital Energy Meter Project Report
 
En erouting slm_v4050
En erouting slm_v4050En erouting slm_v4050
En erouting slm_v4050
 
En erouting slm_v4050
En erouting slm_v4050En erouting slm_v4050
En erouting slm_v4050
 
SEM 6th final 1
SEM 6th final 1SEM 6th final 1
SEM 6th final 1
 
Single-Stage Power-Factor-Correction Circuit with Flyback Converter to Drive ...
Single-Stage Power-Factor-Correction Circuit with Flyback Converter to Drive ...Single-Stage Power-Factor-Correction Circuit with Flyback Converter to Drive ...
Single-Stage Power-Factor-Correction Circuit with Flyback Converter to Drive ...
 
239587360 ee200-lab-manual
239587360 ee200-lab-manual239587360 ee200-lab-manual
239587360 ee200-lab-manual
 
En erouting ilm_v4050 - para correção
En erouting ilm_v4050 - para correçãoEn erouting ilm_v4050 - para correção
En erouting ilm_v4050 - para correção
 

More from Jacob Ramey

Final Design Report_REVFINAL
Final Design Report_REVFINALFinal Design Report_REVFINAL
Final Design Report_REVFINAL
Jacob Ramey
 
Two Stage Amplifier
Two Stage AmplifierTwo Stage Amplifier
Two Stage Amplifier
Jacob Ramey
 
EGRE 310 RAMEYJM Final Project Writeup
EGRE 310 RAMEYJM Final Project WriteupEGRE 310 RAMEYJM Final Project Writeup
EGRE 310 RAMEYJM Final Project Writeup
Jacob Ramey
 
FINAL_Report_RAMEYJM_NAGR
FINAL_Report_RAMEYJM_NAGRFINAL_Report_RAMEYJM_NAGR
FINAL_Report_RAMEYJM_NAGR
Jacob Ramey
 
Design of a Wireless Communication System EGRE 309
Design of a Wireless Communication System EGRE 309Design of a Wireless Communication System EGRE 309
Design of a Wireless Communication System EGRE 309
Jacob Ramey
 
Design of an Antenna EGRE 309
Design of an Antenna EGRE 309Design of an Antenna EGRE 309
Design of an Antenna EGRE 309
Jacob Ramey
 

More from Jacob Ramey (6)

Final Design Report_REVFINAL
Final Design Report_REVFINALFinal Design Report_REVFINAL
Final Design Report_REVFINAL
 
Two Stage Amplifier
Two Stage AmplifierTwo Stage Amplifier
Two Stage Amplifier
 
EGRE 310 RAMEYJM Final Project Writeup
EGRE 310 RAMEYJM Final Project WriteupEGRE 310 RAMEYJM Final Project Writeup
EGRE 310 RAMEYJM Final Project Writeup
 
FINAL_Report_RAMEYJM_NAGR
FINAL_Report_RAMEYJM_NAGRFINAL_Report_RAMEYJM_NAGR
FINAL_Report_RAMEYJM_NAGR
 
Design of a Wireless Communication System EGRE 309
Design of a Wireless Communication System EGRE 309Design of a Wireless Communication System EGRE 309
Design of a Wireless Communication System EGRE 309
 
Design of an Antenna EGRE 309
Design of an Antenna EGRE 309Design of an Antenna EGRE 309
Design of an Antenna EGRE 309
 

State Machine Design - Traffic Light Controller EGRE 254

  • 1. Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14 Rahel Mekonnen 1 ELECTRICAL ENGINEERING School of Engineering EGRE 254 – DIGITAL LOGIC DESIGN Laboratory No.10: State Machine Design Lecture Course Instructor: R. Klenke Lab Section: Thursday 1530 Date Performed: 4 April 2014 Date Due: 22 April 2014 Student's Name: Jacob Ramey Partner's Name: Rahel Mekonnen Honor Pledge: I have neither given nor received any unauthorized help on this lab. Signed: _____________________________________________
  • 2. Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14 Rahel Mekonnen 2 Introduction: The purpose of thislabis to designastate machine that controlsthe operationof twostoplights.It shouldfollow the normal operationof the stoplightaswell asthe follow the ‘quiet’model,whichis slightlydifferent.There mustbe aninputincorporatedsothatwhenasserted,all inputswill hold atthe Redstate. Background and Theory: To construct a Moore state machine that keepsanycars fromcrashing,we mustincorporate a couple safetymeasures. Figure 1: Showing the orientation of the stoplights- this will affect the design since we must make it so anytime one light is green, the other is red to avoid crashes. There needstobe 2 inputs- the firstshouldbe behave that,whenasserted,the machinewill switchto a red state andholdthere until the inputisturnedoff. The secondinputshouldswitchthe stoplightcontrollerfromabusyroad model toa quietroadmodel- Busy(2R,4G,1Y) and the quietmodel will followasimilarsetuptothe one inthe previouslabreports.
  • 3. Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14 Rahel Mekonnen 3 Procedure: First,designaMoore state machine withthe parametersdescribed.Draw the state transition table,the state diagram,andthe minimal expressionsforeachflipflopsvariables.Create the circuitthat was designedfromthe above descriptioninXilinuxISEsuite. Whenbuildingthe circuitinXilinux use the Dflipflopthatisinthe libraryalreadyandthe necessaryAND,OR,NOT,NOR,XOR or NANDlogicforstate transitionsandoutputs.Simulate the results inXilinux ISimshowingthe correctoperationof the problemstatementaswell asthe resetfunctionality. It isimportantto showall the outputsfor eachlight. Submita printoutof the schematicandsimulationoutputs,aswell asthe state transition diagramthat was drawnfor the problemstatement.Show the resultstothe TA at the beginningof the labperiod- handwrittenprelabswill notbe accepted. Once the correct resultshave beensimulatedandsignedoff bythe TA’sorinstructors,hookup the LEDs onthe cadetboard and attach themto the Pmodsas seenin Figure 2. In orderto buildthe stoplightcircuitdescribedbelow, twoPmodconnectorswill be needed.
  • 4. Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14 Rahel Mekonnen 4 Figure 2: Schematic showing the configuration of the components for the stoplight. A Pmod transition is placed in series with an LED and a resistor. Generate the programmingfile necessarytoinstalltothe FPGA so that itfunctionsasa stoplight.Connectthe Pmodstothe FPGA as and inserieswiththe LED sothat whenthe FPGA closes the path and allowselectricitytoflow(behavinglikeaswitch),thatparticular LED will turnon. Experimental Results Figure 3: Schematic of actual design implemented into Xilinux
  • 5. Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14 Rahel Mekonnen 5 Figure 4: Simulation Results of the above schematic in figure 3 Figure 5: The VDHL code necessary to get the simulation results shown in Figure 4. Figure 6: the User constraints file
  • 6. Jake Ramey EGRE 254 – Digital Logic Design Lab 10 due 4/22/14 Rahel Mekonnen 6 Conclusion The use of an FPGA isa great wayto designa logical systemif one isavailableforuse.After designingthe programinXilinux ISEandsimulatingthe results,the circuitwasable tobe programmed ontoa boardthat carriesall the necessarylogicgatestoimplementthe functionsdefinedinthe program.WhenconnectingPmodstothe FPGA and the BASYS2 board,the transistors are connectedin serieswiththe LED andact as a switch- turningthe LED on or off at the appropriate times.The groundingof the LEDs was not directlydone onthe board,butthe groundingof the Pmodwassufficient for the entire circuitsince all currentflowedintothe Pmod.