Professional Documents
Culture Documents
System Software
Application software
used by end-user
System software
text editor, compiler, debugger machine dependent A system software programmer must know the target machine structure
www.chitkara.edu
www.chitkara.edu
www.chitkara.edu
System Software
www.chitkara.edu.in
8-bit bytes 3 consecutive bytes form a word 215 bytes in the computer memory
Registers(each register is 24 bits in length)
Mnemonic Number Special use A 0 Accumulator; used for arithmetic operations X 1 Index register; used for addressing L 2 Linkage register; JSUB PC 8 Program counter SW 9 Status word, including CC
7 www.chitkara.edu.in
Instruction Formats
opcode (8) x address (15)
Addressing Modes
Mode Direct Indexed
8
10
www.chitkara.edu.in
Data movement
No memory-memory move instruction 3-byte word: LDA, STA, LDL, STL, LDX, STX 1-byte: LDCH, STCH Storage definition WORD, RESW BYTE, RESB
11
www.chitkara.edu.in
12
www.chitkara.edu.in
SIC/XE
SIC is upwards compatible with SIC/XE. Memory arranged in bytes (Max = 220 bytes).
Registers
Mnemonic 3 4 5 6 Register B S T F Comment Base Register (for addressing) General Purpose Register General Purpose Register Floating point Accumulator (48-bits)
Data Formats
SIC/XE supports integers and characters in the same manner as SIC.
Instruction Formats
Number of addresses is larger. (220 as compared to 215). Some instructions do not require operands.
Format 1:
Format 2: Format 3: Format 4:
Op (1 byte) Op (1 byte) R1 R2
Op (6 bit)
Op (6 bit)
n i x b p e
n i x b p e
Formats (contd)
n=1, i=0: The word at the target address is the address of the operand. n=0,i=1: The address is used as the operand. n=i: value at address is taken as operand. (backward compatibility with SIC when used in Format 3)
Formats (contd)
b=1,p=0: Implies Base Relative Mode . b=0,p=1: Implies Program Counter Relative Mode.
Addressing Modes
Base Relative: b=1, p=0
Target Address = B + disp
If b=p=0, then the address/disp field is taken as the address. Indexed addressing may be used with both these modes (x=0,1).
Instructions
Instructions to Load/Store new registers
LDB, STB,
Register Instructions
ADDR, SUBR, MULR, DIVR, RMO
I/O instructions
TIO, SIO, HIO
data movement
immediate addressing for SIC/XE Looping (TIXR) (X)=(X)+1 compare with register specified set CC
22
www.chitkara.edu.in
23
www.chitkara.edu.in
24
www.chitkara.edu.in
25
www.chitkara.edu.in
26
www.chitkara.edu.in
System Software
28
www.chitkara.edu.in
VAX Architecture - 1
Virtual Address EXtension
Memory
One half is used for system space The other half is called process space, and is defined for each program
VAX Architecture - 2
16 general purpose registers: R0~R15 each register is 32-bit long R15 (PC): Program Counter R14 (SP): Stack Pointer R13 (FP): Frame Pointer R12 (AP): Argument Pointer R6~R11: general R0~R5: are used by some instructions PSL: process status longword
Registers
Data Formats
Integers: byte, word, longword, quadword, or octaword Negative integers: 2s complement representation
Floating-point: 4~16bytes
packed decimal: (C:positive, D:negative, F:unsigned)
4 4 4 4 4 S
e.g. +53842, 53842C (packed), 35333834C2 (zoned) e.g. -6071, 6071D(packed), 363037D1
VAX Architecture - 4
Instruction Formats
variable -length instruction format
Addressing Modes
register mode register deferred mode autoincrement and autodecrement modes several base relative addressing modes program-counter relative modes indirect addressing mode (called deferred modes) immediate operands
VAX Architecture -5
Instruction Set
Goal: symmetric with respect to data type The instruction mnemonics are formed by a prefix that specifies the type of operation a suffix that specifies the data type of the operands a modifier that gives the number of operands involved e.g. ADDW2, MULL3, CVTWL
Instruction Formats
prefix (optional) containing flags that modify the operation of instruction specify repetition count, segment register, etc. opcode (1 or 2 bytes) operands and addressing modes
Addressing Modes
TA=(base register)+(index register)*(scale factor)+displacement base register: any general-purpose registers index register: any general-purpose registers except ESP scale factor: 1, 2, 4, 8 displacement: 8-, 16-, 32- bit value eight addressing modes
Input is performed by instructions that transfer one byte, word, or doubleword from an I/O register EAX Repetition prefixes allow these instructions to transfer an entire string in a single operation
System Software
RISC Machines
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
RISC system
RISC Machines
Cray T3E
UltraSPARC - 1
Sun Microsystems (1995) SPARC stands for scalable processor architecture SPARC, SuperSPARC, UltraSPARC
Memory Registers Data formats Instruction Formats Addressing Modes
UltraSPARC - 2
Byte addresses
two consecutive bytes form halfword four bytes form a word eight bytes form doubleword
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
UltraSPARC - 3
~100 general-purpose registers any procedure can access only 32 registers (r0~r31) first 8 registers (r0~r8) are global, i.e. they can be access by all procedures on the system (r0 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
Registers
UltraSPARC - 4
integers are 8-, 16-, 32-, 64-bit binary numbers 2s 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)
Data Formats
UltraSPARC - 5
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
UltraSPARC - 6
Addressing Modes
immediate mode register direct mode memory addressing Mode Target address calculation PC-relative* TA= (PC)+displacement {30 bits, signed} Register indirect TA= (register)+displacement {13 bits, signed} with displacement Register indirect indexed TA= (register1)+(register-2) *PC-relative is used only for branch instructions
UltraSPARC - 7
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
UltraSPARC - 8
PowerPC Architecture - 1
History POWER stands for Performance Optimization with Enhanced RISC
IBM (1990) introduced POWER in 1990 with RS/6000 IBM, Apple, and Motorola formed an alliance to develop PowerPC in 1991 The first products were delivered near the end of 1993 Recent implementations include PowerPC 601, 603, 604
PowerPC Architecture - 2
Memory halfword, word, 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, 4KB MMU: virtual address -> physical address
PowerPC Architecture - 3
Registers
32 general-purpose registers, GPR0~GPR31 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)
PowerPC Architecture -4
Data Formats integers are 8-, 16-, 32-, 64-bit binary numbers 2s complement is used for negative values support both big-endian (default) and littleendian 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
PowerPC Architecture - 5
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 x86
PowerPC Architecture - 6
Addressing Modes immediate mode, register direct mode memory addressing Mode Target address calculation Register indirect TA=(register) Register indirect with indexed TA=(register-1)+(register-2) Register indirect with TA=(register)+displacement {16 bits, signed} immediate indexed branch instruction Mode Target address calculation Absolute TA= actual address Relative TA= current instruction address + displacement {25 bits, signed} Link Register TA= (LR) Count Register TA= (CR)
PowerPC Architecture- 7
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 justcomputed target address pipelined execution more sophisticated than SPARC branch prediction
PowerPC Architecture - 8
Scientific computing
T3E
16~2048 processing elements (PE) three-dimensional network each PE consists of a DEC Alpha EV5 RISC microprocessor, local memory, and performanceaccelerating control logic
Local Memory
64MB ~ 2GB physically distributed, logically shared memory byte, word, longword, quadword 64-bit virtual addresses
Registers
Instruction Set
130 machine instructions
no byte or word load and store instructions
System Software
CISC vs RISC
Kuldeep Sharma ,Assistant Professor, CSED, Chitkara University, Himachal Pradesh
66
CISC
Complex Instruction Set Computer
Low level Facilitate the extensive manipulation of low-level computational elements and events such as memory, binary arithmetic, and addressing.
CISC Examples
Examples of CISC processors are the System/360(excluding the 'scientific' Model 44), VAX, PDP-11, Motorola 68000 family Intel x86 architecture based processors.
Pros
Emphasis on hardware Includes multi-clock complex instructions Memory-to-memory:"LOAD" and "STORE are incorporated in instructions Small code sizes, high cycles per second
Cons
That is, the incorporation of older instruction sets into new generations of processors tended to force growing complexity.
Many specialized CISC instructions were not used frequently enough to justify their existence. Because each CISC command must be translated by the processor into tens or even hundreds of lines of microcode, it tends to run slower than an equivalent series of simpler commands that do not require so much translation.
RISC
Reduced Instruction Set Computer Small number of instructions instruction size constant bans the indirect addressing mode retains only those instructions that can be overlapped and made to execute in one machine cycle or less.
RISC Examples
Apple iPods (custom ARM7TDMI SoC) Apple iPhone (Samsung ARM1176JZF) Palm and PocketPC PDAs and smartphones (Intel XScale family, Samsung SC32442 - ARM9) Nintendo Game Boy Advance (ARM7) Nintendo DS (ARM7, ARM9)
Pros
Emphasis on software
Single-clock, reduced instruction only Register to register:"LOAD" and "STORE are independent instructions Low cycles per second, large code sizes
Performance
Performance
The CISC approach attempts to minimize the number of instructions per program, sacrificing the number of cycles per instruction. RISC does the opposite, reducing the cycles per instruction at the cost of the number of instructions per program.