discussion cse 140l 3 rd november 2010 vikram murali
Post on 19-Dec-2015
217 views
TRANSCRIPT
![Page 1: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/1.jpg)
DISCUSSION CSE 140L3rd November 2010
Vikram Murali
![Page 2: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/2.jpg)
Things we will cover
Finite State Machines -- Mealy and Moore models. -- State Encoding. -- Simple Problem.
VHDL Basics -- The Structure -- What we need !
![Page 3: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/3.jpg)
FSM – Very Briefly
Mathematical abstraction used to design digital logic
Behavior model composed of a finite number of states, transitions between those states, and actions, similar to a flow graph.
Actually realising a problem statement or modelling it in digital logic.
Logic Flows when certain conditions are met.
![Page 4: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/4.jpg)
Components
States – Represent a state of the circuit (or the problem statement modelled). Characterised by the inputs that caused it to happen and the outputs it results in.
Inputs – Decide the flow between states.
Outputs.
![Page 5: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/5.jpg)
Example.
Outputs 1 when sequence is 1011 ! Seq. Detector
![Page 6: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/6.jpg)
Mealy and Moore Models
![Page 7: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/7.jpg)
Another Mealy Machine
![Page 8: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/8.jpg)
Difference.
Mealy model : Output depends on both the current state and the input.
Moore : It depends only on the current state. Imagine : In a Moore machine, the output is
associated with the state. In a mealy machine, the output is associated with the transitions.
Typically, Moore has more states, but is easier to implement. Mealy machines have less states, and also is faster in clocked systems (the output occurs right away when the inputs are detected). Moore has to wait the clock cycle to transition to the next state before the output is changed. => Mealy can give rise to race conditions. !!
![Page 9: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/9.jpg)
State Encoding
States named as S0 , S1 … Sn are fine with us.
But implementation in Digital Logic ? Each state must be encoded in 0s and 1s Each bit has a certain state transition logic -- We need to derive this to design our
circuit that implements our model/requirement
Eg : 8 states => 2^3 = 8 => 3 bits to encode.
111 DOWNTO 000
![Page 10: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/10.jpg)
A Quick Problem. Traffic Light Cntrler !
![Page 11: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/11.jpg)
Solution. State Diagram.
![Page 12: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/12.jpg)
State transition table
![Page 13: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/13.jpg)
Circuit after logic minimisation for A+, B+ and Z. A+
B
B+
A
![Page 14: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/14.jpg)
VHDL.
Major parts of a VHDL program
-- Entity Declaration -- Architecture Body -- Package Declaration -- Package Body -- Configuration
Synthesisable !
![Page 15: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/15.jpg)
“Look at the following program skeleton”
![Page 16: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/16.jpg)
Port name
Data-type
Mode
![Page 17: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/17.jpg)
Individual Syntaxes
ENTITY
![Page 18: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/18.jpg)
Example
ARCHITECTURE
![Page 19: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/19.jpg)
What we want – VHDL.
States in VHDL -- Building FSMs -- State Transitions and Outputs
![Page 20: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/20.jpg)
![Page 21: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/21.jpg)
![Page 22: DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali](https://reader031.vdocuments.us/reader031/viewer/2022032201/56649d2d5503460f94a0316b/html5/thumbnails/22.jpg)
THANK YOU !