Digital Components Dr. Voicu Groza SITE Hall, Room 5017 562 5800 ext. 2159

Slides:



Advertisements
Similar presentations
Registers and Counters
Advertisements

M. Mateen Yaqoob The University of Lahore Spring 2014.
Registers and Counters
ENGIN112 L27: Counters November 5, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 27 Counters.
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
COE 202: Digital Logic Design Sequential Circuits Part 4 KFUPM Courtesy of Dr. Ahmad Almulhem.
Introduction Flip-flops are synchronous bistable devices. The term synchronous means the output changes state only when the clock input is triggered. That.
A.Abhari CPS2131 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers:
What is shift register? A shift register is a digital memory circuit found in calculators, computers, and data-processing systems. Bits (binary digits)
Mantıksal Tasarım – BBM231 M. Önder Efe
Registers and Counters
Digital Fundamentals Floyd Chapter 9 Tenth Edition
Counters  A counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship.
A presentation on Counters
Electronics Technology
Registers and Counters
Chapter 1_4 Part II Counters
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
EE345: Introduction to Microcontrollers Register and Counters Prof. Ahmad Abu-El-Haija.
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
Registers and Counters
ETE Digital Electronics
Registers and Counters
EE24C Digital Electronics Projects
CSI-2111 Computer Architecture Ipage Sequential circuits, 2nd part v Objectives: To recognize and know to use the principal types of sequential.
Registers & Counters M. Önder Efe
CHAPTER 6 MODULAR SQUENTIAL CIRCUITS & APPLICATIONS
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Rabie A. Ramadan Lecture 3
Digital Logic Design Review Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM 2010.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
Counters By Taweesak Reungpeerakul
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 17 Dr. Shi Dept. of Electrical and Computer Engineering.
7-6 단일 레지스터에서 Microoperation Multiplexer-Based Transfer  Register 가 서로 다른 시간에 둘 이상의 source 에서 data 를 받을 경우 If (K1=1) then (R0 ←R1) else if (K2=1) then.
 Counters are sequential circuits which "count" through a specific state sequence. They can count up, count down, or count through other fixed sequences.
1 Registers & Counters Logic and Digital System Design - CS 303 Erkay Savaş Sabancı University.
ENG241 Digital Design Week #8 Registers and Counters.
Registers and Counters Chapter 6. Digital Circuits 2 Clocked sequential circuits a group of flip-flops and combinational gates connected to form a feedback.
Chap 5. Registers and Counters. Chap Definition of Register and Counter l a clocked sequential circuit o consist of a group of flip-flops & combinational.
Chapter 1_4 Part III more on … Counters Chapter 1_4 Part III more on … Counters.
Registers Page 1. Page 2 What is a Register?  A Register is a collection of flip-flops with some common function or characteristic  Control signals.
M. Mateen Yaqoob The University of Lahore Spring 2014.
Computer Architecture and Organization Unit -1. Digital Logic Circuits – Logic Gates – Boolean Algebra – Map Simplification – Combinational Circuits –
Sequential logic circuits
C HAPTER S IX R EGISTERS AND C OUNTERS 1. A clocked sequential circuit consists of a group of flip-flops and combinational gates connected to form a feedback.
Digital Fundamentals Tenth Edition Floyd Chapter 9.
Counters.
Chap 5. Registers and Counters
DIGITAL COMPONENTS. MULTIPLEXERS A multiplexer is a combinational circuit that receives binary information from one of 2 n input data lines and directs.
Counters and registers Eng.Maha Alqubali. Registers Registers are groups of flip-flops, where each flip- flop is capable of storing one bit of information.
1 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers: parallel and.
Chapter 5 Computer Organization TIT 304/TCS 303. Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
Sequential Logic Design
Registers and Counters
Chap 7. Register Transfers and Datapaths
EKT 221 – Counters.
EKT 221 : Digital 2 COUNTERS.
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
COE 202: Digital Logic Design Sequential Circuits Part 4
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Computer Architecture and Organization: L02: Logic design Review
Switching Theory and Logic Design Chapter 5:
Digital Logic Department of CNET Chapter-6
Digital Logic Department of CNET Chapter-6
14 Digital Systems.
Outline Registers Counters 5/11/2019.
Week 11 Flip flop & Latches.
Digital Electronics and Logic Design
Presentation transcript:

Digital Components Dr. Voicu Groza SITE Hall, Room ext

