Computer Architecture 1DT016: About Microcode with Examples

Total Page:16

File Type:pdf, Size:1020Kb

Computer Architecture 1DT016: About Microcode with Examples About µCode Examples: 8-bit vN CPU Computer Architecture 1DT016 distance Fall 2017 http://xyx.se/1DT016/index.php Per Foyer Mail: [email protected] [email protected] 20172017 1 Microcoded Control Units In assignment 4 you will design your own 8-bit microcoded von Neumann CPU in LogiSim -Hey, I can’t do that!? -Yes you can! -No, it must be too complicated! -Absolutely not. It’s easier than you think! -Ok…(?) [email protected] 2017 2 Control Unit: Execution states Look at the control unit as a sequencer generating control signals for: -Realizing the ISA -Controling the data flow within the CPU Almost like a self-playing piano - What is to be done in each state? - Do we need more states? [email protected] 2017 3 CPU components [email protected] 2017 4 CPU: Registers (High level) • This is registers that are available to the user as part of the ISA • General purpose (GP) registers can consist of descrete (separate individual) registers or of a register bank. • Status registers typically contain flags that are set depending of results after ALU instructions (Z, N, C, …) [email protected] 2017 5 CPU Assembly (user) level • A user doesn’t know anything about whether a CPU is microcoded or not. • What is available to a user is, simply put, a set of machine code instructions together with a set of registers to work with. • The instructions can have different formats and addressing modes [email protected] 2017 6 CPU: Registers (low level) - Not visible to the user (ISA) - Do we need more registers? The memory data register (MDR), the memory address register (MAR) and the I/O control register are the buffer registers closest to the outside world - the data, address and control buses. [email protected] 2017 7 CPU: External interface signals • The clock is, for example, used for clocking the control unit • MREQ (memory request), RD (read) and WR (write) are interface signals to memory and memory mapped I/O • You can of course name the signals to anything you want [email protected] 2017 8 CPU: ALU Status is fed, or taken from, the status register. If the result of an ALU operation is zero the Z-flag is set, if negative the N flag and so forth. [email protected] 2017 9 µControl Unit: Horizontal µ-code Note: This is only an example showing the fundamental principles • Maximum parallelism, given the number of bits from the µROM • Many control lines make it easier to modify the ISA • µROM acts as a sequencer of arbitrary control signals • Easily expanded by adding parallel ROMs • Large ROMs costs expensive silicon die space • Sometimes called Wide µ-code [email protected] 2017 10 µControl Unit: Vertical µ-code Note: This is only an example showing the fundamental principles • Must carefully group signals together so partial parallelism can be guaranteed • Uses less high speed ROM which frees upp space on silicon die • Less flexibility to enhance the ISA • Sometimes called narrow µ-code [email protected] 2017 11 µControl Unit with Lookup table Note: This is only an example showing the fundamental principles • The machine instruction in IR is an index to the Lookup ROM • The value in the Lookup ROM is the start address (set in µPC) for the µ-code corresponding to the machine code in IR [email protected] 2017 12 CPU: microCoded Control Unit [email protected] 2017 13 Sketch: 8-bit vN CPU: Overview [email protected] 2017 14 Sketch: 8-bit vN CPU: Registers This is just an example. You can choose any number of registers and configurations. You are the designer! [email protected] 2017 15 Sketch: 8-bit vN CPU: Buses The external buses have to be Tri-state. High (ones), low (zeroes) or high impedance (”don’t care”, Hi-Z). The latter important so the CPU don’t interfere with other things that are connected to the buses. [email protected] 2017 16 Sketch: 8-bit vN CPU: ISA modes If variable format instructions are used, the first byte may be used as opcode followed by instruction parameters [email protected] 2017 17 Sketch: 8-bit vN CPU: Control Unit Gives an average of 4 micro instructions per Assembly instruction [email protected] 2017 18 Sketch: 8-bit vN CPU: PM This is just an example of a possible memory configuration. Remember that the CPU is to follow the von Neumann architecture which means that program and data can reside anywhere in the ROM: same memory map. •Interrupt and Trap vectors - Easiest to implement as jump instructions to absolute addresses •Resident (non volatile) program and data RAM: Program and Data (Volatile) Unused memory space: Can be used for memory mapped I/O Endian order? Big or Little? (actually doesn’t matter but needs to be decided) [email protected] 2017 19 Sketch: 8-bit vN CPU: ROM Memory Bank 0 0x0000 JMP RESET H …if big endian order L 0x0003 JMP TRAP No need for byte H aligning addresses L - Why? 0x0006 JMP INT H L TRAP can be used for ”software emergencies”, … such when trying to execute an illegal (undefined) 0x1FFF instruction [email protected] 2017 20 Sketch: 8-bit vN CPU: RAM Bank 0 (ROM) 0x2000 … Bank 1 0x3FFF 0x4000 … Bank 2 0x5FFF 0x6000 … Bank 3 0x7FFF 0x8000 … Bank 4 0x9FFF [email protected] 2017 21 Sketch: 8-bit vN CPU: PM: Bank Select Can be used for memory mapped I/O [email protected] 2017 22 Sketch: 8-bit vN CPU: The ISA One way to develop a simple processor ISA is to invent it as one go along writing an initial assembler program. Remember that we are the CPU designers who are free to design an 8-bit processor any way we want! In the hardware world, the equivalent to a ”Hello world” program is to blink a LED to see that a machine code program really can do something. [email protected] 2017 23 Sketch: 8-bit vN CPU: ”Hello world” hardware Remember that the buses ”have no memory” in themself. Therefore we need a latch to store the LED-bit. [email protected] 2017 24 Sketch: 8-bit vN CPU: ISA design Lets say that the following registers will be used in the CPU ISA design. These registers are visible to the user. A and B: 8-bit general purpose (GP) registers I and X: 8-bit registers that can either be used as general purpose registers or combined as a 16-bit index register IX PC: 16-bit program counter F: 8-bit flag register. Stores result bits from ALU operations: Z(ero), N(egative), P(ositive), C(arry) etc. Now mnemonics have to be invented for use in assembler programs. Keep it simple. As the CPU is microcoded, more instructions can be added later without re-designing the hardware. [email protected] 2017 25 Sketch: 8-bit vN CPU: We have no assembler, so the translation from mnemonics to machine code must be done by hand. Decision: Let the CPU work in big endian order Now let’s start creating the program that will blink the LED. Mnemonics and machine code operations are invented and defined as we go along, just as the CPU already existed! [email protected] 2017 26 Sketch: 8-bit vN CPU: Blink LED (1) We need assembly language instructions for writing a program. For now it’s enough to define only 12 machine code instructions. Later we will probably need more CPU registers and instructions. [email protected] 2017 27 Sketch: 8-bit vN CPU: Blink LED (2) First define the trap and interrupt table in our own assembly language [email protected] 2017 28 Sketch: 8-bit vN CPU: Blink LED (3) Only one byte needs to be allocated in RAM for storing LED data [email protected] 2017 29 Sketch: 8-bit vN CPU: Blink LED (4) The program LED-blinking program itself [email protected] 2017 30 Sketch: 8-bit vN CPU: Blink LED (5) Traps and interrupt are probably not designed yet so program execution will then never get here. But it looks good [email protected] 2017 31 Sketch: 8-bit vN CPU: Blink LED (6) Opcodes were defined on a previous slide. It doesn’t matter in what order they are defined. The only thing that is important is that individual instructions have unique opcodes so there will be a one-to-one mapping between opcodes and instructions (mnemonics). Later in the design work, the assembly language opcodes will be used as indexes to the microcode jump table ROM, which in turn will contain indexes to the microcode program ROM inside the control unit like e.g.: Op (8-bit opcode) index to JT ROM (10-bit) address to microcode ROM that contain (16-bit or so) wide microcode words – the actual dimensions are entirely up to the designer! Time to assemble the LED-blinking program into machine code. [email protected] 2017 32 Sketch: 8-bit vN CPU: Blink LED (7) Only 9 bytes of memory necessary for the trap/interrupt vector table… [email protected] 2017 33 Sketch: 8-bit vN CPU: Blink LED (8) …and only 1 byte of RAM for reading and writing temporary data… [email protected] 2017 34 Sketch: 8-bit vN CPU: Blink LED (9) …and 21 bytes of memory for the main program… [email protected] 2017 35 Sketch: 8-bit vN CPU: Blink LED (10) …and finally 6 bytes of memory for the trap/interrupt routines This makes a grand total of a only 37 bytes for everything! Wow! [email protected] 2017 36 Sketch: 8-bit vN CPU: Opcodes As we have seen, our instructions have already a number of properties: •Variable length (1 to 3 bytes) •Different addressing modes: This far: • Jump absolute (3bytes) • Jump absolute on condition (3 bytes) • Register load immediate (2 bytes) • Register load register indirect (1 byte) • Register store register indirect (1 byte) • Register store to absolute address (3 bytes) • ALUop immediate (2 bytes) The first byte in a machine code instruction - the opcode - will be fed as an index to the microcode jump table ROM which points to the corresponding microcode.
Recommended publications
  • Computer Architectures
    Computer Architectures Central Processing Unit (CPU) Pavel Píša, Michal Štepanovský, Miroslav Šnorek The lecture is based on A0B36APO lecture. Some parts are inspired by the book Paterson, D., Henessy, V.: Computer Organization and Design, The HW/SW Interface. Elsevier, ISBN: 978-0-12-370606-5 and it is used with authors' permission. Czech Technical University in Prague, Faculty of Electrical Engineering English version partially supported by: European Social Fund Prague & EU: We invests in your future. AE0B36APO Computer Architectures Ver.1.10 1 Computer based on von Neumann's concept ● Control unit Processor/microprocessor ● ALU von Neumann architecture uses common ● Memory memory, whereas Harvard architecture uses separate program and data memories ● Input ● Output Input/output subsystem The control unit is responsible for control of the operation processing and sequencing. It consists of: ● registers – they hold intermediate and programmer visible state ● control logic circuits which represents core of the control unit (CU) AE0B36APO Computer Architectures 2 The most important registers of the control unit ● PC (Program Counter) holds address of a recent or next instruction to be processed ● IR (Instruction Register) holds the machine instruction read from memory ● Another usually present registers ● General purpose registers (GPRs) may be divided to address and data or (partially) specialized registers ● SP (Stack Pointer) – points to the top of the stack; (The stack is usually used to store local variables and subroutine return addresses) ● PSW (Program Status Word) ● IM (Interrupt Mask) ● Optional Floating point (FPRs) and vector/multimedia regs. AE0B36APO Computer Architectures 3 The main instruction cycle of the CPU 1. Initial setup/reset – set initial PC value, PSW, etc.
    [Show full text]
  • Microprocessor Architecture
    EECE416 Microcomputer Fundamentals Microprocessor Architecture Dr. Charles Kim Howard University 1 Computer Architecture Computer System CPU (with PC, Register, SR) + Memory 2 Computer Architecture •ALU (Arithmetic Logic Unit) •Binary Full Adder 3 Microprocessor Bus 4 Architecture by CPU+MEM organization Princeton (or von Neumann) Architecture MEM contains both Instruction and Data Harvard Architecture Data MEM and Instruction MEM Higher Performance Better for DSP Higher MEM Bandwidth 5 Princeton Architecture 1.Step (A): The address for the instruction to be next executed is applied (Step (B): The controller "decodes" the instruction 3.Step (C): Following completion of the instruction, the controller provides the address, to the memory unit, at which the data result generated by the operation will be stored. 6 Harvard Architecture 7 Internal Memory (“register”) External memory access is Very slow For quicker retrieval and storage Internal registers 8 Architecture by Instructions and their Executions CISC (Complex Instruction Set Computer) Variety of instructions for complex tasks Instructions of varying length RISC (Reduced Instruction Set Computer) Fewer and simpler instructions High performance microprocessors Pipelined instruction execution (several instructions are executed in parallel) 9 CISC Architecture of prior to mid-1980’s IBM390, Motorola 680x0, Intel80x86 Basic Fetch-Execute sequence to support a large number of complex instructions Complex decoding procedures Complex control unit One instruction achieves a complex task 10
    [Show full text]
  • What Do We Mean by Architecture?
    Embedded programming: Comparing the performance and development workflows for architectures Embedded programming week FABLAB BRIGHTON 2018 What do we mean by architecture? The architecture of microprocessors and microcontrollers are classified based on the way memory is allocated (memory architecture). There are two main ways of doing this: Von Neumann architecture (also known as Princeton) Von Neumann uses a single unified cache (i.e. the same memory) for both the code (instructions) and the data itself, Under pure von Neumann architecture the CPU can be either reading an instruction or reading/writing data from/to the memory. Both cannot occur at the same time since the instructions and data use the same bus system. Harvard architecture Harvard architecture uses different memory allocations for the code (instructions) and the data, allowing it to be able to read instructions and perform data memory access simultaneously. The best performance is achieved when both instructions and data are supplied by their own caches, with no need to access external memory at all. How does this relate to microcontrollers/microprocessors? We found this page to be a good introduction to the topic of microcontrollers and ​ ​ microprocessors, the architectures they use and the difference between some of the common types. First though, it’s worth looking at the difference between a microprocessor and a microcontroller. Microprocessors (e.g. ARM) generally consist of just the Central ​ ​ Processing Unit (CPU), which performs all the instructions in a computer program, including arithmetic, logic, control and input/output operations. Microcontrollers (e.g. AVR, PIC or ​ 8051) contain one or more CPUs with RAM, ROM and programmable input/output ​ peripherals.
    [Show full text]
  • Simple Computer Example Register Structure
    Simple Computer Example Register Structure Read pp. 27-85 Simple Computer • To illustrate how a computer operates, let us look at the design of a very simple computer • Specifications 1. Memory words are 16 bits in length 2. 2 12 = 4 K words of memory 3. Memory can be accessed in one clock cycle 4. Single Accumulator for ALU (AC) 5. Registers are fully connected Simple Computer Continued 4K x 16 Memory MAR 12 MDR 16 X PC 12 ALU IR 16 AC Simple Computer Specifications (continued) 6. Control signals • INCPC – causes PC to increment on clock edge - [PC] +1 PC •ACin - causes output of ALU to be stored in AC • GMDR2X – get memory data register to X - [MDR] X • Read (Write) – Read (Write) contents of memory location whose address is in MAR To implement instructions, control unit must break down the instruction into a series of register transfers (just like a complier must break down C program into a series of machine level instructions) Simple Computer (continued) • Typical microinstruction for reading memory State Register Transfer Control Line(s) Next State 1 [[MAR]] MDR Read 2 • Timing State 1 State 2 During State 1, Read set by control unit CLK - Data is read from memory - MDR changes at the Read beginning of State 2 - Read is completed in one clock cycle MDR Simple Computer (continued) • Study: how to write the microinstructions to implement 3 instructions • ADD address • ADD (address) • JMP address ADD address: add using direct addressing 0000 address [AC] + [address] AC ADD (address): add using indirect addressing 0001 address [AC] + [[address]] AC JMP address 0010 address address PC Instruction Format for Simple Computer IR OP 4 AD 12 AD = address - Two phases to implement instructions: 1.
    [Show full text]
  • Programming Model, Address Mode, HC12 Hardware Introduction
    EEL 4744C: Microprocessor Applications Lecture 2 Programming Model, Address Mode, HC12 Hardware Introduction Dr. Tao Li 1 Reading Assignment • Microcontrollers and Microcomputers: Chapter 3, Chapter 4 • Software and Hardware Engineering: Chapter 2 Or • Software and Hardware Engineering: Chapter 4 Plus • CPU12 Reference Manual: Chapter 3 • M68HC12B Family Data Sheet: Chapter 1, 2, 3, 4 Dr. Tao Li 2 EEL 4744C: Microprocessor Applications Lecture 2 Part 1 CPU Registers and Control Codes Dr. Tao Li 3 CPU Registers • Accumulators – Registers that accumulate answers, e.g. the A Register – Can work simultaneously as the source register for one operand and the destination register for ALU operations • General-purpose registers – Registers that hold data, work as source and destination register for data transfers and source for ALU operations • Doubled registers – An N-bit CPU in general uses N-bit data registers – Sometimes 2 of the N-bit registers are used together to double the number of bits, thus “doubled” registers Dr. Tao Li 4 CPU Registers (2) • Pointer registers – Registers that address memory by pointing to specific memory locations that hold the needed data – Contain memory addresses (without offset) • Stack pointer registers – Pointer registers dedicated to variable data and return address storage in subroutine calls • Index registers – Also used to address memory – An effective memory address is found by adding an offset to the content of the involved index register Dr. Tao Li 5 CPU Registers (3) • Segment registers – In some architectures, memory addressing requires that the physical address be specified in 2 parts • Segment part: specifies a memory page • Offset part: specifies a particular place in the page • Condition code registers – Also called flag or status registers – Hold condition code bits generated when instructions are executed, e.g.
    [Show full text]
  • The Birth, Evolution and Future of Microprocessor
    The Birth, Evolution and Future of Microprocessor Swetha Kogatam Computer Science Department San Jose State University San Jose, CA 95192 408-924-1000 [email protected] ABSTRACT timed sequence through the bus system to output devices such as The world's first microprocessor, the 4004, was co-developed by CRT Screens, networks, or printers. In some cases, the terms Busicom, a Japanese manufacturer of calculators, and Intel, a U.S. 'CPU' and 'microprocessor' are used interchangeably to denote the manufacturer of semiconductors. The basic architecture of 4004 same device. was developed in August 1969; a concrete plan for the 4004 The different ways in which microprocessors are categorized are: system was finalized in December 1969; and the first microprocessor was successfully developed in March 1971. a) CISC (Complex Instruction Set Computers) Microprocessors, which became the "technology to open up a new b) RISC (Reduced Instruction Set Computers) era," brought two outstanding impacts, "power of intelligence" and "power of computing". First, microprocessors opened up a new a) VLIW(Very Long Instruction Word Computers) "era of programming" through replacing with software, the b) Super scalar processors hardwired logic based on IC's of the former "era of logic". At the same time, microprocessors allowed young engineers access to "power of computing" for the creative development of personal 2. BIRTH OF THE MICROPROCESSOR computers and computer games, which in turn led to growth in the In 1970, Intel introduced the first dynamic RAM, which increased software industry, and paved the way to the development of high- IC memory by a factor of four.
    [Show full text]
  • The Von Neumann Computer Model 5/30/17, 10:03 PM
    The von Neumann Computer Model 5/30/17, 10:03 PM CIS-77 Home http://www.c-jump.com/CIS77/CIS77syllabus.htm The von Neumann Computer Model 1. The von Neumann Computer Model 2. Components of the Von Neumann Model 3. Communication Between Memory and Processing Unit 4. CPU data-path 5. Memory Operations 6. Understanding the MAR and the MDR 7. Understanding the MAR and the MDR, Cont. 8. ALU, the Processing Unit 9. ALU and the Word Length 10. Control Unit 11. Control Unit, Cont. 12. Input/Output 13. Input/Output Ports 14. Input/Output Address Space 15. Console Input/Output in Protected Memory Mode 16. Instruction Processing 17. Instruction Components 18. Why Learn Intel x86 ISA ? 19. Design of the x86 CPU Instruction Set 20. CPU Instruction Set 21. History of IBM PC 22. Early x86 Processor Family 23. 8086 and 8088 CPU 24. 80186 CPU 25. 80286 CPU 26. 80386 CPU 27. 80386 CPU, Cont. 28. 80486 CPU 29. Pentium (Intel 80586) 30. Pentium Pro 31. Pentium II 32. Itanium processor 1. The von Neumann Computer Model Von Neumann computer systems contain three main building blocks: The following block diagram shows major relationship between CPU components: the central processing unit (CPU), memory, and input/output devices (I/O). These three components are connected together using the system bus. The most prominent items within the CPU are the registers: they can be manipulated directly by a computer program. http://www.c-jump.com/CIS77/CPU/VonNeumann/lecture.html Page 1 of 15 IPR2017-01532 FanDuel, et al.
    [Show full text]
  • MIPS IV Instruction Set
    MIPS IV Instruction Set Revision 3.2 September, 1995 Charles Price MIPS Technologies, Inc. All Right Reserved RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure of the technical data contained in this document by the Government is subject to restrictions as set forth in subdivision (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.227-7013 and / or in similar or successor clauses in the FAR, or in the DOD or NASA FAR Supplement. Unpublished rights reserved under the Copyright Laws of the United States. Contractor / manufacturer is MIPS Technologies, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. R2000, R3000, R6000, R4000, R4400, R4200, R8000, R4300 and R10000 are trademarks of MIPS Technologies, Inc. MIPS and R3000 are registered trademarks of MIPS Technologies, Inc. The information in this document is preliminary and subject to change without notice. MIPS Technologies, Inc. (MTI) reserves the right to change any portion of the product described herein to improve function or design. MTI does not assume liability arising out of the application or use of any product or circuit described herein. Information on MIPS products is available electronically: (a) Through the World Wide Web. Point your WWW client to: http://www.mips.com (b) Through ftp from the internet site “sgigate.sgi.com”. Login as “ftp” or “anonymous” and then cd to the directory “pub/doc”. (c) Through an automated FAX service: Inside the USA toll free: (800) 446-6477 (800-IGO-MIPS) Outside the USA: (415) 688-4321 (call from a FAX machine) MIPS Technologies, Inc.
    [Show full text]
  • Advanced Computer Architecture
    Computer Architecture MTIT C 103 MIPS ISA and Processor Compiled By Afaq Alam Khan Introduction The MIPS architecture is one example of a RISC architecture The MIPS architecture is a register architecture. All arithmetic and logical operations involve only registers (or constants that are stored as part of the instructions). The MIPS architecture also includes several simple instructions for loading data from memory into registers and storing data from registers in memory; for this reason, the MIPS architecture is called a load/store architecture Register ◦ MIPS has 32 integer registers ($0, $1, ....... $30, $31) and 32 floating point registers ($f0, $f1, ....... $f30, $f31) ◦ Size of each register is 32 bits The $k0, $K1, $at, and $gp registers are reserved for os, assembler and global data And are not used by the programmer Miscellaneous Registers ◦ $PC: The $pc or program counter register points to the next instruction to be executed and is automatically updated by the CPU after instruction are executed. This register is not typically accessed directly by user programs ◦ $Status: The $status or status register is the processor status register and is updated after each instruction by the CPU. This register is not typically directly accessed by user programs. ◦ $cause: The $cause or exception cause register is used by the CPU in the event of an exception or unexpected interruption in program control flow. Examples of exceptions include division by 0, attempting to access in illegal memory address, or attempting to execute an invalid instruction (e.g., trying to execute a data item instead of code). ◦ $hi / $lo : The $hi and $lo registers are used by some specialized multiply and divide instructions.
    [Show full text]
  • Hardware Architecture
    Hardware Architecture Components Computing Infrastructure Components Servers Clients LAN & WLAN Internet Connectivity Computation Software Storage Backup Integration is the Key ! Security Data Network Management Computer Today’s Computer Computer Model: Von Neumann Architecture Computer Model Input: keyboard, mouse, scanner, punch cards Processing: CPU executes the computer program Output: monitor, printer, fax machine Storage: hard drive, optical media, diskettes, magnetic tape Von Neumann architecture - Wiki Article (15 min YouTube Video) Components Computer Components Components Computer Components CPU Memory Hard Disk Mother Board CD/DVD Drives Adaptors Power Supply Display Keyboard Mouse Network Interface I/O ports CPU CPU CPU – Central Processing Unit (Microprocessor) consists of three parts: Control Unit • Execute programs/instructions: the machine language • Move data from one memory location to another • Communicate between other parts of a PC Arithmetic Logic Unit • Arithmetic operations: add, subtract, multiply, divide • Logic operations: and, or, xor • Floating point operations: real number manipulation Registers CPU Processor Architecture See How the CPU Works In One Lesson (20 min YouTube Video) CPU CPU CPU speed is influenced by several factors: Chip Manufacturing Technology: nm (2002: 130 nm, 2004: 90nm, 2006: 65 nm, 2008: 45nm, 2010:32nm, Latest is 22nm) Clock speed: Gigahertz (Typical : 2 – 3 GHz, Maximum 5.5 GHz) Front Side Bus: MHz (Typical: 1333MHz , 1666MHz) Word size : 32-bit or 64-bit word sizes Cache: Level 1 (64 KB per core), Level 2 (256 KB per core) caches on die. Now Level 3 (2 MB to 8 MB shared) cache also on die Instruction set size: X86 (CISC), RISC Microarchitecture: CPU Internal Architecture (Ivy Bridge, Haswell) Single Core/Multi Core Multi Threading Hyper Threading vs.
    [Show full text]
  • IBM Z/Architecture Reference Summary
    z/Architecture IBMr Reference Summary SA22-7871-06 . z/Architecture IBMr Reference Summary SA22-7871-06 Seventh Edition (August, 2010) This revision differs from the previous edition by containing instructions related to the facilities marked by a bar under “Facility” in “Preface” and minor corrections and clari- fications. Changes are indicated by a bar in the margin. References in this publication to IBM® products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM program product in this publication is not intended to state or imply that only IBM’s program product may be used. Any functionally equivalent pro- gram may be used instead. Additional copies of this and other IBM publications may be ordered or downloaded from the IBM publications web site at http://www.ibm.com/support/documentation. Please direct any comments on the contents of this publication to: IBM Corporation Department E57 2455 South Road Poughkeepsie, NY 12601-5400 USA IBM may use or distribute whatever information you supply in any way it believes appropriate without incurring any obligation to you. © Copyright International Business Machines Corporation 2001-2010. All rights reserved. US Government Users Restricted Rights — Use, duplication, or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. ii z/Architecture Reference Summary Preface This publication is intended primarily for use by z/Architecture™ assembler-language application programmers. It contains basic machine information summarized from the IBM z/Architecture Principles of Operation, SA22-7832, about the zSeries™ proces- sors. It also contains frequently used information from IBM ESA/390 Common I/O- Device Commands and Self Description, SA22-7204, IBM System/370 Extended Architecture Interpretive Execution, SA22-7095, and IBM High Level Assembler for MVS & VM & VSE Language Reference, SC26-4940.
    [Show full text]
  • The Central Processor Unit
    Systems Architecture The Central Processing Unit The Central Processing Unit – p. 1/11 The Computer System Application High-level Language Operating System Assembly Language Machine level Microprogram Digital logic Hardware / Software Interface The Central Processing Unit – p. 2/11 CPU Structure External Memory MAR: Memory MBR: Memory Address Register Buffer Register Address Incrementer R15 / PC R11 R7 R3 R14 / LR R10 R6 R2 R13 / SP R9 R5 R1 R12 R8 R4 R0 User Registers Booth’s Multiplier Barrel IR Shifter Control Unit CPSR 32-Bit ALU The Central Processing Unit – p. 3/11 CPU Registers Internal Registers Condition Flags PC Program Counter C Carry IR Instruction Register Z Zero MAR Memory Address Register N Negative MBR Memory Buffer Register V Overflow CPSR Current Processor Status Register Internal Devices User Registers ALU Arithmetic Logic Unit Rn Register n CU Control Unit n = 0 . 15 M Memory Store SP Stack Pointer MMU Mem Management Unit LR Link Register Note that each CPU has a different set of User Registers The Central Processing Unit – p. 4/11 Current Process Status Register • Holds a number of status flags: N True if result of last operation is Negative Z True if result of last operation was Zero or equal C True if an unsigned borrow (Carry over) occurred Value of last bit shifted V True if a signed borrow (oVerflow) occurred • Current execution mode: User Normal “user” program execution mode System Privileged operating system tasks Some operations can only be preformed in a System mode The Central Processing Unit – p. 5/11 Register Transfer Language NAME Value of register or unit ← Transfer of data MAR ← PC x: Guard, only if x true hcci: MAR ← PC (field) Specific field of unit ALU(C) ← 1 (name), bit (n) or range (n:m) R0 ← MBR(0:7) Rn User Register n R0 ← MBR num Decimal number R0 ← 128 2_num Binary number R1 ← 2_0100 0001 0xnum Hexadecimal number R2 ← 0x40 M(addr) Memory Access (addr) MBR ← M(MAR) IR(field) Specified field of IR CU ← IR(op-code) ALU(field) Specified field of the ALU(C) ← 1 Arithmetic and Logic Unit The Central Processing Unit – p.
    [Show full text]