72 views

Uploaded by Nazim Ali

this is the fsm design of traffic controller

- Lecture 21
- STT Tutorial
- kowalewski97case
- Final Fall 2008 With Solutions
- Design and Embedded Control Systems
- What is Automata
- LaTeX Informed
- Minimal finite-state automaton associated with a sequential circuit
- Tarea Compu
- Lecture5 Cuong
- TOTUL
- My-Hill Nerode Theorem
- Digital Qes
- sc554_2014_lecture09
- 10.1.1.138.3530
- written tutorial
- anura disanayaka
- Quiz - 1
- 3-vlsicad-bdd
- TF16412149 (2).docx

You are on page 1of 24

Web: http://www.cs.columbia.edu/~martha/courses/3827/sp11/

Finite State Machines Denition Moore Mealy Design procedure Examples

FSM = State register + combinational logic

Stores the current state and Loads the next state @ clock edge Computes the next state and Computes the outputs

Next state is determined by the current state and the inputs Two types of nite state machines differ in the output logic: Moore FSM: outputs depend only on the current state Mealy FSM: outputs depend on the current state and the inputs

Trafc light controller Trafc sensors: TA, TB (TRUE when there is trafc) Lights: LA, LB

Inputs: CLK, Reset, TA, TB Outputs: LA, LB

Moore FSM: outputs labeled in each state States: Circles Transitions: Arcs

Moore FSM: outputs labeled in each state States: Circles Transitions: Arcs

Moore FSM: outputs labeled in each state States: Circles

AGreen AYellow

Transitions: Arcs

BYellow

BGreen

State transitions (from diagram) can be rewritten in a state transition table (S = current state, S = next state)

AGreen

AYellow

Inputs TB X X X 0 1 X

BYellow

BGreen

BGreen BYellow

After selecting a state encoding the symbolic states in the transition table can be annotated with actual state / next state bits

Encoding State AGreen AYellow BGreen BYellow Current State Encoded Current State S AGreen AGreen AYellow BGreen BGreen BYellow S1 0 0 0 1 1 1 S0 0 0 1 0 0 1 0 1 X X X X Inputs TA TB X X X 0 1 X Next State S AYellow AGreen BGreen BYellow BGreen AGreen S1 0 0 1 1 S0 0 1 0 1

