Chapter 7 Registers and Register Transfers

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

Registers and Counters

Chapter 3 Unit Combinational

Registers and Counters

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

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

Sequencing and Control

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

ELEN Electronique numérique

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

Chapter 5 Sequential Circuits

Digital Fundamentals: A Systems Approach

ECE 25 Introduction to Digital Design. Chapter 5 Sequential Circuits ( ) Part 1 Storage Elements and Sequential Circuit Analysis

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

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

UNIVERSITI TEKNOLOGI MALAYSIA

Microprocessor Design

MC9211 Computer Organization

Counters

Modeling Digital Systems with Verilog

ELE2120 Digital Circuits and Systems. Tutorial Note 8

Synchronous sequential circuits

Logic Design II (17.342) Spring Lecture Outline

Registers, Register Transfers and Counters Dr. Fethullah Karabiber

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

Experiment 8 Introduction to Latches and Flip-Flops and registers

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

0 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 1 1 Stop bits. 11-bit Serial Data format


Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

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

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

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

CHAPTER 4: Logic Circuits

MODU LE DAY. Class-A, B, AB and C amplifiers - basic concepts, power, efficiency Basic concepts of Feedback and Oscillation. Day 1

Chapter 5 Sequential Circuits

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

CprE 281: Digital Logic

Counter dan Register

COE328 Course Outline. Fall 2007

Lecture 12. Amirali Baniasadi

Combinational vs Sequential

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

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

Operating Manual Ver.1.1

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

Vignana Bharathi Institute of Technology UNIT 4 DLD

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

Agenda. EE 260: Introduction to Digital Design Counters and Registers. Asynchronous (Ripple) Counters. Asynchronous (Ripple) Counters

Chapter. Synchronous Sequential Circuits

Contents Circuits... 1

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

Registers and Counters

Asynchronous (Ripple) Counters

DIGITAL FUNDAMENTALS

Flip-Flops and Registers

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

RS flip-flop using NOR gate

CHAPTER1: Digital Logic Circuits

CHAPTER 4: Logic Circuits

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Logic Design. Flip Flops, Registers and Counters

ELCT201: DIGITAL LOGIC DESIGN

Semester III. Subject Name: Digital Electronics. Subject Code: 09CT0301. Diploma Branches in which this subject is offered: Computer Engineering

MODULE 3. Combinational & Sequential logic

Midterm Exam 15 points total. March 28, 2011

ECE 263 Digital Systems, Fall 2015

Computer Organization & Architecture Lecture #5

Synchronous Sequential Logic

Flip-Flops and Sequential Circuit Design

Universal Asynchronous Receiver- Transmitter (UART)

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

TRAINING KITS ON DIGITAL ELECTRONIC EXPERIMENTS. Verify Truth table for TTL IC s AND, NOT, & NAND GATES

ELCT201: DIGITAL LOGIC DESIGN

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

ASYNCHRONOUS COUNTER CIRCUITS

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

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

Logic Design Viva Question Bank Compiled By Channveer Patil

CprE 281: Digital Logic

Collections of flip-flops with similar controls and logic

Computer Systems Architecture

Fall 2000 Chapter 5 Part 1

Sequential Logic. Analysis and Synthesis. Joseph Cavahagh Santa Clara University. r & Francis. TaylonSi Francis Group. , Boca.Raton London New York \

Laboratory 4. Figure 1: Serdes Transceiver

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE

Registers and Counters

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid

Introduction. Serial In - Serial Out Shift Registers (SISO)

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

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

RAO PAHALD SINGH GROUP OF INSTITUTIONS BALANA(MOHINDER GARH)123029

Other Flip-Flops. Lecture 27 1

CprE 281: Digital Logic

Transcription:

Logic and Computer Design Fundamentals Chapter 7 Registers and Register Transfers Part 3 Control of Register Transfers Charles Kime 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode)

Overview Part 1 Registers, Microoperations and Implementations Part 2 Counters, Register Cells, Buses, & Serial Operations Part 3 Control of Register Transfers Introduction to register transfer systems Register transfer system design procedure A design example Microprogrammed control Chapter 7 - Part 3 2