CEG 2136 Computer Architecture I Outline Decoders, Multiplexers Registers + Common sense design strategies  Register with Parallel Load  Shift Registers  Bidirectional Shift Register with Parallel Load Binary Counters  Binary Counter with Parallel Load

CEG 2136 Computer Architecture I A B C D 0 D 1 D 2 D 3 D 4 D 5 D 6 D 7 (0) (1) (2) (3) (4) (5) (6) (7) D0D0 D2D2 D3D3 D1D1 D4D4 D5D5 D6D6 D7D7 3-to-8 Line Decoder A 2 A 1 A 0 A decoder is a combinational circuit that converts binary information from an n-bit input to a maximum of 2 n -bit output. An n-input m-output decoder is called an n-to-m line decoder, where m ≤ 2 n.

CEG 2136 Computer Architecture I A 2 A 1 A 0 E D 0 D 1 D 2 D 3 D 4 D 5 D 6 D 7 (x) x x x (0) (1) (2) (3) (4) (5) (6) (7) E A 2 A 1 A 0 D0D0 D2D2 D3D3 D1D1 D4D4 D5D5 D6D6 D7D7 3-to-8 Decoder (74 138) The Enable bit, E, enables (when E = 1, i.e. E=0) or disables (when E = 0, i.e. E=1) the functionality of the decoder. When the decoder is disabled (E = 0), all the output pins of the decoder are reset to 0:

CEG 2136 Computer Architecture I 5 Encoders An encoder is a combinational circuit that performs the opposite operation of a decoder. A 2 n -bit input n-bit output encoder generates the binary code corresponding to the input value. InputsOutputs D7D6D5 D4 D3 D2 D1 D0D7D6D5 D4 D3 D2 D1 D0 A2 A1 A0A2 A1 A Truth Table for 8-to-3 Encoder When all inputs are 0’s but D 3 = 1, for instance, the output = A 2 A 1 A 0 = 011, which is the binary code for 3. A 0 = D 1 + D 3 + D 5 + D 7 A 1 = D 2 + D 3 + D 6 + D 7 A 2 = D 4 + D 5 + D 6 + D 7

CEG 2136 Computer Architecture I 6 Random-access memory (RAM) Central Processing Unit (CPU) Input-output Processor (IOP) Input Devices Output Devices Memory stick DVD burner Display

CEG 2136 Computer Architecture I 4-to-1-Line Multiplexer I0I0 I1I1 I3I3 I2I to-4 decoder A 1 A 0 E Z D0D0 D2D2 D3D3 D1D to-4 decoder I0I0 I1I1 I3I3 I2I2 Z I0I0 I1I1 I3I3 I2I2 Z A1A0A1A0 I0I0 I1I1 I3I3 I2I2 Z E A 1 A 0 A multiplexer is a combinational circuit that receives binary information from one of the 2 n input data bits (I 0, I 1, …) and directs it to a single output line (Z). The selection of a particular input data bit is determined by a set of n input selection bits (A 0, A 1, …). A 1 A 0 E Z (x) x x 0 0 (0) I 0 (1) I 1 (2) I 2 (3) I 3

CEG 2136 Computer Architecture I 8 Random-access memory (RAM) Central Processing Unit (CPU) Input-output Processor (IOP) Input Devices Output Devices Memory stick DVD burner Display

CEG 2136 Computer Architecture I Outline Decoders, Multiplexers Registers + Common sense design strategies  Register with Parallel Load  Shift Registers  Bidirectional Shift Register with Parallel Load Binary Counters  Binary Counter with Parallel Load

CEG 2136 Computer Architecture I Registers DnDn QnQn Q n Characteristic Equation: Q n+1 = D n Characteristic Table D Q CLK Q Positive-Edge -Triggered D Flip-Flop The state of the flip-flop’s output Q copies input D when the positive edge of the clock CLK occurs D CLK Q Q R Q0Q0 D Q R Q1Q1 Q1Q1 D Q R Q7Q7 Q7Q7 CL CK Q Q D0D1D7D0D1D7

CEG 2136 Computer Architecture I Common sense design strategies Focus on one bit first. In many cases the rest would have a similar pattern. Try to reason with your own words. Do the computation with “words" first. See if you can define the “rules" governing the logic circuit, and put them in your own words. The above design strategies may save you a significant amount of time and facilitate your task as a designer. However, they may not be trivial in all the cases. Register with Parallel Load CL CK D CLK Q Q R Q1 DB Enable = Ld/St Load/Store MUXMUX Enable Q n+1 Function 0 Q k n Store 1 DB k Load D CLK Q Q R Q1 DB 1 D CLK Q Q R Q1 DB 2 Q0 Q1 Q2 Q3 CL CK DB 1 DB 0 DB 3 Enable = Ld/St Load/Store Register => + <= DB 1 Q0Q0 Q1Q1 Q2Q2 Q3Q3 DB 2 DB 3 DB 0 Next State Logic CC S n+1 = δ(S n,X n ) State Register Flip Flops CL Enable = Ld/St Load/Store

