Registers 4.2 N-bit register: Stores N bits, N is the width

Slides:



Advertisements
Similar presentations
CPE 201 Digital Design Lecture 25: Register Transfer Level Design (2)
Advertisements

Lecture 23: Registers and Counters (2)
Lab 9: Matrix Keypad : ”No Key Press” Analysis Slide #2 Slide #3 ”Press and Hold Key 5” Analysis.
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Chapter 7 Henry Hexmoor Registers and RTL
Princess Sumaya University
1 Counter with Parallel Load Up-counter that can be loaded with external value –Designed using 2x1 mux – ld input selects incremented value or external.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
Programmable Interval Timer
Flip-Flops, Registers, Counters, and a Simple Processor
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.
Counter Circuits and VHDL State Machines
Digital Design Copyright © 2006 Frank Vahid 1 Digital Design Chapter 4: Datapath Components Slides to accompany the textbook Digital Design, First Edition,
1 Counters N-bit up-counter: N-bit register that can increment (add 1) to its own value on each clock cycle –0000, 0001, 0010, 0011,...., 1110, 1111, 0000.
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Chapter 4: Datapath Components
Logic and Computer Design Fundamentals Registers and Counters
1 Introduction Chapters 2 & 3: Introduced increasingly complex digital building blocks –Gates, multiplexors, decoders, basic registers, and controllers.
1 Carry-Ripple Adder Using full-adder instead of half-adder for first bit, we can include a “carry in” bit in the addition –Will be useful later when we.
Chapter 7 - Part 2 1 CPEN Digital System Design Chapter 7 – Registers and Register Transfers Part 2 – Counters, Register Cells, Buses, & Serial Operations.
Logic and Computer Design Dr. Sanjay P. Ahuja, Ph.D. FIS Distinguished Professor of CIS ( ) School of Computing, UNF.
Counters and Registers
Registers and Counters
Chapter 1_4 Part II Counters
EE345: Introduction to Microcontrollers Register and Counters Prof. Ahmad Abu-El-Haija.
EE24C Digital Electronics Projects
Figure 7.1. Control of an alarm system. Memory element Alarm Sensor Reset Set OnOff 
Registers CPE 49 RMUTI KOTAT.
EEE2243 Digital System Design Chapter 4: Datapath Components by Muhazam Mustapha, February 2012.
Chapter 14 Introduction to Microprocessors. 2 Microcomputer A self-contained computer system that consists of CPU (central processing unit), memory (RAM.
Senior Project Presentation: Designers: Shreya Prasad & Heather Smith Advisor: Dr. Vinod Prasad May 6th, 2003 Internal Hardware Design of a Microcontroller.
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 )
Princess Sumaya Univ. Computer Engineering Dept. Chapter 6:
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
7-6 단일 레지스터에서 Microoperation Multiplexer-Based Transfer  Register 가 서로 다른 시간에 둘 이상의 source 에서 data 를 받을 경우 If (K1=1) then (R0 ←R1) else if (K2=1) then.
1 Registers & Counters Logic and Digital System Design - CS 303 Erkay Savaş Sabancı University.
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.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
Digital Logic Design.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Lecture 21: Registers and Counters (1)
EKT 221 : Chapter 4 Computer Design Basics
Digital Design 2e Copyright © 2010 Frank Vahid 1 Digital Design Chapter 4: Datapath Components Copyright © 2010 Frank Vahid Instructors of courses requiring.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Counters.
Learning Outcome By the end of this chapter, students are expected to understand the design, operation and block diagram of the following datapath components:
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
DIGITAL COMPONENTS. MULTIPLEXERS A multiplexer is a combinational circuit that receives binary information from one of 2 n input data lines and directs.
© BYU 12 REGISTERS Page 1 ECEn 224 Registers.
1 To write any register, we need register address and a write signal A 3-bit write address is decoded if write signal is present One of the eight registers.
Registers ECEn/CS 224.
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.
CSE 260 Digital Logic Design Registers, Memory BRAC University.
Digital Design Copyright © 2006 Frank Vahid 1 Digital Design Chapter 4: Datapath Components Slides to accompany the textbook Digital Design, First Edition,
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 Design
REGISTER TRANSFER LANGUAGE (RTL)
Chap 7. Register Transfers and Datapaths
KU College of Engineering Elec 204: Digital Systems Design
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.
29-Nov-18 Counters Chapter 5 (Sections ).
Overview Part 1 - Registers, Microoperations and Implementations
A register design with parallel load input
Switching Theory and Logic Design Chapter 5:
Registers Today we’ll see some common sequential devices: counters and registers. They’re good examples of sequential analysis and design. They are also.
Presentation transcript:

Registers 4.2 N-bit register: Stores N bits, N is the width Common widths: 8, 16, 32 Storing data into register: Loading Opposite of storing: Reading (does not alter contents) Basic register of Ch 3: Loaded every cycle Useful for implementing FSM—stores encoded state Combinational logic State register s1 s0 n1 n0 x b clk a load How extend to only load on certain cycles? D Q I 2 3 Q2 Q3 Q1 Q0 1 clk 4-bit register Basic register loads on every clock cycle

