IAY 0600 Digitaalsüsteemide disain Register Transfer Level Design (GCD example) Lab. 7 Alexander Sudnitson Tallinn University of Technology.

Slides:



Advertisements
Similar presentations
Computer Architecture CS 215
Advertisements

KU College of Engineering Elec 204: Digital Systems Design
IAY 0600 Digitaalsüsteemide disain Register Transfer Level Design. FSM Synthesis. Alexander Sudnitson Tallinn University of Technology.
Register Transfer Level
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Chapter 7 Henry Hexmoor Registers and RTL
Princess Sumaya University
Give qualifications of instructors: DAP
1 Register Transfer &  -operations Computer Organization Computer Architectures Lab REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register.
8085 processor. Bus system in microprocessor.
Chapter 9 Computer Design Basics. 9-2 Datapaths Reminding A digital system (or a simple computer) contains datapath unit and control unit. Datapath: A.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Instructor: Yuzhuang Hu The Shifter 3 clock cycles will be needed if using a bidirectional shift register with parallel load.  A clock.
361 div.1 Computer Architecture ECE 361 Lecture 7: ALU Design : Division.
Chapter 16 Control Unit Operation No HW problems on this chapter. It is important to understand this material on the architecture of computer control units,
Chapter 7. Register Transfer and Computer Operations
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
4/10/20081 Lab 9 RT methodology introduction Register operations Data Path Control Path ASM Example TA: Jorge Crichigno.
CPEN Digital System Design Chapter 9 – Computer Design
Logic and Computer Design Dr. Sanjay P. Ahuja, Ph.D. FIS Distinguished Professor of CIS ( ) School of Computing, UNF.
Computer Organization and Architecture
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
The Structure of the CPU
Computer System Configuration and Function Computer Architecture and Design Lecture 6.
Machine Instruction Characteristics
Chap 8. Sequencing and Control. 8.1 Introduction Binary information in a digital computer –data manipulated in a datapath with ALUs, registers, multiplexers,
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Computer Design Basics
Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers.
EKT221 ELECTRONICS DIGITAL II CHAPTER 4: Computer Design Basics
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
Chapter 4 Computer Design Basics. Chapter Overview Part 1 – Datapaths  Introduction  Datapath Example  Arithmetic Logic Unit (ALU)  Shifter  Datapath.
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
Computer Architecture Lecture 32 Fasih ur Rehman.
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
EKT 221 : Chapter 4 Computer Design Basics
IAY 0600 Digital Systems Design Register Transfer Level Design (GCD example) Lab. 7 Alexander Sudnitson Tallinn University of Technology.
Chapter 10 Control Unit Operation “Controls the operation of the processor”
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.
EKT 221 : Digital 2 Computer Design Basics Date : Lecture : 2 hrs.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
5.3 Sequential Circuits - An Introduction to Informatics WMN Lab. Hey-Jin Lee.
1 Lecture 5Multiplication and Division ECE 0142 Computer Organization.
Functions of Processor Operation Addressing modes Registers i/o module interface Memory module interface Interrupts.
REGISTER TRANSFER AND MICROOPERATIONS
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
REGISTER TRANSFER AND MICROOPERATIONS
Computer Design Basics
IAY 0600 Digital Systems Design
Chap 7. Register Transfers and Datapaths
IAY 0600 Digital Systems Design
KU College of Engineering Elec 204: Digital Systems Design
Register Transfer and Microoperations
Lecture 16 Arithmetic Circuits
REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
IAY 0600 Digital Systems Design
Computer Architecture and Design Lecture 6
IAS 0600 Digital Systems Design
Overview Part 1 - Registers, Microoperations and Implementations
IAS 0600 Digital Systems Design
Computer Design Basics
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
RTL Design Methodology Transition from Pseudocode & Interface
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
CHAPTER-3 REGISTER TRANSFER LANGUAGE AND MICROOPERATIONS
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
1 Lecture 5Multiplication and Division ECE 0142 Computer Organization.
Presentation transcript:

IAY 0600 Digitaalsüsteemide disain Register Transfer Level Design (GCD example) Lab. 7 Alexander Sudnitson Tallinn University of Technology