Introduction to Register Transfer Systems Datapath and Control Unit Control signals Control inputs Control unit Status signals Datapath Data outputs Control outputs Data inputs Set of registers, mostly in Datapath with some in Control Unit Register transfers performed on registers Control that supervises the sequencing of the register transfers Chapter 7 - Part 3 3

Programmable and Non-Programmable Systems Programmable System a portion of the input consists of a sequence of instructions called a program, typically stored in a memory and addressed by a program counter (PC). The Control Unit is responsible for fetching and executing these instructions. Non-programmable System the control unit does not deal with fetching and executing instructions, but contains all of the information for sequencing register transfers based on inputs and on status bits from the datapath. Only non-programmable designs are considered here. Chapter 7 - Part 3 4

Register Transfer System Design Procedure Write a detailed system specification Determine all data, control and status input signals, all data, control and status output signals, and registers of the datapath and control unit. Find a state machine diagram for the system including register transfers for the datapath and control unit as outputs. Determine all internal control and status signals. Use these signals to separate output conditions and actions, including register transfers, from the state machine diagram flow and represent them in tabular form. Draw a block diagram of the datapath including all control and status inputs and outputs. Draw a block diagram of the control if it includes register transfer hardware. Design any specialized register transfer logic as needed for the datapath and the control. Design the control unit logic. Verify the correct operation of the combined datapath and control unit. If verification fails, debug the system and verify the changed system. Chapter 7 - Part 3 5

Example 1 DASHWATCH Chapter 5 - Part 3 6

Example 1: DASHWATCH START STOP CSS RESET Exterior View Chapter 7 - Part 3 7

Example 1 DASHWATCH Specifications Very Inexpensive Stop Watch for dash runners Times intervals to at most 99.99 seconds Stopwatch action plus storage of best performance time per session (session ended by turning off power or pushing RESET) Inputs: START, STOP, CSS (compare and store shortest), RESET Registers: 4-digit BCD Counter (TM) and 16-bit Parallel Load Register (SD) Output: 4 digit BCD LCD with decimal point Chapter 7 - Part 3 8

Example 1: DASHWATCH Inputs, Outputs, and Registers TABLE 7-15 I nputs, Outputs, and Registersof the D ashwatch Symbol Function Type STA RT STOP CSS RESET B 1 B 0 DP B - 1 B -2 B TM SP SD Initializetimer to 0 and start timer Stop timer and display timer Compare, store and display shortest dash time Set shortest value to 10011001 Digit 1 data vector a, b, c, d, e, f, g to display Digit 0 data vector a, b, c, d, e, f, g to display D ecimal point to display (= 1) Digit 1 data vector a, b, c, d, e, f, g to display Digit 2 data vector a, b, c, d, e, f, g to display The 29-bit display input vector (B 1, B 0, DP, B 1, B 2 ) 4-D igit BCD counter Parallel load register Control input Control input Control input Control input D ata output vector D ata output vector Data output D ata output vector D ata output vector D ata output vector 16-Bit register 16-Bit register Chapter 7 - Part 3 9

Example 1: DASHWATCH SMD with Register Transfer Outputs RESET S1 SD (9999) BCD STA RT S2 TM (0000) BCD STA RT STOP S3 TM (TM + 1 1) BCD, DIS 5= TM CSS?STA. RT STOP CSS?STA. RT S4 CSS DIS = TM S5 TM > SD TM, < SD STA RT S7 S6 SD TM STA RT DIS = 5 SD Chapter 7 - Part 3 10

Example 1: DASHWATCH SMD Design Specify only Moore outputs (no particular reason) S1: Reset state - in this state, initialize SD to 1001100110011001 (99.99), the maximum possible dash time. S2: Because of Moore output spec, S1 cannot be used for this state since SD is not to be initialized again to 99.99 after having passed through states S4 or S7. TM is initialized to (0000) BCD for next dash. S3: State during dash. Entered with START and exited with STOP. While in state, 1 (0.01 seconds) is added to TM for each clock pulse. (Clock frequency is 100 Hz), and DIS shows TM value. S4: Decision state whether to Compare, Store, and display Shortest dash time, or to continue to display TM. Also START begins new dash. S5: State for comparison of TM to SD. S6: State for loading TM into SD if TM is smaller. S7: State for START to begin new dash and display of SD as shortest dash time. Chapter 7 - Part 3 11

