Outline. CPE/EE 422/522 Advanced Logic Design L04. Review: 8421 BCD to Excess3 BCD Code Converter. Review: Mealy Sequential Networks

Similar documents
Outline. CPE/EE 422/522 Advanced Logic Design L03. Review: Clocked D Flip-Flop with Rising-edge Trigger. Sequential Networks

Combinational / Sequential Logic

Logic Design II (17.342) Spring Lecture Outline

Flip-flop and Registers

ECE 3401 Lecture 11. Sequential Circuits

Logic Design II (17.342) Spring Lecture Outline


ACS College of Engineering. Department of Biomedical Engineering. HDL pre lab questions ( ) Cycle-1

ECE 3401 Lecture 12. Sequential Circuits (II)

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

1. Convert the decimal number to binary, octal, and hexadecimal.

Registers, Register Transfers and Counters Dr. Fethullah Karabiber

ECE 263 Digital Systems, Fall 2015

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

Outputs Combinational circuit. Next state. Fig. 4-1 Block Diagram of a Sequential Circuit

Department of Computer Science and Engineering Question Bank- Even Semester:

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Unit 11. Latches and Flip-Flops

CS6201 UNIT I PART-A. Develop or build the following Boolean function with NAND gate F(x,y,z)=(1,2,3,5,7).

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

Computer Organization & Architecture Lecture #5

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

MC9211 Computer Organization

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

Microprocessor Design

UNIT IV. Sequential circuit

Combinational vs Sequential

Synchronous Sequential Logic

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

Synchronous Sequential Logic. Chapter 5

CPS311 Lecture: Sequential Circuits

Sequential Logic Circuits

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Eng. Mohammed Samara. Fall The Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Chapter 5 Synchronous Sequential Logic

Fundamentals of Computer Systems

WINTER 15 EXAMINATION Model Answer

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Subject : EE6301 DIGITAL LOGIC CIRCUITS

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

RS flip-flop using NOR gate

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

Using minterms, m-notation / decimal notation Sum = Cout = Using maxterms, M-notation Sum = Cout =

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

Outline. EECS150 - Digital Design Lecture 27 - Asynchronous Sequential Circuits. Cross-coupled NOR gates. Asynchronous State Transition Diagram

Level and edge-sensitive behaviour

Digital Fundamentals: A Systems Approach

Figure 1: segment of an unprogrammed and programmed PAL.

MODULE 3. Combinational & Sequential logic

EE292: Fundamentals of ECE

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

Digital Principles and Design

CS8803: Advanced Digital Design for Embedded Hardware

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

IT T35 Digital system desigm y - ii /s - iii

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

Flip-Flops and Registers

Synchronous Sequential Design

Feedback Sequential Circuits

EECS 270 Final Exam Spring 2012

VHDL 4 BUILDING BLOCKS OF A COMPUTER.

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

ROEVER COLLEGE OF ENGINEERING & TECHNOLOGY ELAMBALUR, PERAMBALUR DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Multiplexor (aka MUX) An example, yet VERY useful circuit!

Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems

Asynchronous & Synchronous Reset Design Techniques - Part Deux

Synchronous Sequential Logic

CHAPTER1: Digital Logic Circuits

R13. II B. Tech I Semester Regular Examinations, Jan DIGITAL LOGIC DESIGN (Com. to CSE, IT) PART-A

ELE2120 Digital Circuits and Systems. Tutorial Note 8

St. MARTIN S ENGINEERING COLLEGE

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Part II. Chapter2: Synchronous Sequential Logic

Advanced Digital Logic Design EECS 303

Tribhuvan University Institute of Science and Technology Bachelor of Science in Computer Science and Information Technology

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

COMP12111: Fundamentals of Computer Engineering

TYPICAL QUESTIONS & ANSWERS

Registers & Counters. Logic and Digital System Design - CS 303 Erkay Savaş Sabanci University

COMP sequential logic 1 Jan. 25, 2016

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