CEG 2136 Computer Architecture I Register with Parallel Load => D k = Enable DB k + Enable Q k ; k={0,1,2,3} The transition function (δ) of the Parallel Register to be designed: Q k (n+1) = Ld DB k + St Q k (n); k={0,1,2,3} =Enable DB k + Enable Q k ; If the Parallel Register is implemented with D-FF's, its excitation equation gives: D(n) = Q k (n+1) Enable Q n+1 Function 0 (St) Q k n Store 1 (Ld) DB k Load Enable = Ld / St When the load input Ld / St = 1, at the positive clock pulse transition time, the data in the four input bits DB 0 is transferred into the register; otherwise when load input Ld / St = 0, the register output bits maintain their values.

CEG 2136 Computer Architecture I Outline Decoders, Multiplexers Registers + Common sense design strategies  Register with Parallel Load  Shift Registers  Bidirectional Shift Register with Parallel Load Binary Counters  Binary Counter with Parallel Load

CEG 2136 Computer Architecture I Shift Registers A shift register is a register that is capable of shifting its binary information in one or both directions. The logical configuration of a shift register consists of a chain of cascaded flip-flops. The output of each flip-flop is connected to the input of the next flip-flop. serial input serial output clock The serial input denotes the external input fed into the shift register. The serial output denotes the data that is not fed into any of the register’s flip-flops. 14 D Q C D Q C D Q C D Q C

CEG 2136 Computer Architecture I 15 tt t t t Clock Q3Q2 Q1Q0 = Serial Output Right Shift Register Serial Input = 0 Initial State: t 0 : Q 3 Q 2 Q 1 Q 0 =1000 t 1 : Q 3 Q 2 Q 1 Q 0 =0100 t 2 : Q 3 Q 2 Q 1 Q 0 =0010 t 3 : Q 3 Q 2 Q 1 Q 0 =0001 D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C Serial Input = 0 t 0 t 1 t 2 t 3

CEG 2136 Computer Architecture I Right Shift Register tt t t t Clock Q3Q2 Q1Q0 = Serial Output D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C D Q C Serial Input = 1 D Q C D Q C D Q C D Q C Serial Input = 1 Initial State: 0000 t 1 : Q 3 Q 2 Q 1 Q 0 =1000 t 2 : Q 3 Q 2 Q 1 Q 0 =1100 t 3 : Q 3 Q 2 Q 1 Q 0 =1110 t 4 : Q 3 Q 2 Q 1 Q 0 =1111 0t1 t2t3 t40t1 t2t3 t4

CEG 2136 Computer Architecture I 17 Serial transfer from register X to register Y

CEG 2136 Computer Architecture I TDI Ck DQDQ f(0,0,0) 0 Ck DQDQ f(0,0,1) 1 Ck DQDQ f(0,1,0) 2 Ck DQDQ f(0,1,1) M 3 Ck DQDQ f(1,0,0) U f(A,B,C) 4 Ck DQDQ f(1,0,1) X 5 Ck DQDQ f(1,1,0) 6 Ck DQDQ f(1,1,1) 7 ABCf(A,B,C) Memory ABC 000f(0,0,0) = M 0 | | | 001f(0,0,1) = M f(0,1,0) = M 2 2 M 011f(0,1,1) = M 3 3 U f(A,B,C) 100f(1,0,0) = M 4 4 X 101f(1,0,1) = M f(1,1,0) = M f(1,1,1) = M 7 7 FPGA Programmable Logic Element (LE) Truth Table Programmable Logic Element „Programmable Inverter” TDO Clk·Prog

CEG 2136 Computer Architecture I FPGA 19 I/O Memory Multiplier LE Memory Multiplier LE Memory Multiplier LE Memory Multiplier LE I/O

CEG 2136 Computer Architecture I Outline Decoders, Multiplexers Registers + Common sense design strategies  Register with Parallel Load  Shift Registers  Bidirectional Shift Register with Parallel Load Binary Counters  Binary Counter with Parallel Load