Example 1: DASHWATCH Output Control/Status Table TABLE 7-16 D atapath Output A ctions and Status Generation with Control and Status Signals Action or Status Control or Status Signals Meaning for Values 1 and 0 TM (0000) BCD TM (TM + 1) BCD SD (9999) BCD SD TM DIS = TM DIS = SD TM < SD TM SD RSTM ENTM UPDATE LSR UPDATE LSR DS A LTB 1: Reset TM to 0 (synchronous reset) 0: No reset of TM 1: BCD count up TM by 1, 0: hold TM value 0: Select 1001100110011001 for loading SD 1: Enable load SD, 0: disable load SD 1: Select TM for loading SD Same as above 0: Select TM for DIS 1: Select SD for DIS 1: TM less than SD 0: TM greater than or equal to SD Chapter 7 - Part 3 12

Example 1: DASHWATCH Determination of Internal Control/Status Signals TM Timer Reset to 0000: RSTM Enable to Count Up: ENTM SD Shortest Dash Load SD: LSR = 1; Select input 9999: UPDATE = 0 Select input TM: UPDATE = 1 DIS Display (B 1, B 0, DP, B 1, B 2 ) Select input TM: DS = 0 Select input SD: DS = 1 Compare TM and SD (Status) TM < SD: ALTB = 1 TM SD: ALTB = 0 RSTM ENTM LSR UPDATE 1 DS 1 TM SD MUX 0 TM 9999 MUX 0 SD TM Chapter 7 - Part 3 13

Example 1:DASHWATCH Datapath Chapter 7 - Part 3 14

Example 1: DASHWATCH Datapath Development TM: 4-digit BCD Counter with Synchronous Reset Based on previous BCD adder digit design synchronous reset SRST added SRST = RSTM C0 (Incoming carry) = ENTM A < B Comparator Compares TM to SD Designed as left-to-right iterative cell array with output C0 SD: Standard 16-bit parallel load register LOAD = LSR Contracted standard 2-way, 16-bit multiplexer used to select between 9999 BCD and TM as parallel load input D S = UPDATE Chapter 7 - Part 3 15

Example 1: DASHWATCH Datapath Development Display Logic 2-way 16-bit multiplexer Selects between TM and SD S = DS 4-digit BCD-to-7 Segment Converter Uses previous design 4-digit 7-Segment Display with Decimal Point 2-digit fractional part Decimal Point control = DP DP = 1 Chapter 7 - Part 3 16

Example 1: DASHWATCH SMD with Control Signal Outputs Replacing Register Transfers Defaults: All Outputs = 0 RESET S1 LSR LSR=1 SD STA RT S2 RSTM UPDATE=0 STA RT STOP S3 ENTM 1 MUX 0 TM 9999 CSS?STA. RT CSS?STA. RT S4 STOP S5 CSS LSR=1 SD A LTB STA RT S7 STA RT (b) A LTB DS S6 UPDATE=1 UPDA TE,L SR 1 MUX TM 9999 Chapter 7 - Part 3 17 0

Example 1: DASHWATCH FF Input Equations One-Hot State Assignment 7 bits State S1 entered only by using asynchronous RESET D S1 S1( t 1) 0 D S2 = S2( t 1) = S1 + S2 STA RT S4 CSS STA RT S7 STA RT D S3 S3( t 1) S2 STA RT S3 STOP D S4 S4( t 1) S3 STOP S4 CSS STA RT D S5 S5( t 1) S4 CSS D S6 S5 A L TB D S7 S7( t 1) S5 A L TB + S6 S7 STA RT Chapter 7 - Part 3 18

Example 1: DASHWATCH Output Equations L SR = S1 + S6 RSTM = S2 ENTM = S3 UPDATE = S6 DS = S7 Chapter 7 - Part 3 19

Example 2 Handheld Game: PIG Chapter 5 - Part 3 20

Example 2: PIG Player 1 Player 2 ROLL HOLD NEW GAME RESET Exterior View Chapter 7 - Part 3 21