Computer Architecture and Organization

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Tajana Simunic Rosing. Source: Vahid, Katz

Digital Logic Design ENEE x. Lecture 19

RS flip-flop using NOR gate

Lab 3: VGA Bouncing Ball I

Sequential Circuits. Sequential Logic. Circuits with Feedback. Simplest Circuits with Feedback. Memory with Cross-coupled Gates.

Synchronous Sequential Logic

BHARATHIDASAN ENGINEERING COLLEGE, NATTRAMPALLI DEPARTMENT OF ECE

Transcription:

Outline PE/EE 422/522 Advanced Logic Design L4 Electrical and omputer Engineering University of Alabama in Huntsville What we know ombinational Networks Analysis, Synthesis, Simplification, Hazards, Building Blocks, PALs, PLAs, ROMs Sequential Networks: Basic Building Blocks Design: Mealy Setup and hold times, Max clock frequency What we do not know Design: Moore Equivalent States State Table Reduction Intro to VHDL 9/6/23 UAH-PE/EE 422/522 AM 2 Review: Mealy Sequential Networks General model of Mealy Sequential Network () X inputs are changed to a new value (2) After a delay, the Z outputs and next state appear at the output of M (3) The next state is clocked into the state register and the state changes x Review: 842 BD to Excess3 BD ode onverter Q z t3 X (inputs) t2 t t t3 Z (outputs) t2 t t 9/6/23 UAH-PE/EE 422/522 AM 3 9/6/23 UAH-PE/EE 422/522 AM 4 Sequential Network Timing (cont d) Timing diagram assuming a propagation delay of ns for each flip-flop and gate (State has been replaced with the state of three flip-flops) Setup and Hold Times For a real D-FF D input must be stable for a certain amount of time before the active edge of clock cycle => Setup time D input must be stable for a certain amount of time after the active edge of the clock => Hold time Propagation time: from the time the clock changes to the time the output changes Manufacturers provide minimum tsu, th, and maximum tplh, tphl 9/6/23 UAH-PE/EE 422/522 AM 5 9/6/23 UAH-PE/EE 422/522 AM 6

tc max tp max tck tc max Maximum lock Frequency - Max propagation delay through the combinational network - Max propagation delay from the time the clock changes to the flip-flop output changes { = max(tplh, tphl)} - lock period + t p max tck tsu t ck t c max + t p max + t su Example: t p max = 5 ns, t su t gate = 5 ns t ck f max = 5 ns, = 2 * 5 + 5 + 5 = 5 ns = = 2 MHz 5 ns 9/6/23 UAH-PE/EE 422/522 AM 7 Hold Time Violation Occur if the change in Q fed back through the combinational network and cause D to change too soon after the clock edge Hold time is satisfied if: t p min + t c min What about X? t h Make sure that input changes propagate to the flip-flops inputs such that setup time is satisfied. t x t cx max + t su Make sure that X does not change too soon after the clock. If X changes at time ty after the active edge, hold time is satisfied if ty th tcx min 9/6/23 UAH-PE/EE 422/522 AM 8 Moore Sequential Networks Outputs depend only on present state! General Model of Moore Sequential Machine Outputs depend only on present state! x x 2 X = x x 2... x n Q = Q Q 2... Q k Z = z z 2... z m Q z z 2 Inputs(X) ombinational Network Next State lock State Register ombinational Network State(Q) Outputs(Z) x n z m Z ( t ) = + Q ( t ) = F( Q ( t )) G ( X ( t ), Q ( t )) X = x x 2... x n + Q ( t ) = G ( X ( t ), Q ( t )) Q = Q Q 2... Q k Z ( t ) = F( Q ( t )) Z = z z 2... z m 9/6/23 UAH-PE/EE 422/522 AM 9 9/6/23 UAH-PE/EE 422/522 AM ode onverter: Moore Machine ode onverter: Moore Machine S S S3 Start S S3 Start S S S Do we need state S? How many states does Moore machine have? How many states does Mealy machine have? 9/6/23 UAH-PE/EE 422/522 AM 9/6/23 UAH-PE/EE 422/522 AM 2 2

