MPIS
MPIS
1. INTRODUCTION
SPARC is an acronym for Scalable Processor ARChitecture
Designed to optimize compilers and pipelined hardware implementations.
Offers fast execution rates.
SPARC, formulated at Sun Microsystems in 1985, is based on the RISC I & II designs
engineered at the University of California at Berkeley from 1980 through1982.
SPARCs are load/store RISC processors. Load/store means only loads and stores access
memory directly.
RISC (Reduced Instruction Set Computer) means the architecture is simplified with a
limited number of instruction formats and addressing modes.
SPARC was designed as a target for optimizing compilers and easily pipelined hardware
implementations.
SPARC implementations provide exceptionally high execution rates and short time-to-
market development schedules.
A SPARC processor logically comprises an integer unit (IU), a floating-point unit (FPU), and
an optional coprocessor (CP), each with its own registers.
All of the registers with the possible exception of the coprocessor’s — are 32 bits wide.
The processor can be in either of two modes: user or supervisor.
1) Supervisor Mode: The processor can execute any instruction, including the
privileged (supervisor-only) instructions.
2) User Mode: An attempt to execute a privileged instruction will cause a trap to
supervisor software. “User application” programs are programs that execute while
the processor is in user mode.
2. FEATURES:
Performance and Economy
Simplified instruction set
Higher number of instructions with fewer transistors
Scalability
Flexible integration of cache, memory and FPUs
Open Architecture
Compatible technology to multiple vendors
Base on RISC Architecture
64-bit addressing and 64-bit data bus
Increased bandwidth
Fault tolerance
Nine stage pipeline; can do up to 4 instructions per cycle
Kishan.K. Govani, EC Department | 2150707 – Microprocessor and Interfacing 1
Unit 9 – SUN SPARC Microprocessor
On-chip 16Kb data and instruct caches with 2Mb external cache
A large “windowed” register file — at any one instant, a program sees 8 global integer
registers plus a 24-register window into a larger register file. The windowed registers can
be described as a cache of procedure arguments, local values, and return addresses.
3. Architecture
The active window is identified by the 5-bit Current Window Pointer (CWP).
Decrementing the CWP at procedure entry causes the next window to become active.
Incrementing the CWP at procedure entry causes the previous window to become active.
Register window overflow and underflow conditions are handled in software by a kernel
trap handler.
The Window Invalid Mask (WIM) can tag any window so that an overflow or underflow
trap is generated whenever the CWP is about to point a tagged window.
ADVANTAGE
Make very fast procedure calls as they avoid the need to save a processor’s current in
memory, further reducing off-chip traffic.
Instead, the state variables are held in the current window, and the next window is opened
for the new procedure.
A refinement on this idea in that the input and output registers of adjacent windows
overlap, allowing variables and parameters to be passed to the next process without
physically moving data.
The additional registers are hidden from view until you call a subroutine or other function.
Where other processors would push parameters on a stack for the called routine to pop off,
SPARC processors just "rotate" the register window to give the called routine a fresh set of
registers.
The old window and the new window overlap, so that some registers are shared.
1. Arithmetic/Logical/Shift instructions
opcode reg1,reg2,reg3 !reg1 op reg2 -> reg3
opcode reg1,const13,reg3 !reg1 op const13 -> reg3
All "action" instructions (add, sub, and, or, etc.) take three operands.
The destination is always the third operand.
The middle operand may be a 13-bit signed constant (-4096...+4095).
Otherwise, all operands are registers.
Examples:
2. Load/Store Instructions
opcode [reg1+reg2],reg3
opcode [reg1+const13],reg3
3. Branch Instructions
opcode address
call printf
be Loop