Example 2: PIG Registers DIE 3-Bit 1-to-6 Counter SUR 7-Bit Parallel Load Register FP FF FP=0 in the first game. i.e. Player 1 starts the first game. Then FP=1 in the second game. i.e. Player 2 starts the second game. Then FP=0 in the third game, and so on. TR1 TR2 CP 7-Bit Parallel Load Register 7-Bit Parallel Load Register FF To specify the current player turn within a game Datapath Registers Control Registers Chapter 7 - Part 3 22

Example 2 PIG Specifications PIG is a dice game which is played with a single die that has 1 to 6 dots on its six faces. During each turn, the player rolls the die one or more times until either: 1 is rolled The player chooses to HOLD. For each roll, the value rolled, except for a 1, is added to a subtotal for the current turn. If a 1 is rolled, the subtotal become 0, and the player s turn is ended. At the end of each turn, the subtotal is added to the player s overall total, and the play passes to the other player. The first player to reach or exceed 100 wins. Chapter 7 - Part 3 23

Example 2 PIG Specifications Inputs: ROLL, HOLD, NEW_GAME, RESET Outputs: 7-bit LED die display (DDIS) 7-Segment pair to display the subtotal for the current turn (SUB) 7-Segment pair to display the overall total for the player 1 (TP1) 7-Segment pair to display the overall total for the player 2 (TP2) Player 1 LED ON/ OFF (P1) Player 2 LED ON/ OFF (P2) Registers: Datapath Registers: 3-bit 1-to-6 Counter (DIE) 7-bit Parallel Load Register (SUR) 7-bit Parallel Load Register (TR1) 7-bit Parallel Load Register (TR2) Control Registers: Flip-Flop (FP) Flip-Flop (CP) Chapter 7 - Part 3 24

Example 2: PIG Inputs, Outputs, and Registers Symbol Name / Function Type ROLL 1: Starts die rolling 0: Stops die rolling Control input HOLD 1: Ends player turn 0: Continues player turn Control input NEW_GAME 1: Stats new game 0: Continues current game Control input RESET 1: Reset game to INIT state 0: No action Control input DDIS 7-bit LED die display array Data output vector SUB 14-bit 7-segment pair (a, b, c, d, e, f, g) to Turn Total display Data output vector TP1 14-bit 7-segment pair (a, b, c, d, e, f, g) to Player 1 display Data output vector TP2 14-bit 7-segment pair (a, b, c, d, e, f, g) to Player 2 display Data output vector P1 1: Player 1 LED on 0: Player 1 LED off Data output P2 1: Player 2 LED on 0: Player 2 LED off Data output DIE Die value- Specialized counter to count 1, 2, 3, 4, 5, 6, 1, 2, 3,... 3- bit data register SUR Subtotal for active player: parallel load register 7- bit data register TR1 Overall total for player 1: parallel load register 7- bit data register TR2 Overall total for player 2: parallel load register 7- bit data register FP First player flip-flop 0: Player 1, 1: Player 2 1-bit control register CP Current player flip-flop 0: Player 1, 1: Player 2 1-bit control register Chapter 7 - Part 3 25

Example 2: PIG SMD with Register Transfer Outputs Defaults: DIE 000, FP = 0 RESET P1 = CP, INIT TR1 0, TR2 0, CP FP P2 = CP ROLL BEGIN SUR 0 ROLL ROLL ROL If (DIE = 110) DIE 001 else DIE (DIE +1) CP CP DIE = 1 ROLL ONE SUR SUR + DIE ROLL. HOLD CP CP CP. (TR1 < 11000100) + CP. (TR2 < 11000100) DIE 1 ROLL ROH ROLL. HOLD TEST CP / (TR1 TR1 +SUR), CP / (TR2 TR2 +SUR) FP FP CP. (TR1 11000100) + CP. (TR2 11000100) NEW_GAME NEW_GAME WIN CP / P1 = BLINK, CP / P2 = BLINK Chapter 5 - Part 3 26