Moore Machine: State Table Moore Machine Timing Start S X = _ => Z = _ PS S S S3 S X= S S3 S S S NS X= S S - Z S S3 S Note: state S could be eliminated (S == ), if was start state! Moore Mealy 9/6/23 UAH-PE/EE 422/522 AM 3 9/6/23 UAH-PE/EE 422/522 AM 4 State Assignments Moore Machine: Another Example Guidelines to reduce the amount of combinational logic Rule I: (S,, S), (, ), (, ) Rule II: (S, ), (S3, ), (, ), (, ), (, ), (, S) Rule III: (S,,,,, ) (S, S3,,, S) QQ2 S S -. S - Q3Q4 s S S3 PS S S S3 S NS X= X= S S3 S S S - S S Z A onverter for Serial Data Transmission: NRZ-to-Manchester oding schemes for serial data transmission NRZ: nonreturn-to-zero NRZI: nonreturn-to-zero-inverted in input sequence the bit transmitted is the same as the previous bit; in input sequence transmit the complement of the previous bit RZ: return-to-zero for full bit time; for the first half, for the second half Manchester S 9/6/23 UAH-PE/EE 422/522 AM 5 9/6/23 UAH-PE/EE 422/522 AM 6 Moore Network for NRZ-to-Manchester Moore Network for NRZ-to-Manchester 9/6/23 UAH-PE/EE 422/522 AM 7 9/6/23 UAH-PE/EE 422/522 AM 8 3

+ Synchronous Design Use a clock to synchronize the operation of all flip-flops, registers, and counters in the system all changes occur immediately following the active clock edge clock period must be long enough so that all changes flip-flops, registers, counters will have time to stabilize before the next active clock edge Typical design: ontrol section + Data Section Sequential machine to generate control signals to control the operation of data section Data registers Arithmetic Units ounters Buses, Muxes, Data section // s= n*(n+a) // R=n, R2=a // R=s Design flowchart for SMUL operation Design ontrol section S S F B B B + BR A + B An Example LD(BR) DE(BR) 6 ld dec LD(R) RD(R) 6 BR rd ld rd LD(L) L(L) RD(BR) 6 R ld cl LD(A) 6 ld 6 L A 6 F 5.. ALU F 6 A ld LD(R2) R2 rd RD(R2) 6 6 B S S 6 rd RD(A) cl L(A) 9/6/23 UAH-PE/EE 422/522 AM 9 9/6/23 UAH-PE/EE 422/522 AM 2 Timing hart for System with Falling-edge Devices Timing hart for System with Rising-edge Devices 9/6/23 UAH-PE/EE 422/522 AM 2 9/6/23 UAH-PE/EE 422/522 AM 22 Method Principles of Synchronous Design All clock inputs to flip-flops, registers, counters, etc., are driven directly from the system clock or from the clock ANDed with a control signal Result All state changes occur immediately following the active edge of the clock signal Advantage All switching transients, switching noise, etc., occur between the clock pulses and have no effect on system performance Asynchronous Design Disadvantage - More difficult Problems Race conditions: final state depends on the order in which variables change Hazards Special design techniques are needed to cope with races and hazards Advantages = Disadvantages of Synchronous Design In high-speed synchronous design propagation delay in wiring is significant => clock signal must be carefully routed so that it reaches all devices at essentially same time Inputs are not synchronous with the clock need for synchronizers lock cycle is determined by the worst-case delay 9/6/23 UAH-PE/EE 422/522 AM 23 9/6/23 UAH-PE/EE 422/522 AM 24 4