2 An example: word description ‏ Digital unit performs an operation of computing the greatest common divisor (GCD) of two integers corresponding to Euclid algorithm: The gist of this algorithm is computing the remainder from division of the greater number with the less one and further exchanging the greater number with the less one and this less number with the division remainder. This converging process is looped until the division remainder is equal to zero. That means the termination of the algorithm with the current less number as the result. The design ranges over several levels of representation. We begin the design process with a word description of an example device.

3 GCD computation of 15 and 24 OP1OP2 RG1 RG RG1 < RG2 RG1 := RG2; RG2 := RG1; Remainder = RG1 /= 0 RG1 := RG2; RG2 := RG1; 15 9 Remainder = 6 69 RG1 /= 0 RG1 := RG2; RG2 := RG1; 9 6 Remainder = RG1 /= 0 RG1 := RG2; RG2 := RG1; 6 3 Remainder = 0 03 RG1 = 0 READY := 1; ANSW := 3; Dividend =Quotient  Divisor + Remainder

4 The flowchart (example)‏ Yes RG1 := OP1; RG2 := OP2; RG1 = RG2 Yes No RG1 < RG2 RG1 := RG2; RG2 := RG1; Yes No Remainder Computation Remainder = 0 NoYes READY := 1; ANSW := RG2; END BEGIN START No

5 Block diagram (example)‏ Start Ready OP1 OP2 ANSW DISCRETE SYSTEM The interface description entity EUCLID is port (START: in BIT; --The first and the second operand bus OP1, OP2: in INTEGER range 0 to 255; --Answer is ready signal READY: out BIT; --Answer bus ANSW: out INTEGER range 0 to 255); end EUCLID;

6 architecture COMMON of EUCLID is process -- Temporary variables: variable RG1, RG2, temp: INTEGER range 0 to 255; begin -- Waiting for the start: wait on START until START’event and START = ‘1’; RG1 := OP1; RG2 := OP2; if RG1 /= RG2 then if RG1 < RG2 then -- Exchange operands: temp:=RG1; RG1 := RG2; RG2:=temp; end if; while RG1 /= 0 loop -- Calculation of the reminder: RG1 := RG1 rem RG2; if RG1 /= 0 then temp:=RG1; RG1 := RG2; RG2:=temp; end if; end loop; end if; --Answer output: ANSW <= RG2; READY <= ‘1’; end process; end COMMON; Behavioral Description

7 Register Transfer Level The Register Transfer Level (RTL) is characterized by A digital system is viewed as divided into a data path (data subsystem) and control path (controller); The state of data path consists of the contents of a set of registers; The function of the system is performed as a sequence of transition transfers (in one or more clock cycles). A register transfer is a transformation performed on a datum while the datum is transferred from one register to another. The sequence of register transfers is controlled by the control path (FSM). A sequence of register transfers is representable by an execution graph.

8 Basic units of RT-level design Control Inputs Outputs Control Status InputsSignals Data path InputsOutputs CONTROL UNIT DATA PATH UNIT

9 Data path -1- The data path is specified by the set of operations presented in the behavioral descriptions and by the set of basic elements which it will be implemented by. Notice that remainder computation chip (or macro) doesn’t exist. We need to synthesize it on the next design step basing upon its behavioural description and existing (or virtual) elements of the lower level - e.g. adders, shift registers, counters. It would in its turn lead to appearing the control part of the lower level and so on (top-down design methodology). The set of basic elements is resticted.

10 Data path -2- Consider in our example the data path that is based upon some ALU which completes four arithmetic operations (addition, subtraction, left shift and right shift) with registers RG1 and RG2 for storing the intermediate results, with up/down counter and with control buses for data transfer. It is considered that RG1 and RG2 are Master- Slave registers that allows to exchange their contents during one clock cycle. Input operands are 8-bit wide. For this example it is assumed that input operands are positive and none of them is 0. Note, that RG1 and RG2 have a sign bit, as remainder computation algorithm deals with negative values as well.

11 Registers and Counter y1 x3 RG2 enable SignSign y0 x4 RG1 enable SignSign NOR x6 0 … 7 8 y2 y3 Counter enable 0 C C – 1 NOR x5

12 ALU (combinational) ALU OP1 OP2 x2 x1 OP1 >= OP2 0 OP1 < OP2 1 0 OP1 /= OP2 1 OP1 = OP2 Result y R1L1–+ y8 y9 y8

