A Modular Soft Processor Core in VHDL

Total Page:16

File Type:pdf, Size:1020Kb

A Modular Soft Processor Core in VHDL A Modular Soft Processor Core in VHDL Jack Whitham 2002-2003 This is a Third Year project submitted for the degree of MEng in the Department of Computer Science at the University of York. The project will attempt to demonstrate that a modular soft processor core can be designed and implemented on an FPGA, and that the core can be optimised to run a particular embedded application using a minimal amount of FPGA space. The word count of this project (as counted by the Unix wc command after detex was run on the LaTeX source) is 33647 words. This includes all text in the main report and Appendices A, B and C. Excluding source code, the project is 70 pages in length. i Contents I. Introduction 1 1. Background and Literature 1 1.1. Soft Processor Cores . 1 1.2. A Field Programmable Gate Array . 1 1.3. VHSIC Hardware Definition Language (VHDL) . 2 1.4. The Motorola 68020 . 2 II. High-level Project Decisions 3 2. Should the design be based on an existing one? 3 3. Which processor should the soft core be based upon? 3 4. Which processor should be chosen? 3 5. Restating the aims of the project in terms of the chosen processor 4 III. Modular Processor Design Decisions 4 6. Processor Design 4 6.1. Alternatives to a complete processor implementation . 4 6.2. A real processor . 5 6.3. Instruction Decoder and Control Logic . 5 6.4. Arithmetic and Logic Unit (ALU) . 7 6.5. Register File . 7 6.6. Links between Components . 8 7. The framework for a minimal processor 8 7.1. How this allows an application to be executed . 9 7.2. More complex features of the 68020 . 9 8. Compiling and testing 68020 programs 11 8.1. GCC Compilation Issues . 11 8.2. The Emulator . 12 9. What features can be modularised? 13 9.1. Modularisation of Instruction Support . 14 9.2. Modularisation of Registers . 14 9.3. Modularisation of ALU operations . 14 9.4. Modularisation of addressing modes . 14 9.5. Optimisation of the Addressing Width . 15 9.6. Writing the generator . 15 10.Designing processor components in VHDL 15 10.1. Control Logic . 16 10.2. Instruction Decoder . 19 10.3. Arithmetic and Logic Unit (ALU) . 21 ii 10.4. Register File . 21 10.5. Memory implementation . 22 10.6. Debugging Hardware . 23 10.7. Output Device . 24 11.The Generator 25 11.1. How should VHDL files be generated? . 25 11.2. Generator Directives . 26 11.3. Design of a 68020 program scanner . 26 12.Designing state machine sequences for instruction execution 27 IV. Implementation Phase 27 13.Implementing the fixed parts of the processor 27 13.1. The Control Logic . 28 13.2. The ALU . 29 13.3. The Register File . 32 13.4. The Memory Subsystem and Output Device . 32 13.5. Debugging Hardware Implementation . 34 14.Implementing control line sequences for 68020 instruction execution 36 14.1. Beginning to implement the 68020 instructions . 37 14.2. Defining the high level register transfers that are required . 37 14.3. Thinking at a lower level . 39 14.4. Implementing the Register Transfers in VHDL . 47 14.5. Implementing the state machine sequences for each instruction . 49 15.Implementing the generator 50 15.1. The state machine generator . 50 15.2. The instruction decoder generator . 52 15.3. The ALU and Effective Address optimisers . 57 15.4. The program scanner . 59 V. Evaluation and Conclusion 60 16.Evaluation 60 16.1. Does the State Machine Compiler work? . 60 16.2. Does the processor work? . 61 16.3. How much FPGA space does the processor take up? . 62 16.4. How does it compare to other soft processor cores? . 64 16.5. How extensible is the processor? . 65 16.6. Summary of the Evaluation . 65 17.Conclusion 65 VI. Appendices 66 A. Bibliography 66 iii B. Building-Block Hardware Components that appear in Diagrams 67 B.1. Multiplexers . 67 B.2. Links between Components . 68 B.3. Registers . 68 C. High-Level Register Transfers for Selected Instructions 68 D. Linker scripts and crt0.s 71 D.1. crt0.s file used for embedded applications . 71 D.2. tiny.x linker script used for the embedded applications . 72 E. VHDL sources 73 E.1. Source code of alu.vhd ......................................... 73 E.2. Source code of alu muxes.vhd ..................................... 75 E.3. Source code of alu segment.vhd .................................... 78 E.4. Source code of clock.vhd ........................................ 79 E.5. Source code of debugging.vhd ..................................... 80 E.6. Source code of do branch process.vhd ................................ 82 E.7. Source code of input.vhd ........................................ 82 E.8. Source code of memory.vhd ....................................... 83 E.9. Source code of operation size control process.vhd ........................ 86 E.10.Source code of register file.vhd ................................... 86 E.11.Source code of seven segment driver.vhd .............................. 88 E.12.Source code of state machine controller.vhd ........................... 89 E.13.Source code of types.vhd ........................................ 90 E.14.Source code of xilinx dp ram.vhd ................................... 90 F. Test Program sources 91 F.1. Source code of fib.c ........................................... 91 F.2. Source code of fvt.s ........................................... 91 F.3. Source code of 23instructions.s ................................... 95 G. State Machine Compiler sources 96 G.1. Source code of alu optimisation.cc ................................. 96 G.2. Source code of alu optimisation.h .................................. 96 G.3. Source code of control.cc ....................................... 96 G.4. Source code of control.h ........................................ 100 G.5. Source code of main.cc ......................................... 101 G.6. Source code of ndfa dag.cc ....................................... 102 G.7. Source code of ndfa dag.h ....................................... 105 G.8. Source code of ndfa node.cc ...................................... 105 G.9. Source code of ndfa node.h ....................................... 116 G.10.Source code of opcode map reader.cc ................................. 117 G.11.Source code of opcode map reader.h ................................. 121 G.12.Source code of optimisation.cc .................................... 122 G.13.Source code of optimisation.h .................................... 124 G.14.Source code of programram.cc ..................................... 126 G.15.Source code of programram.hh ..................................... 127 G.16.Source code of state.cc ......................................... 128 G.17.Source code of state.h ......................................... 131 G.18.Source code of state machine.cc ................................... 132 G.19.Source code of state machine.h .................................... 138 G.20.Source code of state machine loader.cc ............................... 139 iv G.21.Source code of state machine loader.h ............................... 142 G.22.Source code of utils.cc ......................................... 142 G.23.Source code of utils.h ......................................... 145 H. The Opcode Database 145 H.1. Source code of opcode map ....................................... 145 I. State Machine Sequences 147 I.1. Source code of alu a family.sm .................................... 147 I.2. Source code of alu a family cmp.sm .................................. 148 I.3. Source code of alu i cmp.sm ...................................... 149 I.4. Source code of alu i family.sm .................................... 150 I.5. Source code of alu no cmp.sm ...................................... 150 I.6. Source code of alu no family.sm .................................... 151 I.7. Source code of alu q family.sm .................................... 152 I.8. Source code of branch.sm ........................................ 152 I.9. Source code of clr.sm .......................................... 153 I.10. Source code of decbranch.sm ...................................... 154 I.11. Source code of decode ea.sm ...................................... 155 I.12. Source code of decode ea and dereference.sm ............................ 158 I.13. Source code of decode ea and store.sm ................................ 160 I.14. Source code of fetch extension dword.sm .............................. 161 I.15. Source code of fetch extension word.sm ............................... 162 I.16. Source code of fetch immediate data.sm ............................... 162 I.17. Source code of jmp.sm .......................................... 164 I.18. Source code of jsr.sm .......................................... 164 I.19. Source code of lea.sm .......................................... 165 I.20. Source code of link.sm ......................................... 166 I.21. Source code of move family.sm ..................................... 167 I.22. Source code of moveq.sm ......................................... 167 I.23. Source code of nop.sm .......................................... 168 I.24. Source code of pea.sm .......................................... 168 I.25. Source code of rts.sm .......................................... 169 I.26. Source code of scc.sm .......................................... 169 I.27. Source code of start.sm ......................................... 170 I.28. Source code of tst.sm .......................................... 171 I.29. Source code of unlk.sm ......................................... 172 v Part I. Introduction The aim of this project is to demonstrate that a modular soft processor core can be
Recommended publications
  • Computer Organization and Architecture Designing for Performance Ninth Edition
    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION William Stallings Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montréal Toronto Delhi Mexico City São Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo Editorial Director: Marcia Horton Designer: Bruce Kenselaar Executive Editor: Tracy Dunkelberger Manager, Visual Research: Karen Sanatar Associate Editor: Carole Snyder Manager, Rights and Permissions: Mike Joyce Director of Marketing: Patrice Jones Text Permission Coordinator: Jen Roach Marketing Manager: Yez Alayan Cover Art: Charles Bowman/Robert Harding Marketing Coordinator: Kathryn Ferranti Lead Media Project Manager: Daniel Sandin Marketing Assistant: Emma Snider Full-Service Project Management: Shiny Rajesh/ Director of Production: Vince O’Brien Integra Software Services Pvt. Ltd. Managing Editor: Jeff Holcomb Composition: Integra Software Services Pvt. Ltd. Production Project Manager: Kayla Smith-Tarbox Printer/Binder: Edward Brothers Production Editor: Pat Brown Cover Printer: Lehigh-Phoenix Color/Hagerstown Manufacturing Buyer: Pat Brown Text Font: Times Ten-Roman Creative Director: Jayne Conte Credits: Figure 2.14: reprinted with permission from The Computer Language Company, Inc. Figure 17.10: Buyya, Rajkumar, High-Performance Cluster Computing: Architectures and Systems, Vol I, 1st edition, ©1999. Reprinted and Electronically reproduced by permission of Pearson Education, Inc. Upper Saddle River, New Jersey, Figure 17.11: Reprinted with permission from Ethernet Alliance. Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on the appropriate page within text. Copyright © 2013, 2010, 2006 by Pearson Education, Inc., publishing as Prentice Hall. All rights reserved. Manufactured in the United States of America.
    [Show full text]
  • Lecture 1: Course Introduction G Course Organization G Historical Overview G Computer Organization G Why the MC68000? G Why Assembly Language?
    Lecture 1: Course introduction g Course organization g Historical overview g Computer organization g Why the MC68000? g Why assembly language? Microprocessor-based System Design 1 Ricardo Gutierrez-Osuna Wright State University Course organization g Grading Instructor n Exams Ricardo Gutierrez-Osuna g 1 midterm and 1 final Office: 401 Russ n Homework Tel:775-5120 g 4 problem sets (not graded) [email protected] n Quizzes http://www.cs.wright.edu/~rgutier g Biweekly Office hours: TBA n Laboratories g 5 Labs Teaching Assistant g Grading scheme Mohammed Tabrez Office: 339 Russ [email protected] Weight (%) Office hours: TBA Quizes 20 Laboratory 40 Midterm 20 Final Exam 20 Microprocessor-based System Design 2 Ricardo Gutierrez-Osuna Wright State University Course outline g Module I: Programming (8 lectures) g MC68000 architecture (2) g Assembly language (5) n Instruction and addressing modes (2) n Program control (1) n Subroutines (2) g C language (1) g Module II: Peripherals (9) g Exception processing (1) g Devices (6) n PI/T timer (2) n PI/T parallel port (2) n DUART serial port (1) g Memory and I/O interface (1) g Address decoding (2) Microprocessor-based System Design 3 Ricardo Gutierrez-Osuna Wright State University Brief history of computers GENERATION FEATURES MILESTONES YEAR NOTES Asia Minor, Abacus 3000BC Only replaced by paper and pencil Mech., Blaise Pascal, Pascaline 1642 Decimal addition (8 decimal figs) Early machines Electro- Charles Babbage Differential Engine 1823 Steam powered (3000BC-1945) mech. Herman Hollerith,
    [Show full text]
  • Introduction to the Intel® Nios® II Soft Processor
    Introduction to the Intel® Nios® II Soft Processor For Quartus® Prime 18.1 1 Introduction This tutorial presents an introduction the Intel® Nios® II processor, which is a soft processor that can be instantiated on an Intel FPGA device. It describes the basic architecture of Nios II and its instruction set. The Nios II processor and its associated memory and peripheral components are easily instantiated by using Intel’s SOPC Builder or Platform Designer tool in conjunction with the Quartus® Prime software. A full description of the Nios II processor is provided in the Nios II Processor Reference Handbook, which is available in the literature section of the Intel web site. Introductions to the SOPC Builder and Platform Designer tools are given in the tutorials Introduction to the Intel SOPC Builder and Introduction to the Intel Platform Designer Tool, respectively. Both can be found in the University Program section of the web site. Contents: • Nios II System • Overview of Nios II Processor Features • Register Structure • Accessing Memory and I/O Devices • Addressing • Instruction Set • Assembler Directives • Example Program • Exception Processing • Cache Memory • Tightly Coupled Memory Intel Corporation - FPGA University Program 1 March 2019 ® ® INTRODUCTION TO THE INTEL NIOS II SOFT PROCESSOR For Quartus® Prime 18.1 2 Background Intel’s Nios II is a soft processor, defined in a hardware description language, which can be implemented in Intel’s FPGA devices by using the Quartus Prime CAD system. This tutorial provides a basic introduction to the Nios II processor, intended for a user who wishes to implement a Nios II based system on an Intel Development and Education board.
    [Show full text]
  • Computer Organization & Architecture Eie
    COMPUTER ORGANIZATION & ARCHITECTURE EIE 411 Course Lecturer: Engr Banji Adedayo. Reg COREN. The characteristics of different computers vary considerably from category to category. Computers for data processing activities have different features than those with scientific features. Even computers configured within the same application area have variations in design. Computer architecture is the science of integrating those components to achieve a level of functionality and performance. It is logical organization or designs of the hardware that make up the computer system. The internal organization of a digital system is defined by the sequence of micro operations it performs on the data stored in its registers. The internal structure of a MICRO-PROCESSOR is called its architecture and includes the number lay out and functionality of registers, memory cell, decoders, controllers and clocks. HISTORY OF COMPUTER HARDWARE The first use of the word ‘Computer’ was recorded in 1613, referring to a person who carried out calculation or computation. A brief History: Computer as we all know 2day had its beginning with 19th century English Mathematics Professor named Chales Babage. He designed the analytical engine and it was this design that the basic frame work of the computer of today are based on. 1st Generation 1937-1946 The first electronic digital computer was built by Dr John V. Atanasoff & Berry Cliford (ABC). In 1943 an electronic computer named colossus was built for military. 1946 – The first general purpose digital computer- the Electronic Numerical Integrator and computer (ENIAC) was built. This computer weighed 30 tons and had 18,000 vacuum tubes which were used for processing.
    [Show full text]
  • Introduction of Microprocessor
    Introduction of Microprocessor A Microprocessor is an important part of a computer architecture without which you will not be able to perform anything on your computer. It is a programmable device that takes in input, performs some arithmetic and logical operations over it and produces desired output. In simple words, a Microprocessor is a digital device on a chip which can fetch instruction from memory, decode and execute them and give results. Basics of Microprocessor – A Microprocessor takes a bunch of instructions in machine language and executes them, telling the processor what it has to do. Microprocessor performs three basic things while executing the instruction: 1. It performs some basic operations like addition, subtraction, multiplication, division and some logical operations using its Arithmetic and Logical Unit (ALU). New Microprocessors also perform operations on floating point numbers also. 2. Data in a Microprocessor can move from one location to another. 3. It has a Program Counter (PC) register that stores the address of the next instruction based on the value of PC, Microprocessor jumps from one location to another and takes decision. A typical Microprocessor structure looks like this. Clock Speed of different Microprocessor: 16-bit Microprocessor – 8086: 4.7MHz, 8MHz, 10MHz 8088: more than 5MHz 80186/80188: 6MHz 80286: 8MHz 32-bit Microprocessor – INTEL 80386: 16MHz to 33MHz INTEL 80486: 16MHz to 100MHz PENTIUM: 66MHz 64-bit Microprocessor – INTEL CORE-2: 1.2GHz to 3GHz INTEL i7: 66GHz to 3.33GHz INTEL i5: 2.4GHz to 3.6GHz INTEL i3: 2.93GHz to 3.33GHz We do not have any 128-bit Microprocessor in work at present one among the reasons for this is that we are a long way from exhausting the 64 bit address space itself, we use it a constant rate of roughly 2 bits every 3 years.
    [Show full text]
  • Assignment Solutions
    Week 1: Assignment Solutions 1. Which of the following statements are true? a. The ENIAC computer was built using mechanical relays. b. Harvard Mark1 computer was built using mechanical relays. c. PASCALINE computer could multiply and divide numbers by repeated addition and subtraction. d. Charles Babbage built his automatic computing engine in 19th century. Solution: ((b) and (c)) ENIAC was built using vacuum tubes. Charles Babbage designed his automatic computing engine but could not built it. 2. Which of the following statements are true for Moore’s law? a. Moore’s law predicts that power dissipation will double every 18 months. b. Moore’s law predicts that the number of transistors per chip will double every 18 months. c. Moore’s law predicts that the speed of VLSI circuits will double every 18 months. d. None of the above. Solution: (b) Moore’s law only predicts that number of transistors per chip will double every 18 months. 3. Which of the following generates the necessary signals required to execute an instruction in a computer? a. Arithmetic and Logic Unit b. Memory Unit c. Control Unit d. Input/Output Unit Solution: (c) Control unit acts as the nerve center of a computer and generates the necessary control signals required to execute an instruction. 4. An instruction ADD R1, A is stored at memory location 4004H. R1 is a processor register and A is a memory location with address 400CH. Each instruction is 32-bit long. What will be the values of PC, IR and MAR during execution of the instruction? a.
    [Show full text]
  • Register Are Used to Quickly Accept, Store, and Transfer Data And
    Register are used to quickly accept, store, and transfer data and instructions that are being used immediately by the CPU, there are various types of Registers those are used for various purpose. Among of the some Mostly used Registers named as AC or Accumulator, Data Register or DR, the AR or Address Register, program counter (PC), Memory Data Register (MDR) ,Index register,Memory Buffer Register. These Registers are used for performing the various Operations. While we are working on the System then these Registers are used by the CPU for Performing the Operations. When We Gives Some Input to the System then the Input will be Stored into the Registers and When the System will gives us the Results after Processing then the Result will also be from the Registers. So that they are used by the CPU for Processing the Data which is given by the User. Registers Perform:- 1) Fetch: The Fetch Operation is used for taking the instructions those are given by the user and the Instructions those are stored into the Main Memory will be fetch by using Registers. 2) Decode: The Decode Operation is used for interpreting the Instructions means the Instructions are decoded means the CPU will find out which Operation is to be performed on the Instructions. 3) Execute: The Execute Operation is performed by the CPU. And Results those are produced by the CPU are then Stored into the Memory and after that they are displayed on the user Screen. Types of Registers are as Followings 1. MAR stand for Memory Address Register This register holds the memory addresses of data and instructions.
    [Show full text]
  • A Manual for the Assemblerߤ Rob Pike Lucent Technologies, Bell Labs
    A Manual for the Assembler Rob Pike Lucent Technologies, Bell Labs Machines There is an assembler for each of the MIPS, SPARC, Intel 386, ARM, PowerPC, Motorola 68010, and Motorola 68020. The 68020 assembler, 2a, is the oldest and in many ways the prototype. The assemblers are really just variations of a single program: they share many properties such as left-to-right assignment order for instruction operands and the synthesis of macro instructions such as MOVE to hide the peculiarities of the load and store structure of the machines. To keep things concrete, the first part of this manual is specifically about the 68020. At the end is a description of the differences among the other assemblers. Registers All pre-defined symbols in the assembler are upper-case. Data registers are R0 through R7; address registers are A0 through A7; floating-point registers are F0 through F7. A pointer in A6 is used by the C compiler to point to data, enabling short addresses to be used more often. The value of A6 is constant and must be set during C program initialization to the address of the externally-defined symbol a6base. The following hardware registers are defined in the assembler; their meaning should be obvious given a 68020 manual: CAAR, CACR, CCR, DFC, ISP, MSP, SFC, SR, USP, and VBR. The assembler also defines several pseudo-registers that manipulate the stack: FP, SP, and TOS. FP is the frame pointer, so 0(FP) is the first argument, 4(FP) is the second, and so on. SP is the local stack pointer, where automatic variables are held (SP is a pseudo-register only on the 68020); 0(SP) is the first automatic, and so on as with FP.
    [Show full text]
  • Linux User Group HOWTO Linux User Group HOWTO Table of Contents Linux User Group HOWTO
    Linux User Group HOWTO Linux User Group HOWTO Table of Contents Linux User Group HOWTO..............................................................................................................................1 Rick Moen...............................................................................................................................................1 1. Introduction..........................................................................................................................................1 2. What is a GNU/Linux user group?......................................................................................................1 3. What LUGs exist?................................................................................................................................1 4. What does a LUG do?..........................................................................................................................1 5. LUG activities......................................................................................................................................1 6. Practical suggestions............................................................................................................................1 7. Legal and political issues.....................................................................................................................2 8. About this document............................................................................................................................2 1. Introduction..........................................................................................................................................2
    [Show full text]
  • IAR C/C++ Compiler Reference Guide for V850
    IAR Embedded Workbench® IAR C/C++ Compiler Reference Guide for the Renesas V850 Microcontroller Family CV850-9 COPYRIGHT NOTICE © 1998–2013 IAR Systems AB. No part of this document may be reproduced without the prior written consent of IAR Systems AB. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license. DISCLAIMER The information in this document is subject to change without notice and does not represent a commitment on any part of IAR Systems. While the information contained herein is assumed to be accurate, IAR Systems assumes no responsibility for any errors or omissions. In no event shall IAR Systems, its employees, its contractors, or the authors of this document be liable for special, direct, indirect, or consequential damage, losses, costs, charges, claims, demands, claim for lost profits, fees, or expenses of any nature or kind. TRADEMARKS IAR Systems, IAR Embedded Workbench, C-SPY, visualSTATE, The Code to Success, IAR KickStart Kit, I-jet, I-scope, IAR and the logotype of IAR Systems are trademarks or registered trademarks owned by IAR Systems AB. Microsoft and Windows are registered trademarks of Microsoft Corporation. Renesas is a registered trademark of Renesas Electronics Corporation. V850 is a trademark of Renesas Electronics Corporation. Adobe and Acrobat Reader are registered trademarks of Adobe Systems Incorporated. All other product names are trademarks or registered trademarks of their respective owners. EDITION NOTICE Ninth edition: May 2013 Part number: CV850-9 This guide applies to version 4.x of IAR Embedded Workbench® for the Renesas V850 microcontroller family.
    [Show full text]
  • Computer Organization and Architecture Structure
    COMPUTER ORGANIZATION AND ARCHITECTURE Computer Architecture refers to those attributes of a system that have a direct impact on the logical execution of a program. Examples: o the instruction set o the number of bits used to represent various data types o I/O mechanisms o memory addressing techniques Computer Organization refers to the operational units and their interconnections that realize the architectural specifications. Examples are things that are transparent to the programmer: o control signals o interfaces between computer and peripherals o the memory technology being used So, for example, the fact that a multiply instruction is available is a computer architecture issue. How that multiply is implemented is a computer organization issue. • Architecture is those attributes visible to the programmer o Instruction set, number of bits used for data representation, I/O mechanisms, addressing techniques. o e.g. Is there a multiply instruction? • Organization is how features are implemented o Control signals, interfaces, memory technology. o e.g. Is there a hardware multiply unit or is it done by repeated addition? • All Intel x86 family share the same basic architecture • The IBM System/370 family share the same basic architecture • This gives code compatibility o At least backwards • Organization differs between different versions STRUCTURE AND FUNCTION • Structure is the way in which components relate to each other • Function is the operation of individual components as part of the structure • All computer functions are: o Data processing: Computer must be able to process data which may take a wide variety of forms and the range of processing. o Data storage: Computer stores data either temporarily or permanently.
    [Show full text]
  • Processor-Organaization.Pdf
    Computer Architecture Faculty Of Computers And Information Technology Second Term 2019- 2020 Dr.Khaled Kh. Sharaf Computer Architecture Chapter 7 CENTRAL PROCESSING UNIT ORGANIZATION Computer Architecture OBJECTIVES • Overview • Processor Unit • Control Unit • CPU Structure and Function • Arithmetic and Logic Unit • Instruction Formats • Addressing Modes • Data Transfer and Manipulation • RISC and CISC Computer Architecture Overview The part of the computer that performs the bulk of data processing operations is called the Central Processing Unit (CPU) and is the central component of a digital computer. Its purpose is to interpret instruction cycles received from memory and perform arithmetic, logic and control operations with data stored in internal register, memory words and I/O interface units. A CPU is usually divided into two parts namely processor unit (Register Unit and Arithmetic Logic Unit) and control unit. Register Unit Control Unit Arithmetic logic Unit (ALU) Components of CPU Computer Architecture Processor Unit The processor unit consists of arithmetic unit, logic unit, a number of registers and internal buses that provides data path for transfer of information between register and arithmetic logic unit. The block diagram of processor unit is shown in figure where all registers are connected through common buses. The registers communicate each other not only for direct data transfer but also while performing various micro-operations. Here two sets of multiplexers select register which perform input data for ALU. A decoder selects destination register by enabling its load input. The function select in ALU determines the particular operation that to be performed. Processor Unit Computer Architecture Processor Unit For an example to perform the operation: R3 = R1 + R2 1.
    [Show full text]