Example 2: PIG Output Control/Status Table TR1 0 TR1 TR1 + SUR TR2 0 TR2 TR2 + SUR SUR 0 SUR SUR+ DIE Action or Status DIE 000 if (DIE = 110) DIE 001 else DIE (DIE +1) Control or Status Signals RST1 LDT1 RST2 LDT2 RSSU LDSU RESET ENDI Meaning for values 1 and 0 1: Reset TR1 (Synchronous reset), 0: No action 1: Add SUR to TR1, 0: No action 1: Reset TR2 (Synchronous reset), 0: No action 1: Add SUR to TR2, 0: No action 1: Reset SUR (Synchronous reset), 0: No action 1: Add DIE to SUR, 0: No action 1: Reset DIE to 000 (Asynchronous reset) 1: Enable DIE to increment, 0: Hold DIE value P1 = BLINK BP1 1: Connect P1 to BLINK, 0: Connect P1 to 1 P2 = BLINK BP2 1: Connect P2 to BLINK, 0: Connect P2 to 1 CP FP CP CP FP 0 FP FP DIE = 1 DIE 1 TR1 11000100 TR2 11000100 CPFI LDCP CPFI LDCP RESET LDFP DIE1 1: DIE equal to 1 0: DIE not equal to 1 CP WN CP WN 1: Select FP for CP 1: Load CP, 0: No action 0: Select CP for CP 1: Load CP, 0: No action Asynchronous reset 1: Invert FP, 0: Hold FP 0: Select TR1 for 11000100 1: The Selected TR i 11000100 0: The Selected TR i < 11000100 1: Select TR2 for 11000100 1: The Selected TR i 11000100 0: The Selected TR i < 11000100 Chapter 7 - Part 3 27

Example 2: PIG Datapath and Control Registers SUR TR1 RST1 LDT1 DIE SUR RSSU LDSU LDCP CPFI 1 CP MUX 0 Adder Adder FP CP/ SUR TR2 RST2 LDT2 RESET ENDI DIE CP TR1 TR2 0 1 MUX Adder Comparator with 100 WN Chapter 7 - Part 3 28

Example 2: PIG SMD with Control Signal Outputs Replacing Register Transfers RESET INIT RST1, RST2, CPFI, LDCP ROLL BEGIN RSSU LDCP ROLL DIE1 ROLL ENDI ROL ROLL ONE LDSU ROLL. HOLD LDCP WN LDFP NEW_GAME NEW_GAME DIE1 ROH ROLL CP / LDT1, ROLL. HOLD CP / LDT2 TEST WN WIN CP / BP1, CP / BP2 Chapter 5 - Part 3 29

Example 2: PIG Datapath and Control Registers LDSU RSSU ENDI DIE 3-Bit 1-to-6 EN Counter 0000 7-Bit Ripple Carry Adder SUR D Parallel Load Reg. with Sync Reset EN R R RESET Binary-to-LED Die Dots Decoder Die Dot Display D = 1 Comparator DIE1 Binary-to-BCD Code Converter 2-Digit BCD-to-7 Segment Converter 2-Digit LCD Display LDT1 RST1 7-Bit Ripple Carry Adder TR1 D Parallel Load Reg. with Sync Reset EN R Binary-to-BCD Code Converter 2-Digit BCD-to-7 Segment Converter 2-Digit LCD Display LDT2 RST2 7-Bit Ripple Carry Adder TR2 D Parallel Load Reg. with Sync Reset EN R Binary-to-BCD Code Converter 2-Digit BCD-to-7 Segment Converter 2-Digit LCD Display CP S D0 D1 7-Bit 2-to-1MUX D D 11000100 WN Chapter 7 - Part 3 30

Microprogrammed Control Microprogrammed Control a control unit with binary control values stored as words in memory. Microinstructions words in the control memory. Microprogram a sequence of microinstructions. Control Memory RAM or ROM memory holding the microinstructions. Writeable Control Memory RAM Memory into which microinstructions may be written Chapter 7 - Part 3 31

Microprogrammed Control (continued) Chapter 7 - Part 3 32

Terms of Use All (or portions) of this material 2008 by Pearson Education, Inc. Permission is given to incorporate this material or adaptations thereof into classroom presentations and handouts to instructors in courses adopting the latest edition of Logic and Computer Design Fundamentals as the course textbook. These materials or adaptations thereof are not to be sold or otherwise offered for consideration. This Terms of Use slide or page is to be included within the original materials or any adaptations thereof. Chapter 7 - Part 3 33