13 Multiplexers ALU RG2 y5y4 RG1 Input OP1 RG1 Input OP1 y4y – 00ALU RG2 ALU RG1 y7y6 RG2 Input OP2 RG2 Input OP2 y6y – 00ALU RG1

14 Control bus 8 A B y y10 &&& RG(0)‏ ANSW(0)‏ANSW(1)‏ANSW(7)‏ RG(1)‏RG(7)‏

15 Remainder computation No RG1 := RG1 - RG2; RG2(7) = 1 Yes RG1(8) = 1 L1(RG2.0); C := C + 1; YesNo RG1 := RG1 + RG2; C = 0 No R1(0.RG2); C := C - 1; Yes normalization ristore the original valuee shift to the right, setting the new bit to 0e

16 The flowchart Yes RG1 := OP1; RG2 := OP2; RG1 = RG2 Yes No RG1 < RG2 RG1 := RG2; RG2 := RG1; Yes No Remainder = 0 NoYes READY := 1; ANSW := RG2; END BEGIN START No Remainder Computation No RG1 := RG1 - RG2; RG2(7) = 1 Yes RG1(8) = 1 L1(RG2.0); C := C + 1; YesNo RG1 := RG1 + RG2; C = 0 No R1(0.RG2); C := C - 1; Yes

17 The structure of GCD device ALU x1 x2 RG1 RG2 Counter y9y8 y5y4 y0 x4 x6 y7y6 y1 x3 y10 DATA PATH UNIT OP1 ANSW OP2 y3y2 x5 FSM ●●●●●● y0 y1 y10 x1 x0 X5 ●●●●●● READY START CONTROL UNIT

18 Control part At every description level after the (regular) structure of data path is defined it is possible to extract the remaining control part from the current level of behavioral description. Naturally this extracted control part description may be at first only behavioral one and the methods of finite automata synthesis are required for control part (controller) implementation. In this stage it is convenient to represent the extracted control behavior by means of graph- scheme of algorithm (GSA). The flowchart corresponding to our algorithm was obtained as the first step of GSA synthesis. In this flowchart simultaneously executed statements are grouped into common blocks. The GSA we got from the flowchart by replacing the computational statements (actions of ALU and counter) with the corresponding control signals (y-s) and the conditions - with binary conditions signals (x-s).

19 Graph-scheme of algorithm BEGIN y9 y8 y3 y2 y1 x0 0 1 y7 y5 y1 y0 x1 x2 01 x3 x4 x5 1 y6 y4 y1 y0 0 y9 y2 y1 0 1 y8 y0 0 1 y0 0 x y10 END

20 Moore type FSM synthesis ‏ Step 1. The construction of marked GSA. At this step, the vertices “Begin”, “End” and oerator vertices are marked by the symbols s1, s2, … as follows: vertices “Begin”, “End” are marked by the same symbol s1; the symbols s2, s3, … mark all operator vertices; all operator verteces should be marked; Note that while synthesizing a Moore FSM symbols of states mark not inputs of vertices following the operator ones but operator vertices. Step2. The construction of transition list (state diagram) of a controller. SpresSnext X(Spres, Snext) Y(Spres)‏ Y(Snext)‏

21 Moore type FSM GSA BEGIN y9 y8 y3 y2 y1 x0 0 1 y7 y5 y1 y0 x1 x2 01 x3 x4 x5 1 y6 y4 y1 y0 0 y9 y2 y1 0 1 y8 y0 0 1 y0 0 x y10 END S1 S2 S3 S4 S5 S6 S7 S8 S1

22 The transition list (Moore FSM)‏

23 Microoperation and microinstruction Let a microoperation be an elementary indivisible step of data processing in the datapath and let Y be a set of microoperations. Microoperations are induced by the binary signals y 1, …,y T from a controller. To perform the microoperation y i (i = 1, …, T) the signal y i = 1 has to appear at the output y i. A set of microoperations executed concurrently in the datapath is called a microinstruction. Thus if  h = {y h 1, …, y h t } is microinstruction, then  h is represented as subset of Y and the microoperations y h 1, …, y h t are executed at the same clock period. The Y t could be empty and we denote such an empty microinstruction Y 0 (“-“).