CEG 2136 Computer Architecture I Multi-function Registers The most general register (Bidirectional Shift Register and Parallel Load) has the following capabilities: 1. A clock pulse input to synchronize all operations. 2. A shift right operation and a serial input line associated to it. 3. A shift left operation and a serial input line associated to it. 4. A parallel load operation and n input lines associated to it. 5. n parallel output lines 6. A “no change” control state to leave the n parallel output lines unchanged for the next clock pulse. 21 Mode Control S1S1 S0S0 Register operation 00No change 01Shift right (msb->lsb) 10Shift left (lsb->msb) 11Parallel load

CEG 2136 Computer Architecture I Top-down design S 1 S 0 Function (f 0 ) 0 0 No Change=Store (f 1 ) 0 1 Shift Right =down: msb->lsb & D 3 =Serial In (f 2 ) 1 0 Shift Left = up: msb->lsb & D o = Serial In (f 3 ) 1 1 Parallel Load DB Bidirectional Shift Register and Parallel Load with D Flip Flops I1I1 A 3 (msb) A2A2 A1A1 A 0 (lsb) S1S1 S0S0 I2I2 I3I3 I0I0 Serial In Register

CEG 2136 Computer Architecture I Top-down design S 1 S 0 A k n+1 Function (f 0 ) 0 0 A k n No Change=Store (k={0,1,2,3}) (f 1 ) 0 1 A n k+1 Shift Right (k={0,1,2}: msb->lsb & D 3 =Serial In) (f 2 ) 1 0 A n k-1 Shift Left (k={1,2,3}: lsb => msb & D 0 =Serial In) (f 3 ) 1 1 I k Parallel Load (k={0,1,2,3}) Bidirectional Shift Register and Parallel Load with D Flip Flops S 1 S 0 D k = A k n+1 (f 0 ) 0 0 D k = A k ; k={0,1,2,3} (f 1 ) 0 1 D k = A k+1 ; k={0,1,2} D 3 =Serial In) (f 2 ) 1 0 D k = A k-1 ; k={1,2,3} D 0 =Serial In) (f 3 ) 1 1 D k = I k ; k={0,1,2,3} I1I1 A 3 (msb) A2A2 A1A1 A 0 (lsb) S1S1 S0S0 I2I2 I3I3 I0I0 Serial In Register I1I1 Q3Q3 Q2Q2 Q1Q1 Q0Q0 S1S1 S0S0 I2I2 I3I3 I0I0 Next State Logic CC S n+1 = δ(S n,X n ) State Register Flip Flops Serial In

CEG 2136 Computer Architecture I 24 Four ‐ bit universal shift register

CEG 2136 Computer Architecture I Outline Decoders, Multiplexers Registers + Common sense design strategies  Register with Parallel Load  Shift Registers  Bidirectional Shift Register with Parallel Load Binary Counters  Binary Counter with Parallel Load

CEG 2136 Computer Architecture I = Register that goes through a prescribed series of states There are two main types of counters: 1.Asynchronous counters: also known as Ripple counters - Flip flop’s output’s serve as clock for triggering connected flip flops 2.Synchronous counters – All flip flops are triggered by a clock signal at the same time Counters 26 Q0 Q1 Q2 clk

CEG 2136 Computer Architecture I Modulo 16 Synchronous Counter using D Flip-Flops Q =  Qi. 2 i i = Q3Q1 Q0 Q2 CK 4-Bit BINARY COUNTER CL 1 0 CK Q CL 1 0 The number of unique states that a counter may have before the sequence repeats itself is the modulus of the counter The number of unique states that a counter may go through before the count sequence repeats itself is the modulus (or MOD) of the counter.

CEG 2136 Computer Architecture I DECIMAL Present STATE OF The next state = STATE THE COUNTER FLIP FLOP INPUTS Q Q3 Q2 Q1 Q0 D3 D2 D1 D Using D flip-flops has the distinct advantage of a straightforward definition of the flip-flop inputs: the current state of these inputs is the next state of the counter. The logic equations for all four flip-flop inputs D3, D2, D1, and D0 are derived from this truth table as functions of the current states of the counter’s flip-flops: Q3, Q2, Q1, and Q0. Karnaugh maps can be used to simplify these equations. Q1 Q0 Q3 Q D2 Q1 Q0 Q3 Q D3 Q1 Q0 Q3 Q D1 Q1 Q0 Q3 Q D0 Modulo 16 Synchronous Counter Q1 Q0 Q3 Q