Read To Do Textbook chapters.6,.7,.8,.,.,.2 Equivalent States Two state are equivalent if we cannot tell them apart by observing input and output sequences Definition: Two states are equivalent si==sj only and only if, for every input sequence X, the output sequences Zand Z2 are the same. Not practical => try all sequences (what is the length of sequence?) 9/6/23 UAH-PE/EE 422/522 AM 25 9/6/23 UAH-PE/EE 422/522 AM 26 Equivalent States State Table Reduction State Equivalence Theorem Two state are equivalent Si == Sj if and only if for every single input X, the outputs are the same and the next states are equivalent ) States a and h have the same next states and outputs (when X= and X=) 2) Eliminate h from the table and replace with a 3) States a and b have the same output => they are same iff c==d and f==e. We say c-d and e-f are implied pairs for a-b. To keep track of the implied pairs we make an implication chart. 9/6/23 UAH-PE/EE 422/522 AM 27 9/6/23 UAH-PE/EE 422/522 AM 28 State Table Reduction State Table Reduction 4) Make another pass through the chart. E-g cell contains c-e and b-g; since c-e cell contains x, c!=e => e!=g (put X). 5) Repeat the step 4 until no additional squares are X-ed. {Put X in f-g, a-c, a-d, b-c, b-d squares}. 6) The remaining squares indicate equivalent state pairs => a==b, c==d, e==f. 9/6/23 UAH-PE/EE 422/522 AM 29 9/6/23 UAH-PE/EE 422/522 AM 3 5

Implication Table Method. onstruct a chart that contains a square for each pair of states. 2. ompare each pair in the state table. If the outputs associated with states i and j are different, place an X in square i-j to indicate that i!=j. If outputs are the same, place the implied pairs in square i-j. If outputs and next states are the same (or i-j implies only itself), i==j. 3. Go through the implication table square by square. If square i-j contains the implied pair m-n, and square m-n contains X, then i!=j, and place X in square i-j. 4. If any Xs were added in step 3, repeat step 3 until no more Xs are added. 5. For each square i-j that does not contain an X, i==j. Intro to VHDL Technology trends billion transistor chip running at 2 GHz in 27 Need for Hardware Description Languages Systems become more complex Design at the gate and flip-flop level becomes very tedious and time consuming HDLs allow Design and debugging at a higher level before conversion to the gate and flip-flop level Tools for synthesis do the conversion VHDL, Verilog VHDL VHSI Hardware Description Language 9/6/23 UAH-PE/EE 422/522 AM 3 9/6/23 UAH-PE/EE 422/522 AM 32 Intro to VHDL Developed originally by DARPA for specifying digital systems International IEEE standard (IEEE 76-993) Hardware Description, Simulation, Synthesis Provides a mechanism for digital design and reusable design documentation Support different description levels Structural (specifying interconnections of the gates), Dataflow (specifying logic equations), and Behavioral (specifying behavior) Top-down, Technology Dependent 9/6/23 UAH-PE/EE 422/522 AM 33 VHDL Description of ombinational Networks 9/6/23 UAH-PE/EE 422/522 AM 34 Entity-Architecture Pair VHDL Program Structure Full Adder Example 9/6/23 UAH-PE/EE 422/522 AM 35 9/6/23 UAH-PE/EE 422/522 AM 36 6

4-bit Adder 4-bit Adder (cont d) 9/6/23 UAH-PE/EE 422/522 AM 37 9/6/23 UAH-PE/EE 422/522 AM 38 4-bit Adder - Simulation Modeling Flip-Flops Using VHDL Processes General form of process Whenever one of the signals in the sensitivity list changes, the sequential statements are executed in sequence one time 9/6/23 UAH-PE/EE 422/522 AM 39 9/6/23 UAH-PE/EE 422/522 AM 4 oncurrent Statements vs. Process A, B,, D are integers A=, B=2, =3, D= D changes to 4 at time D Flip-flop Model Bit values are enclosed in single quotes time delta A B D + 2 + 2 3 4 (stat. 3 exe.) + 2 4 4 (stat. 2 exe.) +2 4 4 4 (stat. exe.) +3 4 4 4 4 (no exec.) Simulation Results 9/6/23 UAH-PE/EE 422/522 AM 4 9/6/23 UAH-PE/EE 422/522 AM 42 7

