3-RISC Architecture
3-RISC Architecture
3-RISC Architecture
3. RISC Architecture
18 Marks
Syllabus: The advantages of RISC, Basic features of RISC processors, Hybrid architecture-
RISC and CISC convergence, Design Issues of RISC processors, Features of sun Ultra
SPARC
1. Simple instruction set: in a RISC machine, the instruction set contains simple basic
instructions, from which more complex instructions can be composed. These instructions
with less latency are preferred.
2. Same length instructions: each instruction is of same length, so that it may be fetched in a
single operation. The traditional microprocessors from Intel or Motorola support variable
length instructions.
3. Single machine cycle instruction: most instructions complete in one machine cycle,
which allows the processor to handle several instructions at the same time. RISC processors
have unity CPI (clock per instruction), which is due to optimization of each instruction on the
CPU and massive pipelining embedded in a RISC processor.
4. Pipelining: usually massive pipelining is embedded in a RISC processor. The pipelining is
key to speed up RISC machines.
5. Very few addressing modes and formats: unlike the CISC processors, where the number
of addressing modes is very high. In RISC processors the addressing modes are much less
and it supports few formats.
6. Large number of registers: the RISC design philosophy generally incorporates a larger
number of registers to prevent in large amounts of interactions with memory.
7. Micro-coding is not required: Unlike in CISC machines, in RISC architecture,
instruction micro-coding is not required. This is because of the availability of a set of simple
instructions and simple instructions may be easily built into the hardware.
8. Load and Store architecture: the RISC architecture is primarily a Load and Store
architecture, implying that all the memory accesses takes place using Load and Store type
operations.
5. High level language compilers produce more efficient code in RISC processor than its
counterpart CISC processor, because they tend use the smaller set of instructions in a RISC
computer.
6. Shorter design cycle- a new RISC processor can be designed, developed as tested more
quickly since RISC processors are simpler than corresponding CISC processors.
7. The application programmers who use the microprocessors instructions will find it easier
to develop code with smaller and optimized instructions set.
8. Another advantage is that the loading and decoding of instructions in a RISC processor is
simple and fast, as it is not needed to wait until the length of an instruction is known in order
to start decoding the following one. Decoding is simplified as opcode and address fields are
located in the same position for all instructions.
Intel Pentium III with SSE technology has an additional set of eight 128 bit vector registers
for running SIMD (single instruction multiple data) instructions.
The future successor to Pentium series Intel Itanium IA-64 will even raise the bar further by
implementing 128 general purpose registers.
Many modern RISC processor support more instructions than old CISC designs. Example
Motorola G4 processor used in power Macs and eMacs.
OR
Explain the hybrid architecture (i.e. RISC and CISC) of processors.
Answer:
State of the art processor technology has changed significantly since RISC chips were first
introduced in the early '80s. Because a number of advancements (including the ones
described on this page) are used by both RISC and CISC processors, the lines between the
two architectures have begun to blur.
The two architectures almost seem to have adopted the strategies of the other. Because
processor speeds have increased, CISC chips are now able to execute more than one
instruction within a single clock.
This also allows CISC chips to make use of pipelining.
With other technological improvements, it is now possible to fit many more transistors on a
single chip. This gives RISC processors enough space to incorporate more complicated,
CISC-like commands.
RISC chips also make use of more complicated hardware, making use of extra function units
for superscalar execution.
The two styles have become so similar that distinguishing between them is no longer
relevant. However, it should be noted that RISC chips still retain some important traits.
RISC chips strictly utilize uniform, single-cycle instructions.
They also retain the register-to-register, load/store architecture.
And despite their extended instruction sets, RISC chips still have a large number of general
purpose registers.
The most popular hybrid architecture processors are the Pentium and AMD Athlon family
processors which are compatible with software written for their CISC predecessors.
Modern RISC processors have become CISC like by supporting more functions and support
more instructions than old CISC design.
Using the CISC architecture as more instructions, some applications may be run much faster
such as multimedia applications, such as telecommunications encoding/ decoding , image
conversions and video processing.
2. Memory speed issue Memory speed issues are commonly solved using caches. A cache is
a section of fast memory placed between the processor and slower memory. When the
processor wants to read a location in main memory, that location is also copied into the
cache. Subsequent references to that location can come from the cache, which will return a
result much more quickly than the main memory.
Caches present one major problem to system designers and programmers, and that is the
problem of coherency. When the processor writes a value to memory, the result goes into the
cache instead of going directly to main memory. Therefore, special hardware (usually
implemented as part of the processor) needs to write the information out to main memory
before something else tries to read that location or before re-using that part of the cache for
some different information.
3. Instruction Latency issue A poorly designed instruction set can cause a pipelined
processor to stall frequently. Some of the more common problem areas are:
Highly encoded instructions---such as those used on CISC machines---that require
complex decoders. Those should be avoided.
Variable-length instructions which require multiple references to memory to fetch-in the
entire instruction.
Instructions which access main memory (instead of registers), since main memory can be
slow.
Complex instructions which require multiple clocks for execution (many floating-point
operations, for example.)
Instructions which need to read and write the same register. For example "ADD 5 to
register 3" had to read register 3, add 5 to that value, then write 5 back to the same
register (which may still be "busy" from the earlier read operation, causing the processor
to stall until the register becomes available.)
Dependence on single-point resources such as a condition code register. If one instruction
sets the conditions in the condition code register and the following instruction tries to read
those bits, the second instruction may have to stall until the first instruction's write
completes.
4. Dependencies issues: One problem that RISC programmers face is that the processor can
be slowed down by a poor choice of instructions. Since each instruction takes some amount
of time to store its result, and several instructions are being handled at the same time, later
instructions may have to wait for the results of earlier instructions to be stored. However, a
2) Variable length instructions require multiple references to memory to fetch the entire
instruction should not be considered for inclusion.
3) Instruction which access main memory, instead of register is slow in execution since main
memory is comparatively slow.
4) Complex instruction which require multiple clock for their execution.
1. The reduced hardware requirements of RISC processors leave additional space available
on the chip for the system designer. RISC CPUs generally use this space to include a large
number of registers ( > 100 occasionally).
2. The CPU can access data in registers more quickly than data in memory so having more
registers makes more data available faster. Having more registers also helps reduce the
number of memory references especially when calling and returning from subroutines.
3. The RISC processor may not be able to access all the registers it has at any given time
provided that it has many of it.
4. Most RISC CPUs have some global registers which are always accessible. The remaining
registers are windowed so that only subsets of the registers are accessible at any specific time.
5. To understand how register windows work, we consider the windowing scheme used by
the Sun SPARC processor.
6. The processor can access any of the 32 different registers at a given time. (The instruction
formats for SPARC always use 5 bits to select a source/destination register which can take
any 32 different values.
7. Of these 32 registers, 8 are global registers that are always accessible. The remaining 24
registers are contained in the register window.
8. The register window overlaps. The overlap consists of 8 registers in SPARC CPU. Notice
that the organizations of the windows are supposed to be circular and not linear; meaning that
the last window overlaps with the first window.
9. Example: the last 8 registers of window 1 are also the first 8 registers of window 2.
Similarly, the last 8 registers of window 2 are also the first 8 registers of window 3. The
middle 8 registers of window 2 are local; they are not shared with any other window.
10. The RISC CPU must keep track of which window is active and which windows contain
valid data. A window pointer register contains the value of the window that is currently
active. A window mask register contains 1 bit per window and denotes which windows
contains valid data.
11. Register windows provide their greatest benefit when the CPU calls a subroutine. During
the calling process, the register window is moved down 1 window position. In the SPARC
CPU, if window 1 is active and the CPU calls a subroutine, the processor activates window 2
by updating the window pointer and window mask registers. The CPU can pass parameters to
the subroutine via the registers that overlap both windows instead of memory. This saves a lot
of time when accessing data. The CPU can use the same registers to return results to the
calling routine.
The length of the pipeline is dependent on the length of the longest step. Because RISC
instructions are simpler than those used in pre-RISC processors (now called CISC, or
Complex Instruction Set Computer), they are more conducive to pipelining. While CISC
instructions varied in length, RISC instructions are all the same length and can be fetched in a
single operation. Ideally, each of the stages in a RISC processor pipeline should take 1 clock
cycle so that the processor finishes an execution of every instruction in same time.
Winter 2015
1. a) Attempt any THREE of the following: 12
(iii) List and describe any four features of RISC processor.
Summer 2016
1. Attempt any FIVE of the following: 20
e) What is RISC ? Explain in brief.
f) List any eight features of sun ultra sparc processor.
Winter 2016
1. Answer any FIVE of the following: 20
d) Explain the RISC processor.