Finite State Machines Digital Logic Design .pptx

23021519147 143 views 37 slides Nov 12, 2024
Slide 1
Slide 1 of 37
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37

About This Presentation

A comprehensive presentation on the Topic Finite State Machines, their Roles in our daily life, their structure, Purpose and Many More. Suitable for the students of the University, who are Enrolled in the Course Digital Logic Design. This Presentation covers the Topic Finite State Machines from Meal...


Slide Content

MEET Gohar Abbass Muhammad Haris Muhammad Bilal Abdul Rehman 23021519-116 23021519-084 23021519-092 23021519-147 Muhammad Bilal TEAM OUR PRESENTED TO Ms. Sehar Aftab BSCS23(II-A-Mor) TOPIC FINITE STATE MACHINES

1 Overview 2 3 Finite State Machines Building Blocks/Types 4 State Diagram 5 Applications Programmable Implementation of Functions (PROM, PAL, PLA) 6

FINITE STATE MACHINES

FINITE STATE MACHINES Timer State Next State R R 1 R G G G 1 G Y Y Y 1 Y R t=0

FINITE STATE MACHINES Timer State Next State Output R(00) R (00) 1 R(00) G (01) G(01) G (01) 1 G(01) Y (10) Y(10) Y (10) 1 Y(10) R (00) RED 00 GREEN 01 YELLOW 10 t=0

FINITE STATE MACHINES Finite State Machines (FSMs) play a crucial role in understanding decision-making logic and controlling digital systems. In an FSM, the outputs and the next state depend on the present state and the input function. These state machines are essential for designing sequential circuits and modeling behavior in digital systems. Digital Logic Design

Digital Circuits Output depends on the present inputs and the present state of the memory elements. Output depends on the present inputs. Sequential Circuits Combinational Circuits

Sequential Circuits Output depends on the present inputs and the present state of the memory elements. The output of the sequential depends on the present inputs as well as what is presently stored in the memory.

Sequential Circuits Consider the Example of Changing Channels on the Television using the next channel button. In the channel changing process the output of the next channel depends on the past channel. For example, channel 2 will come after 1, channel three will come after 2.

Latches Flip-Flops 1 2 Sequential Circuits Memory Elements Level Trigger Edge Trigger

What Actually is FSM ? A Finite State Machine (FSM) is a mathematical model used to represent and control the behavior of systems that can exist in a finite number of states at any given time. We will explain it further with a daily life example.

Building Blocks of FSMs States represent specific conditions or configurations of the system. Finite set, Distinctness, Initial state, Transition-dependent . States Transitions define how the FSM moves from one state to another based on input events. Deterministic, Non-deterministic, Represented as arrows . Transitions Inputs trigger transitions. Events, signals, or conditions. Influence state changes Inputs Describes how outputs are generated based on states and inputs. Mealy State Machine Moore State Machine Output

FINITE STATE MACHINES

Moore State Machine Mealy State Machine Outputs depend on both current inputs and states. More flexible in terms of output generation. Outputs depend only on the current state.

Mealy Machine Circuit Diagram

Moore Machine Circuit Diagram

REPRESENTATION OF BEHAVIOUR RPA SUMMER 2020 State Transition Diagram: Pictorial State Table Tabular State Equations Algebraic H ere we only discuss State Transition Diagram.

Each Possible Output State is represented as a Circle. Transitions from one state to another is represented by an arrow. So, that is how the State Diagram represents the behavior of the finite state machines or any sequential circuit in a pictorial way. The Value on the arrow indicates the input which lead to the state transition. STATE TRANSITION DIAGRAM The value next to the input represents the output for that input.

Mealy State Diagram State Table

Moore State Diagram State Table

Fetch-Decode-Execute Example 1

Fetch Decode Execute States: S0 (Fetch): Initial state where the CPU fetches the instruction. S1(Decode):State where the CPU decodes the fetched instruction.S2 (Execute): State where the CPU executes the decoded instruction. Transitions: S0 (Fetch) to S1 (Decode): Transition triggered when the fetch of an instruction is complete.S1 (Decode) to S2 (Execute): Transition triggered when the decode of the instruction is complete and the CPU is ready to execute it.S2 (Execute) to S0 (Fetch): Transition back to the fetch state after the execution of the current instruction is complete, indicating readiness to fetch the next instruction. Outputs/Actions : These are the actions taken upon entering each state or during transitions, such as fetching an instruction, decoding it, and executing it.

Role of FSMs in CPU Design Instruction Decoding: FSMs help decode instructions fetched from memory. They determine which operation (e.g., addition, subtraction, load, store) the CPU should perform based on the opcode. Control Signals: FSMs generate control signals that activate specific components (e.g., ALU, registers, memory) within the CPU. These signals coordinate the execution of instructions. State Transitions: FSMs transition between states (e.g., fetch, decode, execute) as the CPU progresses through the instruction cycle. Each state corresponds to a specific phase of instruction processing.

TV System Example Imagine you’re using a TV remote to change channels. The TV system can be modeled as an FSM. Let’s break it down: States Off: The TV is turned off. On: The TV is powered on. Channel 1, Channel 2, …, Channel N: Different TV channels. Transitions When you press the power button, the system transitions from Off to On. When you press the channel up or down button, the system transitions from one channel to another. Actions: Changing channels (switching from one state to another) is an action. Turning the TV on or off is also an action.

TV System Example So, in this example: The TV remote (and the TV itself) follows a set of rules (states, transitions, and actions). Each button press corresponds to a transition between states (e.g., from Channel 1 to Channel 2). In summary, FSMs help us understand and design systems with discrete and sequential behavior , like changing TV channels! 📺🔀

Natural Language Processing FSM States: Start Reading Noun Reading Verb End. In natural language processing, FSMs help parse sentences.

P rogrammable L ogic Devices Design and working of 1-PROM 2-PLA 3-PAL

Programmable Logic Array

@MuhammadBilal THANKS JAZAKALLAH! Ms. Sehar Aftab A special thank you to each of you for being part of this journey. Your support fuels our passion for creating impactful work. . From A ll of Group Members