Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Similar documents

ECE/Comp Sci 352 Digital Systems Fundamentals. Charles R. Kime Section 2 Fall Logic and Computer Design Fundamentals

Chapter 6. Synchronous Sequential Circuits

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

Example: vending machine

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Philadelphia University Student Name: Student Number:

Fundamentals of Digital Design

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

CSC 322: Computer Organization Lab

Synchronous Sequential Circuit Design. Digital Computer Design

Lecture 7: Logic design. Combinational logic circuits

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Topic 8: Sequential Circuits

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

Design of Sequential Circuits

ECE 341. Lecture # 3

EE 209 Logic Cumulative Exam Name:

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

Models for representing sequential circuits

Present Next state Output state w = 0 w = 1 z A A B 0 B A C 0 C A C 1

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

ELCT201: DIGITAL LOGIC DESIGN

Review Problem 1. should be on. door state, false if light should be on when a door is open. v Describe when the dome/interior light of the car

Sample Test Paper - I

Combinational Logic Design Combinational Functions and Circuits

Synchronous Sequential Logic

EECS150 - Digital Design Lecture 23 - FSMs & Counters

State and Finite State Machines

CprE 281: Digital Logic

Finite State Machine. By : Ali Mustafa

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

Sequential Synchronous Circuit Analysis

CPE100: Digital Logic Design I

UNIT 8A Computer Circuitry: Layers of Abstraction. Boolean Logic & Truth Tables

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

Philadelphia University Student Name: Student Number:

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

Logic and Computer Design Fundamentals. Chapter 8 Sequencing and Control

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

ELCT201: DIGITAL LOGIC DESIGN

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

ELE2120 Digital Circuits and Systems. Tutorial Note 9

Lecture (08) Synchronous Sequential Logic

Design of Datapath Controllers

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

Sequential logic and design

Chapter 5 Synchronous Sequential Logic

Different encodings generate different circuits

CPE100: Digital Logic Design I

Mealy & Moore Machines

Finite State Machine (FSM)

Lecture 10: Synchronous Sequential Circuits Design

CprE 281: Digital Logic

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

Topic 8: Sequential Circuits. Bistable Devices. S-R Latches. Consider the following element. Readings : Patterson & Hennesy, Appendix B.4 - B.

Analysis and Design of Sequential Circuits: Examples

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

University of Toronto Faculty of Applied Science and Engineering Final Examination

MODULAR CIRCUITS CHAPTER 7

Digital Electronics Circuits 2017

Digital Electronics Sequential Logic

DIGITAL LOGIC CIRCUITS

ALU, Latches and Flip-Flops

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

BER KELEY D AV IS IR VINE LOS AN GELES RIVERS IDE SAN D IEGO S AN FRANCISCO

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) State any two Boolean laws. (Any 2 laws 1 mark each)

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

DE58/DC58 LOGIC DESIGN DEC 2014

EEE2135 Digital Logic Design

Review for Final Exam

State & Finite State Machines

Digital Design. Sequential Logic

Written exam with solutions IE Digital Design Friday 21/

CS/COE0447: Computer Organization

( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters)

Combinational Logic. By : Ali Mustafa

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

Boolean Logic Continued Prof. James L. Frankel Harvard University

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

Fundamentals of Computer Systems

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

UNIVERSITY OF WISCONSIN MADISON

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec09 Counters Outline.

Save from: cs. Logic design 1 st Class أستاذ المادة: د. عماد

Lecture 22 Chapters 3 Logic Circuits Part 1

Transcription:

Appendix B Review of Digital Logic Baback Izadi Division of Engineering Programs bai@engr.newpaltz.edu

Elect. & Comp. Eng. 2

DeMorgan Symbols NAND (A.B) = A +B NOR (A+B) = A.B AND A.B = A.B = (A +B ) OR A+B = A+B =(A.B ) NOT A = A Buffer A = (A ) Elect. & Comp. Eng. 3