S1= S1 XOR S0 S0 = `S1`S0`TA + S1`S0`TB

FSM output logic is computed in much the same manner as the next state logic Because this is a Moore machine, outputs are a function of the current state only (were it a Mealy output would be a function of current state + inputs)

output encoding

Output Green Yellow Red Encoding 0 0 1 0 1 0 State AGreen AYellow BGreen BYellow S1 0 0 1 1

State S0 0 1 0 1 0 0 1 1 LA LA1 LA0 0 1 0 0 1 1 0 0 LB LB1 LB0 0 0 0 1

LA1 = S1; LA0 = S1`S0 LB1 = `S1; LB0 = S1S0

red light

What does the Reset signal do to this machine? S = 00 = AGreen = A gets green light, B gets red light

Binary encoding: i.e., for four states, 00, 01, 10, 11 One-hot encoding One state bit per state Only one state bit is HIGH at once I.e., for four states, 0001, 0010, 0100, 1000 Requires more ip-ops Often next state and output logic is simpler Sometimes a semantically meaningful encoding makes the most sense (e.g., a faucet controller with a volume state and a temperature state)

Alyssa P. Hacker has a snail that crawls down a paper tape with 1s and 0s on it. The snail smiles whenever the last four digits it has crawled over are 1101. Design Moore and Mealy FSMs of the snails brain.

Break complex FSMs into smaller interacting FSMs Example: Modify the trafc light controller to have a Parade Mode. The FSM receives two more inputs: P, R When P = 1, it enters Parade Mode and the Bravado Blvd. light stays green. When R = 1, it leaves Parade Mode

Parade FSM

Unfactored FSM Factored FSM

Identify the inputs and outputs Sketch a state transition diagram Write a state transition table Select state encodings For a Moore machine:

Rewrite the state transition table with the selected state encodings Write the output table

Rewrite the combined state transition and output table with the selected state encodings

Write Boolean equations for the next state and output logic Sketch the circuit schematic

MEALY

input

A N SY C A N SY C C

output

CL

YN S A

FFs

N SY

MOORE

input

AS C N Y

CL 1

AS

C N Y

FFs

SY

NC

CL 2

N SY

output

22

Unused states: extra state encodings (e.g., using 3 FFs to represent 6 states leaves 2 unused states) can be treated as dont care values and used to simplify the combinational logic State minimization: two states are equivalent if they transition to the same or equivalent states on the same inputs (while producing the same outputs in the case of a Mealy machine)

23

- Lecture 21Uploaded byborakas_borakas
- STT TutorialUploaded byJose Herrera Brañes
- kowalewski97caseUploaded byGino Pascualli
- Final Fall 2008 With SolutionsUploaded byEileen Fu
- Design and Embedded Control SystemsUploaded bygomesjunior2002
- What is AutomataUploaded byMuhammad Aqib Naeem
- LaTeX InformedUploaded byNelson Bob
- Minimal finite-state automaton associated with a sequential circuitUploaded byAnonymous vQrJlEN
- Tarea CompuUploaded byBarehands Hands
- Lecture5 CuongUploaded byLua Dinh Thi
- TOTULUploaded byAlina Veja
- My-Hill Nerode TheoremUploaded bymaddhuri_anusha
- Digital QesUploaded bylpvasam
- sc554_2014_lecture09Uploaded bytharindu12
- 10.1.1.138.3530Uploaded byusernameuserna
- written tutorialUploaded byapi-396735529
- anura disanayakaUploaded byJason Taylor
- Quiz - 1Uploaded byFarhan Muhammad
- 3-vlsicad-bddUploaded bymihai37
- TF16412149 (2).docxUploaded byLohitRamakrishnaKotapati
- M911 LES08Uploaded byTuyếnĐặng
- Enrollment ManualUploaded byMradul Yadav
- q2- elizabeth georgeUploaded byapi-237860762
- 17 - SchedulingUploaded byMaheshBirajdar
- Frequency Count StatisticsUploaded bybudakgemuk
- Advanced Behavioral Modeling.pptUploaded bybhargavi
- Reasoning Shortcut Tricks_Part7Uploaded byKaushalSingh
- Light Space & Time Online Art Gallery Chooses SubmittableUploaded byStar One Public Relations
- International Engineering Journal 2012 Price ListUploaded byTamizharasi Karuppanasamy
- EOL UpgradesUploaded bykkuppachi

- Acer At2010 Lcd Tv SmUploaded bysergionel
- ZigbeeUploaded bymaheshryl
- Ch15_Wire n CableUploaded bySubas Ratna Tuladhar
- PS-003Uploaded byAndrei Horhoianu
- Linux Kernal 1Uploaded bykaushikei22
- Panasonic DMREZ28-MUL Operating InstructionsUploaded byykep
- [Solved] Qualcomm Atheros AR9002WB-1ng Windows10 Limited Connectivity - Ministry of SolutionsUploaded byasepsow
- Introduction to SiliconesUploaded byGary Nicholson
- Comportamiento de Piezocompuestos 1_3 en TransductoresUploaded byrotero_pujol
- NFPA Stipulations on BMS Logic SystemUploaded byJawahar
- Cp 2 Mark and 16 MarkUploaded bykathirdcn
- Geeetech Prusa I3 Pro&Pro B User ManualUploaded byGeovanny Javier Morocho Choca
- VMware Memory Reclamation Techniques Run Cycle in VSphere 6.0Uploaded byvenkat
- 1756 Series Io ModulesUploaded byIvam Alvarado
- Pspice TutUploaded byPratyush Chauhan
- Measurement of Heat in the Stator Windings of an Open Loop Controlled Three Phase Induction Motor Using AC FiltersUploaded byArie Amri Marta
- Protection SystemUploaded byBharat Chandra Sahu
- SADIDriver_Rev3.110.F2 - Quick Start GuideUploaded byHeru Herjuna
- Watt Hr MeterUploaded bykrishnaeie
- Awp Lesson Plan DocUploaded byKishore Kumar
- Fuwell_170816Uploaded byevichad1962
- ElectrooculographyUploaded byDivya Devis
- Accel Catalog 2011 74488gUploaded byCarlos Gudiño
- 2013 - GSM Based Smart Street Light Monitoring and Control SystemUploaded bylbk50
- FDDIUploaded byJunaid khan
- Emissions MeasurementUploaded byprinceshital
- EEE572_L10Uploaded byJack Squat
- Brother DCP8065DN MFC8870DW Service ManualUploaded byLuiz C. Pinho
- Ceramah 2Q (2)Uploaded byMariana Ahmad
- 1660C Series ServiceUploaded byadsmith1