CEG 2136 Computer Architecture I Q1 Q0 Q3 Q D Q1 Q0 Q3 Q D1 1 1 D3 = Q3. Q2 + Q3. Q1 + Q3. Q0 + Q3. Q2. Q1. Q0 D2 = Q2. Q0 + Q2. Q1 + Q2. Q1. Q0 D1 = Q1. Q0 + Q1. Q0 D0 = Q0 Q1 Q0 Q3 Q D0 Q1 Q0 Q3 Q D Modulo 16 Synchronous Counter Excitation Equations D n = Q n+1

CEG 2136 Computer Architecture I D3 = Q3. Q2 + Q3. Q1 + Q3. Q0 + Q3. Q2. Q1. Q0 D2 = Q2. Q0 + Q2. Q1 + Q2. Q1. Q0 D1 = Q1. Q0 + Q1. Q0 D0 = Q0 D CLK Q Q R Q0 D CLK Q Q R Q1 D CLK Q Q R Q2 D CLK Q Q R Q3 CL CK Modulo 16 Synchronous Counter Implementation D n = Q n+1

CEG 2136 Computer Architecture I Binary Counter Modulo 16 Synchronous Counter using JK Flip-Flops A =  A i. 2 i i = A3A3 A1A1 A0A0 A2A2 CK 4-Bit BINARY COUNTER CL 1 0 CK A CL 1 0

CEG 2136 Computer Architecture I Present state S n Next state S n +1 A3A3 A2A2 A1A1 A0A0 A3+A3+ A2+A2+ A1+A1+ A0+A A We can notice from the State Table that: A 0 toggles its value at each clock pulse => J 0 = 1 ; K 0 = 1. A 1 toggles its value at time T only if at time (T - 1) A 0 is 1. A 2 toggles its value at time T only if at time (T - 1) A 1 = 1 and A 0 = 1 Present StateNext StateFlip-Flop Inputs A 2 (T − 1) A 1 (T − 1) A 0 (T − 1) A 1 (T ) J1K1J1K1 x x0 x x1 A 1 (t − 1) (A 1 (t − 1))’01 J 1 = K 1 = A 0 (T - 1) Present State Next StateFlip-Flop Inputs A 2 (T − 1)A 1 (T − 1)A 0 (T − 1)A 2 (T )J 2 K 2 x00A 2 (t − 1)0 x01A 2 (t − 1)0 x10A 2 (t − 1)0 x11(A 2 (t − 1))'1 J 2 = K 2 = A 1 (T - 1) A 0 (T - 1) “Common sense” design approach

CEG 2136 Computer Architecture I Present state S n Next state S n +1 A 3 inputA 2 inputA 1 inputA 0 input A3A3 A2A2 A1A1 A0A0 A3+A3+ A2+A2+ A1+A1+ A0+A0+ J3J3 K3K3 J2J2 K2K2 J1J1 K1K1 J0J0 K0K x0x0x1x x0x1xx x0xx01x x1xx1x xx00x1x xx01xx xx0x01x xx1x1x x00x0x1x x00x1xx x00xx01x x01xx1x x0x00x1x x0x01xx x0x0x01x x1x1x1x1 A Use the “Common sense” design approach -> see next slide

CEG 2136 Computer Architecture I Outline Decoders, Multiplexers Registers + Common sense design strategies  Register with Parallel Load  Shift Registers  Bidirectional Shift Register with Parallel Load Binary Counters  Binary Counter with Parallel Load

CEG 2136 Computer Architecture I Top-down design D0D0 CLK Q Q R Q 0 (lsb) Q1Q1 Q2Q2 CL CK MUXMUX S1S0S1S0 D1D1 CLK Q Q R MUXMUX D2D2 Q Q R MUXMUX f21f f20f20 f23f23 f22f22 f01f01 f00f00 f03f03 f02f02 f11f11 f10f10 f13f13 f12f12 Q 3 (msb) D3D3 CLK Q Q R MUXMUX f31f f30f30 f33f33 f32f32 S 1 S 0 Q k n+1 Function (f 0 ) 0 0 Q k n Store (f 1 ) 0 1 N k Count up (f 2 ) 1 0 DB k Load (f 3 ) Clear Multifunction Register with D-Flip Flops k = {0,1,2,3} DB 1 Q 3 (msb) Q2Q2 Q1Q1 Q 0 (lsb) S1S1 S0S0 DB 2 DB 3 DB 0 Multifunction Register DB 1 Q3Q3 Q2Q2 Q1Q1 Q0Q0 S1S1 S0S0 DB 2 DB 3 DB 0 Next State Logic CC S n+1 = δ(S n,X n ) State Register Flip Flops Multifunction Register implemented as a Sequential Circuit

