Registers Today we’ll see some common sequential devices: counters and registers. They’re good examples of sequential analysis and design. They are also.

Slides:



Advertisements
Similar presentations
IT253: Computer Organization
Advertisements

The CPU The Central Presentation Unit What is the CPU?
Chapter 7 Henry Hexmoor Registers and RTL
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
Registers and Counters. Register Register is built with gates, but has memory. The only type of flip-flop required in this class – the D flip-flop – Has.
Latches/Flip-Flops. Overview We focuses on sequential circuits – We add memory to the hardware that we’ve already seen Our schedule will be very similar.
October 16, 2002Flip-flops1 Summary : Latches A sequential circuit has memory. It may respond differently to the same inputs, depending on its current.
Flip-Flops Last time, we saw how latches can be used as memory in a circuit. Latches introduce new problems: We need to know when to enable a latch. We.
1 Review: Counters and Registers CS 231 Review October 26, 2007 By Joshua Smith Please note the NOTES in the PPT file for help with the examples.
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Henry Hexmoor1 Chapter 7 Henry Hexmoor Registers and RTL.
Logic and Computer Design Fundamentals Registers and Counters
Introduction Flip-flops are synchronous bistable devices. The term synchronous means the output changes state only when the clock input is triggered. That.
REGISTER A Register is a group of binary storage cells suitable for holding binary information. A group of flip-flops constitutes a register, since each.
Sequential circuit design
Counters and Registers
Registers CPE 49 RMUTI KOTAT.
Rabie A. Ramadan Lecture 3
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
ENG241 Digital Design Week #8 Registers and Counters.
REGISTER A register is a group of flip-flops. Each flip- flop is capable of storing one bit of informa­ tion. An n-bit register consists of a group of.
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.
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
Lecture Overview Shift Register Buffering Direct Memory Access.
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
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.
IC 3 BASICS, Internet and Computing Core Certification Computing Fundamentals Lesson 2 How Does a Computer Process Data?
Sequential Logic Design
EET 1131 Unit 12 Shift Registers
Class Exercise 1B.
Computer Organization and Architecture + Networks
REGISTER TRANSFER LANGUAGE (RTL)
Registers and Counters
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Sequential Logic Counters and Registers
SLIDES FOR CHAPTER 12 REGISTERS AND COUNTERS
Counters Next, we’ll look at different kinds of counters and discuss how to build them. These are not only examples of sequential analysis and design,
Latches, Flip-Flops and Registers
Digital Systems Section 14 Registers. Digital Systems Section 14 Registers.
Shift Registers.
Digital System Design Review.
DIGITAL ELECTRONICS THEME 7: Register structures – with parallel input, with serial input. Shift registers – reversible, cycle. Register structures are.
Registers and 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.
EET 1131 Unit 12 Shift Registers
Flip-Flop Applications
Sequential circuit design
Flip-Flop Applications
COE 202: Digital Logic Design Sequential Circuits Part 4
Datapaths For the rest of the semester, we’ll focus on computer architecture: how to assemble the combinational and sequential components we’ve studied.
Sequential circuit design
Sequential circuit design
Registers.
CSC 220: Computer Organization
Flip-Flops Last time, we saw how latches can be used as memory in a circuit. Latches introduce new problems: We need to know when to enable a latch. We.
Recall: ROM example Here are three functions, V2V1V0, implemented with an 8 x 3 ROM. Blue crosses (X) indicate connections between decoder outputs and.
Counters Next, we’ll look at different kinds of counters and discuss how to build them. These are not only examples of sequential analysis and design,
Sequential circuit analysis: kale
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Switching Theory and Logic Design Chapter 5:
Sequential circuit analysis
Outline Registers Counters 5/11/2019.
Registers and Counters
Reference Chapter 7 Moris Mano 4th Edition
Shift registers and Floating Point Numbers
Counters Next, we’ll look at different kinds of counters and discuss how to build them. These are not only examples of sequential analysis and design,
ECE 352 Digital System Fundamentals
Shift registers and Floating Point Numbers
Week 11 Flip flop & Latches.
Presentation transcript:

Registers Today we’ll see some common sequential devices: counters and registers. They’re good examples of sequential analysis and design. They are also frequently used in building larger sequential circuits. First, registers, which hold larger quantities of data than individual flip-flops. Registers are central to the design of modern processors. There are many different kinds of registers. We’ll show some applications of these special registers. 5/22/2019 Registers

What good are registers? Flip-flops are limited because they can store only one bit. We had to use two flip-flops for our two-bit counter examples. Most computers work with integers and single-precision floating-point numbers that are 32-bits long. A register is an extension of a flip-flop that can store multiple bits. Registers are commonly used as temporary storage in a processor. They are faster and more convenient than main memory. More registers can help speed up complex calculations. We’ll discuss RAM after next week, and later we’ll also see how registers are used in designing and programming CPUs. 5/22/2019 Registers