Register with Parallel Load Add 2x1 mux to front of each flip-flop Register’s load input selects mux input to pass load=0: existing flip-flop value; load=1: new input value I 3 I 2 I 1 I 1 2x1 load load I 3 2 1 Q3 Q2 Q1 Q0 block symbol a D D D D Q Q Q Q Q3 Q2 Q1 Q0 1 D Q Q3 I 3 Q2 2 Q1 Q0 load=0 1 D Q Q3 I 3 Q2 2 Q1 Q0 load=1 a

4.9 Counters and Timers N-bit up-counter: N-bit register that can increment (add 1) to its own value on each clock cycle 0000, 0001, 0010, 0011, ...., 1110, 1111, 0000 Count “rolls over” from 1111 to 0000 Terminal (last) count, tc, equals1 during value just before rollover Internal design Register, incrementer, and N-input AND gate to detect terminal count 1 a 0000 0001 1110 0100 0001 0000 0010 0011 0101 1111 1 ... a

Up/Down-Counter Can count either up or down Includes both incrementer and decrementer Use dir input to select, via 2x1 mux: dir=0 means up Likewise, dir selects appropriate terminal count value (all 1s or all 0s) ld 4-bit register C t c 4 n clr dir 4-bit up/down counter –1 +1 1 2 x 4-bit 2

Counter with Load Up-counter that can be loaded with external value Designed using 2x1 mux. ld input selects incremented value or external value Load the internal register when loading external value or when counting Note that ld has priority over cnt L 4 ld 1 4-bit 2x1 4 cnt Id 4-bit register clr clr 4 4 4 +1 tc C

Timers Pulses output at user-specified timer interval when enabled -1 32 Pulses output at user-specified timer interval when enabled “Ticks” like a clock Interval specified as multiple of base time unit If base is 1 microsec and user wants pulse every 300 ms, loads 300,000 into timer Can design using oscillator, register, and down-counter load ld 32-bit register 1 4-bit 2x1 ld enable 32-bit cnt down-counter 1 microsec tc C oscillator Q unused (a) load enable Q 32-bit 1-microsec timer (c) 32 M (b) Q

Shift Register Shift right Move each bit one position right Rightmost bit is “dropped” Assume 0 shifted into leftmost bit 0 1 1 0 Register contents after shift right Q: Do four right shifts on 1001, showing value after each shift A: 1001 (original) 0100 shr_in Implementation: Connect flip-flop output to next flip-flop’s input 0010 0001 0000

Shift Register To allow register to either shift or retain, use 2x1 muxes shr: “0” means retain, “1” shift shr_in: value to shift in May be 0, or 1 shr_in shr 1 1 1 1 1 1 1 1 shr=1 2x1 2x1 D D D D D D D D Q Q Q Q Q Q Q Q Q3 Q2 Q1 Q0 Q3 Q2 Q1 Q0 ( b ) ( a ) shr_in shr Left-shift register also easy to design Q3 Q2 Q1 Q0 ( c )

Rotate Register 1 1 0 1 1 1 1 0 Register contents before shift right after shift right Rotate right: Like shift right, but leftmost bit comes from rightmost bit

begins to have fanout and wire problems 4.10 Register Files Accessing one of several registers is: OK if just a few registers Problematic when many Ex: Earlier above-mirror display, with 16 registers Much fanout (branching of wire): Weakens signal Many wires: Congestion C d0 d15 e i0 i15 load i3-i0 4x 16 32 4 D d s3-s0 32-bit 16x1 r eg0 eg15 9 C d0 d1 d2 d3 e i0 i1 i2 i3 a0 a1 load 2 × 4 8 D d x y s1 s0 8-bit 1 r eg0 eg1 eg2 eg3 T A I M a huge mux too much fanout 9 congestion 9 9 9 9 16*32 = 512 wires 4 32-bit registers tolerable 16 32-bit registers begins to have fanout and wire problems

Register File MxN register file: Efficient design for one-at-a-time write/read of many registers Consider 16 32-bit registers 32-bit data to write 32 32 4 R_data R_addr R_en 32-bit data that is read W_data 4-bit “address” specifies which register to write 4-bit address to specifies which register to read 4 “read port” Called “write port” W_addr Enable (load) line: Reg written on next clock W_en Enable read 16 × 32 register file a

Register File Internal design uses drivers and bus 9 9 9 9 9 1 1 32 9 9 W_data 32 bus R_data d0 load reg0 driver d0 Internal design uses drivers and bus 9 32 2x4 9 2x4 d1 load a 1 reg1 d1 9 1 i0 32 q q=d d driver Boosts signal i0 W_addr R_addr 1 i1 9 i1 1 d2 load reg2 d2 32 write read 1 decoder decoder 1 d3 load 9 reg3 d3 e 9 9 e 32 W_en R_en q c=1: q=d c c=0: q= Z ¢ d like no connection three-state driver 1 4x32 register file 1 a Internal design of 4x32 RF; 16x32 RF follows similarly Note: Each driver in figure actually represents 32 1-bit drivers