CEG 2136 Computer Architecture I DB 2 D CLK Q Q R Q0 D CLK Q Q R Q1 D CLK Q Q R Q2 D CLK Q Q R Q3 CL CK DB 1 DB 0 DB 3 MUXMUX S 1 S 0 2 MUXMUX MUXMUX MUXMUX Multifunction Register S 1 S 0 D k = Q k n+1 Function (f 0 ) 0 0 Q k n Store (f 1 ) 0 1 N k Count up (f 2 ) 1 0 DB k Load (f 3 ) Clear f21f21 f01f01 f11f11 f31f31 Use the “Common sense” design approach, (where obvious) or: D- FF’s excitation equation: D n = Q n+1 (1) Store (f 0 ): Q n+1 = Q n (2) to be implemented with D-FF From (1), (2) => D n = Q n+1 = Q n i.e., D k = Q k, k ={0,1,2,3} Clear (f 3 ): Q n+1 = 0 (3) with D-FF From (1), (3) => D n = 0 i.e., D k = 0, k ={0,1,2,3} Load (f 2 ): Q n+1 = DB n (4) with D-FF From (1), (4) => D n = DB n, i.e., D k = DB k, k ={0,1,2,3}

CEG 2136 Computer Architecture I Multifunction Register - Count up (f 2 ) D CLK Q Q R Q0Q0 D Q Q R Q1Q1 Q1Q1 D Q Q R Q2Q2 Q2Q2 D Q Q R Q3Q3 Q3Q3 CK Q3Q3 Q2Q2 Q1Q1 Q0Q0 Q3+Q3+ Q2+Q2+ Q1+Q1+ Q0+Q0+ D3D3 D2D2 D1D1 D0D CLR Q0’Q0’

CEG 2136 Computer Architecture I DB 2 D CLK Q Q R Q0 D CLK Q Q R Q1 D CLK Q Q R Q2 D CLK Q Q R Q3 CL CK DB 1 DB 0 DB 3 MUXMUX A 1 A 0 2 MUXMUX MUXMUX MUXMUX Multifunction Register Implementation A 1 A 0 D k = Q k n+1 Function (f 0 ) 0 0 Q k n Store (f 1 ) 0 1 N k Count up (f 2 ) 1 0 DB k Load (f 3 ) Clear

CEG 2136 Computer Architecture I 4-bit Binary Counter with Parallel Load & Synchronous Clear with JK FF A 1 A 0 Q k n+1 Function (f 0 ) 0 0 Q k n Store = No change (f 1 ) 0 1 N k Increment (Count up) (f 2 ) 1 0 DB k Load (f 3 ) Clear k = {0,1,2,3} S 1 S 0 E D0D0 D2D2 D3D3 D1D to-4 decoder DI 0 DI 1 DI 3 DI 2 Z MUX

CEG 2136 Computer Architecture I I State table of Sequential Circuit to be Designed Design D-Latch using JK FF JK Excitation Table DQnQn Q n+1 JK 0000x 010 x x 111x0 QtQt Q t+Δt JtJt KtKt 000x 011x 10x1 11x0 QJ K D δ D QJ K D J D Q n x 3 1 x K D D Q n x J = D K = D II Step 3 Step 4: SR input equations Step 5 Excitation table for Sequential Circuit to be Designed 4 Step 1 : Initial State table D Q n Q n Given: D-Latch Characteristic Table 1 START HERE 0 0 Clock

CEG 2136 Computer Architecture I BUS INPR LD TR INR TR CLR TR OUTR LD OUTR 16 TR Memory D in Addr D out Write Read AR LD AR INR AR CLR AR PC LD PC INR PC CLR PC IR LD IR Data path S 2 -S 0 Sel BASICCOMPUTERBASICCOMPUTER DR LD DR INR DR CLR DR AC LD AC INR AC CLR AC ALU AND,ADD DR,INPR, COM,SHR Control Unit CPUCPU Most registers of the Basic Computer are implemented on the basis of the logic diagram of the two multifunctional registers designed above. Memory CPU (Registers, ALU & CU) Data Bus Address Bus Control Bus

CEG 2136 Computer Architecture I 42 2-to-4 decoder S 3 S 2 S 1 S 0 State Encoding mod 4 counter Full Encoding: BINARY COUNTER 1-hot Encoding: RING COUNTER 1 S 3 S 2 S 1 S 0 D Q C D Q C D Q C D Q C T Q C T Q C Clock