Gates, truth tables, and logic equations Asserted signal: A signal that is (logically) true, or 1. Deasserted signal: A signal that is (logically) false, or 0. Combinational logic: A logic system whose blocks do not contain memory and hence compute the same output given the same input. Sequential logic: A group of logic elements that contain memory and hence whose value depends on the input as well as the current contents of the memory. Problem: Consider a logic function with three inputs: A, B, and C. Output D is true if at least one input is true Output F is true only if all three inputs are true Output E is true if exactly two inputs are true Elect. & Comp. Eng. 4

D=A+B+C F=A B C E=(A B C)+(A B.C)+(A.B C) Elect. & Comp. Eng. 5

Find: a. Sum of Min-terms b. Product of Max-terms c. Standard Sum of Products d. Standard Product of Sums e. Minimum Sum of Products f. Minimum Product of Sums g. Implement the circuit using AND OR logic h. Implement the circuit using all NAND logic i. Implement the circuit using OR AND logic j. Implement the circuit using all NOR logic Elect. & Comp. Eng. 6

Simplification of Boolean Functions Elect. & Comp. Eng. 7

Popular Combinational Devices Full Adder Seven Segment Decoder Standard Decoders: Used to enable one device out of many Encoders: Used to identify the device that is requesting service Multiplexers: An electronic switch which connects an input to one of many outputs Demultiplexers: An electronic switch which connects an output to one of many inputs Elect. & Comp. Eng. 8

Encoder Elect. & Comp. Eng. EGC4 32 SUNY New

Decoder Decoder: A logic block that has an n-bit input and 2 n outputs, where only one output is asserted for each input combination. 1 out of 8 decoder has 3 inputs, called 12, 11, and 10, and 2 3 = 8 outputs, called Out0 to Out7. Only the output corresponding to the binary value of the input is true, as shown in the truth table. The label 3 on the input to the decoder says that the input signal is 3 bits wide. Elect. & Comp. Eng. 10

The Multiplexor A multiplexor might more properly be called a selector, since its output is one of the inputs that is selected by a control. 1-out-2 MUX A B S 0 1 O S O 0 A 1 B C = S A + S B How about 1-out-4? Elect. & Comp. Eng. 11

Abstraction What if we are choosing between two 32-bits inputs Select A 32 B 32 Select M u x 32 C A31 B31 A30 B30 M u x M u x. C31 C30. A0 B0 M u x C0 Elect. & Comp. Eng. 12

1 to 4 Demultiplexer Elect. & Comp. Eng. 13

S1 S0 Y3 Y2 Y1 Y0 0 0 0 0 0 Din 0 1 0 0 Din 0 1 0 0 Din 0 0 1 1 Din 0 0 0 Elect. & Comp. Eng. 14

Programmable logic array Elect. & Comp. Eng. 15

Verilog Hardware description language Behavioral specification: Describes how a digital system operates functionally. Structural specification: Describes how a digital system is organized in terms of a hierarchical connection of elements. Elect. & Comp. Eng. 16

Clocking methodology Clocking methodology: The approach used to determine when data is valid and stable relative to the clock. Elect. & Comp. Eng. 17

Setup and Hold Time Setup time: The minimum time that the input to a memory device must be valid before the clock edge. Hold time: The minimum time during which the input must be valid after the clock edge. Propagation time: The time required for an input to a flip-flop to propagate to the outputs of the flip-flop. Elect. & Comp. Eng. 18

Clock skew Clock skew: The difference in absolute time between the times when two state elements see a clock edge. Elect. & Comp. Eng. 19

Design of a Register File Ability to read from two registers and write to one register Read operation using D flip-flops and MUX s Readregister number 1 Register 0 Read register number 1 Read register number 2 Write register Write data Register file Write Read data 1 Read data 2 Readregister number 2 Register 1... Register n 2 Register n 1 M u x Readdata 1 M u x Readdata 2 Elect. & Comp. Eng. 20

