RISC Machines l RISC system instruction standard fixed

  • Slides: 25
Download presentation
RISC Machines l RISC system » instruction – – – standard, fixed instruction format

RISC Machines l RISC system » instruction – – – standard, fixed instruction format single-cycle execution of most instructions memory access is available only for load and store instruction other instructions are register-to-register operations a small number of machine instructions, and instruction format » a large number of general-purpose registers » a small number of addressing modes 1

RISC Machines l Three RISC machines » SPARC family » Power. PC family »

RISC Machines l Three RISC machines » SPARC family » Power. PC family » Cray T 3 E 2

Ultra. SPARC (1/8) l l l Sun Microsystems (1995) SPARC stands for scalable processor

Ultra. SPARC (1/8) l l l Sun Microsystems (1995) SPARC stands for scalable processor architecture SPARC, Super. SPARC, Ultra. SPARC » » » Memory Registers Data formats Instruction Formats Addressing Modes 3

Ultra. SPARC (2/8) l Byte addresses » two consecutive bytes form halfword » four

Ultra. SPARC (2/8) l Byte addresses » two consecutive bytes form halfword » four bytes form a word » eight bytes form doubleword l Alignment » halfword are stored in memory beginning at byte address that are multiples of 2 » words begin at addresses that are multiples of 4 » doublewords at addresses that are multiples of 8 l Virtual address space » Ultra. SPARC programs can be written using 264 bytes » Memory Management Unit 4

Ultra. SPARC (3/8) l Registers » ~100 general-purpose registers » any procedure can access

Ultra. SPARC (3/8) l Registers » ~100 general-purpose registers » any procedure can access only 32 registers (r 0~r 31) – first 8 registers (r 0~r 8) are global, i. e. they can be access by all procedures on the system (r 0 is zero) – other 24 registers can be visualized as a window through which part of the register file can be seen » program counter (PC) – the address of the next instruction to be executed » condition code registers » other control registers 5

Ultra. SPARC (4/8) l Data Formats » integers are 8 -, 16 -, 32

Ultra. SPARC (4/8) l Data Formats » integers are 8 -, 16 -, 32 -, 64 -bit binary numbers » 2’s complement is used for negative values » support both big-endian and little-endian byte orderings – (big-endian means the most significant part of a numeric value is stored at the lowest-numbered address) » three different floating-point data formats – single-precision, 32 bits long (23 + 8 + 1) – double-precision, 64 bits long (52 + 11 + 1) – quad-precision, 78 bits long (63 + 16 + 1) 6

Ultra. SPARC (5/8) l Three Instruction Formats » » » 32 bits long the

Ultra. SPARC (5/8) l Three Instruction Formats » » » 32 bits long the first 2 bits identify which format is being used Format 1: call instruction Format 2: branch instructions Format 3: remaining instructions 7

Ultra. SPARC (6/8) l Addressing Modes » immediate mode » register direct mode »

Ultra. SPARC (6/8) l Addressing Modes » immediate mode » register direct mode » memory addressing Mode Target address calculation PC-relative* Register indirect with displacement Register indirect indexed TA= (PC)+displacement {30 bits, signed} TA= (register)+displacement {13 bits, signed} TA= (register-1)+(register-2) *PC-relative is used only for branch instructions 8

Ultra. SPARC (7/8) l Instruction Set » <100 instructions » pipelined execution – while

Ultra. SPARC (7/8) l Instruction Set » <100 instructions » pipelined execution – while one instruction is being executed, the next one is fetched from memory and decoded » delayed branches – the instruction immediately following the branch instruction is actually executed before the branch is taken » special-purpose instructions – high-bandwidth block load and store operations – special “atomic” instructions to support multi-processor system 9

Ultra. SPARC (8/8) l Input and Output » a range of memory locations is

Ultra. SPARC (8/8) l Input and Output » a range of memory locations is logically replaced by device registers » each I/O device has a unique address, or set of addresses » no special I/O instructions are needed 10

Power. PC Architecture (1/8) l l POWER stands for Performance Optimization with Enhanced RISC

Power. PC Architecture (1/8) l l POWER stands for Performance Optimization with Enhanced RISC History » IBM (1990) introduced POWER in 1990 with RS/6000 » IBM, Apple, and Motorola formed an alliance to develop Power. PC in 1991 » The first products were delivered near the end of 1993 » Recent implementations include Power. PC 601, 603, 604 11

Power. PC Architecture (2/8) l Memory » halfword, doubleword, quadword » may instructions may

Power. PC Architecture (2/8) l Memory » halfword, doubleword, quadword » may instructions may execute more efficiently if operands are aligned at a starting address that is a multiple of their length » virtual space 264 bytes » fixed-length segments, 256 MB » fixed-length pages, 4 KB » MMU: virtual address -> physical address 12