JK Flip-Flop Model JK Flip-Flop Model 9/6/23 UAH-PE/EE 422/522 AM 43 9/6/23 UAH-PE/EE 422/522 AM 44 Using Nested IFsand ELSEIFs VHDL Models for a MUX Sel represents the integer equivalent of a 2-bit binary number with bits A and B If a MUX model is used inside a process, the MUX can be modeled using a ASE statement (cannot use a concurrent statement): 9/6/23 UAH-PE/EE 422/522 AM 45 9/6/23 UAH-PE/EE 422/522 AM 46 MUX Models () MUX Models (2) library IEEE; use IEEE.std_logic_64.all; use IEEE.std_logic_unsigned.all; entity SELETOR is port ( A : in std_logic_vector(5 downto ); SEL : in std_logic_vector( 3 downto ); Y : out std_logic); end SELETOR; architecture RTL of SELETOR is p : process (A, SEL) if (SEL = "") then Y <= A(); elsif (SEL = "") then Y <= A(); elsif (SEL = "") then Y <= A(2); elsif (SEL = "") then Y <= A(3); elsif (SEL = "") then Y <= A(4); elsif (SEL = "") then Y <= A(5); elsif (SEL = "") then Y <= A(6); elsif (SEL = "") then Y <= A(7); elsif (SEL = "") then Y <= A(8); elsif (SEL = "") then Y <= A(9); elsif (SEL = "") then Y <= A(); elsif (SEL = "") then Y <= A(); elsif (SEL = "") then Y <= A(2); elsif (SEL = "") then Y <= A(3); elsif (SEL = "") then Y <= A(4); else Y <= A(5); end if; end process; end RTL; library IEEE; use IEEE.std_logic_64.all; use IEEE.std_logic_unsigned.all; entity SELETOR is port ( A : in std_logic_vector(5 downto ); SEL : in std_logic_vector( 3 downto ); Y : out std_logic); end SELETOR; architecture RTL3 of SELETOR is with SEL select Y <= A() when "", A() when "", A(2) when "", A(3) when "", A(4) when "", A(5) when "", A(6) when "", A(7) when "", A(8) when "", A(9) when "", A() when "", A() when "", A(2) when "", A(3) when "", A(4) when "", A(5) when others; end RTL3; 9/6/23 UAH-PE/EE 422/522 AM 47 9/6/23 UAH-PE/EE 422/522 AM 48 8

MUX Models (3) MUX Models (4) library IEEE; use IEEE.std_logic_64.all; use IEEE.std_logic_unsigned.all; entity SELETOR is port ( A : in std_logic_vector(5 downto ); SEL : in std_logic_vector( 3 downto ); Y : out std_logic); end SELETOR; architecture RTL2 of SELETOR is p : process (A, SEL) case SEL is when "" => Y <= A(); when "" => Y <= A(); when "" => Y <= A(2); when "" => Y <= A(3); when "" => Y <= A(4); when "" => Y <= A(5); when "" => Y <= A(6); when "" => Y <= A(7); when "" => Y <= A(8); when "" => Y <= A(9); when "" => Y <= A(); when "" => Y <= A(); when "" => Y <= A(2); when "" => Y <= A(3); when "" => Y <= A(4); when others => Y <= A(5); end case; end process; end RTL2; library IEEE; use IEEE.std_logic_64.all; use IEEE.std_logic_unsigned.all; entity SELETOR is port ( A : in std_logic_vector(5 downto ); SEL : in std_logic_vector( 3 downto ); Y : out std_logic); end SELETOR; architecture RTL4 of SELETOR is Y <= A( conv_integer(sel)); end RTL4; 9/6/23 UAH-PE/EE 422/522 AM 49 9/6/23 UAH-PE/EE 422/522 AM 5 9