A basic register Basic registers are easy to build. We can store multiple bits just by putting a bunch of flip-flops together! A 4-bit register from LogicWorks, Reg-4, is on the right, and its internal implementation is below. This register uses D flip-flops, so it’s easy to store data without worrying about flip-flop input equations. All the flip-flops share a common CLK and CLR signal. 5/22/2019 Registers

Adding a parallel load operation The input D3-D0 is copied to the output Q3-Q0 on every clock cycle. How can we store the current value for more than one cycle? Let’s add a load input signal LD to the register. If LD = 0, the register keeps its current contents. If LD = 1, the register stores a new value, taken from inputs D3-D0. 5/22/2019 Registers

Clock gating We could implement the load ability by playing games with the CLK input, as shown below. When LD = 0, the flip-flop C inputs are held at 1. There is no positive clock edge, so the flip-flops keep their current values. When LD = 1, the CLK input passes through the OR gate, so the flip-flops can receive a positive clock edge and can load a new value from the D3-D0 inputs. 5/22/2019 Registers

Clock gating is bad This is called clock gating, since gates are added to the clock signal. There are timing problems similar to those of latches. Here, LD must be kept at 1 for the correct length of time (one clock cycle) and no longer. The clock is delayed a little bit by the OR gate. In more complex scenarios, different flip-flops in the system could receive the clock signal at slightly different times. This “clock skew” can lead to synchronization problems. 5/22/2019 Registers

A better parallel load Another idea is to modify the flip-flop D inputs and not the clock signal. When LD = 0, the flip-flop inputs are Q3-Q0, so each flip-flop just keeps its current value. When LD = 1, the flip-flop inputs are D3-D0, and this new value is “loaded” into the register. 5/22/2019 Registers

Shift registers A shift register “shifts” its output once every clock cycle. SI is an input that supplies a new bit to shift “into” the register. For example, if on some positive clock edge we have: SI = 1 Q0-Q3 = 0110 then the next state will be: Q0-Q3 = 1011 The current Q3 (0 in this example) will be lost on the next cycle. Q0(t+1) = SI Q1(t+1) = Q0(t) Q2(t+1) = Q1(t) Q3(t+1) = Q2(t) 5/22/2019 Registers

Shift direction The circuit and example make it look like the register shifts “right.” But it really depends on your interpretation of the bits. If you consider Q3 to be the most significant bit instead, then the register is shifting in the opposite direction! Q0(t+1) = SI Q1(t+1) = Q0(t) Q2(t+1) = Q1(t) Q3(t+1) = Q2(t) 5/22/2019 Registers

Shift registers with parallel load We can add a parallel load, just like we did for regular registers. When LD = 0, the flip-flop inputs will be SIQ0Q1Q2, so the register shifts on the next positive clock edge. When LD = 1, the flip-flop inputs are D0-D3, and a new value is loaded into the shift register, on the next positive clock edge. 5/22/2019 Registers

Shift registers in LogicWorks Here is a block symbol for the Shift Reg-4 from LogicWorks. The implementation is shown on the previous page, except the LD input here is active-low instead. 5/22/2019 Registers

Serial data transfer One application of shift registers is converting between “serial data” and “parallel data.” Computers typically work with multiple-bit quantities. ASCII text characters are 8 bits long. Integers, single-precision floating-point numbers, and screen pixels are up to 32 bits long. But sometimes it’s necessary to send or receive data serially, or one bit at a time. Some examples include: Input devices such as keyboards and mice. Output devices like printers. Any serial port, USB or Firewire device transfers data serially. 5/22/2019 Registers

Receiving serial data To receive serial data using a shift register: The serial device is connected to the register’s SI input. The shift register outputs Q3-Q0 are connected to the computer. The serial device transmits one bit of data per clock cycle. These bits go into the SI input of the shift register. After four clock cycles, the shift register will hold a four-bit word. The computer then reads all four bits at once from the Q3-Q0 outputs. serial device computer 5/22/2019 Registers

Sending data serially To send data serially with a shift register, you do the opposite: The CPU is connected to the register’s D inputs. The shift output (Q3 in this case) is connected to the serial device. The computer first stores a four-bit word in the register, in one cycle. The serial device can then read the shift output. One bit appears on Q3 on each clock cycle. After four cycles, the entire four-bit word will have been sent. computer serial device 5/22/2019 Registers

Registers summary A register is a special state machine that stores multiple bits of data. Several variations are possible: Parallel loading to store data into the register. Shifting the register contents either left or right. Counters are considered a type of register too! One application of shift registers is converting between serial and parallel data. Registers are a central part of modern processors, as we will see in coming weeks. 5/22/2019 Registers