Power. PC Architecture (3/8) l Registers » 32 general-purpose registers, GPR 0~GPR 31 »

Power. PC Architecture (3/8) l Registers » 32 general-purpose registers, GPR 0~GPR 31 » FPU » condition code register reflects the result of certain operations, and can be used as a mechanism for testing and branching » Link Register (LR) and Count Register (CR) are used by some branch instructions » Machine Status Register (MSR) 13

Power. PC Architecture (4/8) l Data Formats » integers are 8 -, 16 -,

Power. PC Architecture (4/8) l Data Formats » integers are 8 -, 16 -, 32 -, 64 -bit binary numbers » 2’s complement is used for negative values » support both big-endian (default) and little-endian byte orderings » three different floating-point data formats – single-precision, 32 bits long (23 + 8 + 1) – double-precision, 64 bits long (52 + 11 + 1) » characters are stored using 8 -bit ASCII codes 14

Power. PC Architecture (5/8) l Seven Instruction Formats » » » 32 bits long

Power. PC Architecture (5/8) l Seven Instruction Formats » » » 32 bits long the first 6 bits identify specify the opcode some instruction have an additional extended opcode the complexity is greater than SPARC fixed-length makes decoding faster and simple than VAX and x 86 15

Power. PC Architecture (6/8) l Addressing Modes » immediate mode, register direct mode »

Power. PC Architecture (6/8) l Addressing Modes » immediate mode, register direct mode » memory addressing Mode Register indirect Target address calculation Register indirect with indexed Register indirect with immediate indexed TA=(register) TA=(register-1)+(register-2) TA=(register)+displacement {16 bits, signed} » branch instruction » Mode Absolute Relative Link Register Count Register Target address calculation TA= actual address TA= current instruction address + displacement {25 bits, signed} TA= (LR) TA= (CR) 16

Power. PC Architecture (7/8) l Instruction Set » 200 machine instructions – more complex

Power. PC Architecture (7/8) l Instruction Set » 200 machine instructions – more complex than most RISC machines – e. g. floating-point “multiply and add” instructions that take three input operands – e. g. load and store instructions may automatically update the index register to contain the just-computed target address » pipelined execution – more sophisticated than SPARC » branch prediction 17

Power. PC Architecture (8/8) l Input and Output » two different modes – direct-store

Power. PC Architecture (8/8) l Input and Output » two different modes – direct-store segment: map virtual address space to an external address space – normal virtual memory access 18

Cray T 3 E Architecture (1/8) l l Cray Research, Inc. (1995) Massively parallel

Cray T 3 E Architecture (1/8) l l Cray Research, Inc. (1995) Massively parallel processing system (MPP) Scientific computing T 3 E » 16~2048 processing elements (PE) » three-dimensional network » each PE consists of a DEC Alpha EV 5 RISC microprocessor, local memory, and performance-accelerating control logic 19

Cray T 3 E Architecture (2/8) l Local Memory » » 64 MB ~

Cray T 3 E Architecture (2/8) l Local Memory » » 64 MB ~ 2 GB physically distributed, logically shared memory byte, word, longword, quadword 64 -bit virtual addresses 20

Cray T 3 E Architecture (3/8) l Registers » 32 general-purpose registers, GPR 0~GPR

Cray T 3 E Architecture (3/8) l Registers » 32 general-purpose registers, GPR 0~GPR 31 » 32 floating-point registers, F 0~F 31 – F 31 always contain the value zero » program counter PC » other status and control registers 21

Cray T 3 E Architecture (4/8) l Data Formats » two different types of

Cray T 3 E Architecture (4/8) l Data Formats » two different types of floating-point data formats – one for compatibility with VAX – the other for IEEE standard formats » characters are stored using 8 -bit ASCII codes – since there are no byte load or store operations, characters that are to be manipulated separately are usually stored one per longword 22

Cray T 3 E Architecture (5/8) l Five Basic Instruction Formats » 32 bits

Cray T 3 E Architecture (5/8) l Five Basic Instruction Formats » 32 bits long » the first 6 bits identify specify the opcode » some instruction have an additional function field 23

Cray T 3 E Architecture (6/8) l Addressing Modes » immediate mode, register direct

Cray T 3 E Architecture (6/8) l Addressing Modes » immediate mode, register direct mode » memory addressing Mode Target address calculation PC-relative Register indirect with displacement TA=(PC)+displacement {23 bits, signed} TA=(register)+displacement {16 bits, signed} » register indirect with displacement mode is used for load and store operations and for subrountine jumps » PC-relative mode is used for conditional and unconditional branches 24

Cray T 3 E Architecture (7/8) l Instruction Set » 130 machine instructions –

Cray T 3 E Architecture (7/8) l Instruction Set » 130 machine instructions – no byte or word load and store instructions 25