Register File Read and Write Read register number 1 Read register number 2 Read register number 1 Read register number 2 Write register Write data Register 0 Register 1 Register n 1 Register n Register file Write Read data 1 Read data 2 M u x Read data 1 Write Write Register 0 1 n-to-1 decoder n 1 n C Register 0 D C Register 1 D C Register n 1 D M u x Read data 2 Write Data C Register n D Elect. & Comp. Eng. 21

Design of Sequential Circuits Design Procedure: 1. Word description. 2. State diagram. 3. Assign binary values. 4. Decide on type of flip flops. 5. Excitation table for the flip flop. 6. State table. 7. Generate simplified logic equations for flip flop inputs and system outputs. 8. Draw logic diagram. Elect. & Comp. Eng. 22

Moore Vs Mealy FSMs: different output generation Moore FSM: next state inputs x 0...x n Comb. Logic S + n CLK D Flip- Flops Q n Comb. Logic outputs y k =f k (S) present state S Mealy FSM: inputs x 0...x n Comb. Logic direct combinational path! S + n CLK D Flip- Flops Q n Comb. Logic outputs y k = f k (S, x 0...x n ) S Elect. & Comp. Eng. 23

Finite State Machines Example State diagrams are representations of Finite State Machines (FSM) Mealy FSM Output depends on input and state Output is not synchronized with clock can have temporarily unstable output Moore FSM Output depends only on state Mealy FSM Moore FSM Elect. & Comp. Eng. 24

Example #2: Using JK flip-flops, design a circuit for following state diagram Step 1: State Diagram Step 2: JK Flip-Flop Excitation Table PRESENT STATE NEXT STATE Q(t) Q(t+1) J K 0 0 0 X 0 1 1 X 1 0 X 1 1 1 X 0 Mealy or Moore? Elect. & Comp. Eng. 25

Step 3: State Table PRESENT STATE INPU T NEXT STATE FLIP-FLOP INPUTS OUTPU T Q A Q B X Q A Q B J A K A J B K B Z 00 0 00 0 X 0 X 0 00 1 01 0 X 1 X 0 01 0 10 1 X X 1 0 01 1 01 0 X X 0 0 10 0 10 X 0 0 X 1 10 1 11 X 0 1 X 1 11 0 11 X 0 X 0 0 11 1 00 X 1 X 1 0 Step 4: Karnaugh Map Q B X 00 01 Q 11 10 A 0 1 0 1 m 0 m 1 m 3 m 2 X X X X m 4 m 5 m 7 m 6 J A = Q B X' Q B X 00 01 Q 11 10 A X X m 0 m 1 m 3 m 2 m 4 m 5 m 7 m 6 X 1 1 X Q B X 00 01 Q 11 10 A Q B X 00 01 Q 11 10 A K A = Q B X 0 1 X X m 0 m 1 m 3 m 2 0 X X 1 m 0 m 1 m 3 m 2 Q B X 00 01 Q 11 10 A 1 1 m 4 m 5 m 7 m 6 X X 1 X X 1 0 m 4 m 5 m 7 m 6 m 0 m 1 m 3 m 2 J B = X K B = Q A X + Q' A X = Q A + X 1 1 1 m 4 m 5 m 7 m 6 Z= Q A Q' B Elect. & Comp. Eng. 26

Step 5: Circuit Elect. & Comp. Eng. 27

4-bit Binary Counter with Reset module count_4_r_v (CLK, RESET, EN, Q, CO); input CLK, RESET, EN; output [3:0] Q; output CO; reg [3:0] Q; assign CO = (count == 4'b1111 && EN == 1 b1)? 1 : 0; always@(posedge CLK or posedge RESET) begin if (RESET) Q <= 4'b0000; else if (EN) Q <= Q + 4'b0001; end endmodule Elect. & Comp. Eng. 28

4-bit Shift Register with Reset module srg_4_r_v (CLK, RESET, SI, Q,SO); input CLK, RESET, SI; output [3:0] Q; output SO; reg [3:0] Q; assign SO = Q[3]; always@(posedge CLK or posedge RESET) begin if (RESET) Q <= 4'b0000; else Q <= {Q[2:0], SI}; end endmodule Elect. & Comp. Eng. 29