RISC and CISC (MIC008E)

Readers working with data-processing devices may have heard of RISC and CISC. If you still do not know what is its importance in the choosing, this article is old but still valid and can teach you a lot.

Taking into account that a good part of our readers are not sufficiently familiar with the architecture of the computers and the

Digital Electronics and that many students accompany our articles we will try to be quite didactic in our explanations.

This does not mean, however, that our article is not useful for more advanced readers.

Remember that no one knows everything about a certain subject and even an article with didactic purpose or that teaches something that we think we totally dominate can bring new knowledge and recycle old ones.

Thus, this article is also intended for specialists who wish to recycle their knowledge or still miss something that may not have been taught them when they studied the subject.

 

THE COMPUTER ARCHITECTURE

All processing activity of a computer is made by the CPU consisting of a hardware element included in the microprocessor circuit.

The purpose of the CPU is to perform arithmetic operations, logical operations, and do the signal test of a value.

In Figure 1 we show the block diagram of a typical CPU as found in microprocessors.

 

   Figure 1 - Block diagram of a typical microprocessor
Figure 1 - Block diagram of a typical microprocessor

 

 

In the CPU we also find control circuits responsible for the synchronized operation of all the devices used in the computer.

Thus, we can say that the control circuits of the CPU are intended to search and transfer to the CPU the machine instruction to be executed, interpret the instruction in order to identify which operation must be done and produce the synchronism and control signals that the Execution of the operation requires.

See then that we come to a keyword: instruction.

The computer performs operations ordered according to a program, according to what we want it to do.

These ordered operations are called instructions.

 

THE MACHINE INSTRUCTION

The instruction term was first used in a more specific way to characterize the operation of a computer by John Von Newmann in 1945 from the following statements that defined the operability of a computer:

 

To be operational a computer must:

 

A) Pre-store a program in the form of sequential instructions in a main memory area.

 

B) Execute the instructions one by one in sequence, using the CPU. After executing each instruction, the next one must be searched in a memory, as well as the data that will be used by it.

 

C) Be able to make changes in the instruction execution sequence by another appropriate instruction capable of determining the diversion of the sequence.

 

D) Be able to maintain or change the sequence of the program execution.

 

When microprocessor manufacturers design a new drive, they set out some basic characteristics that will determine what the machine will do and where it will be used.

One of these characteristics, very important, is the format, type of quantity of machine instructions that can be executed by the CPU.

The set of instructions that each CPU can perform is called lnstruction Set.

Note that the machine instructions that characterize a CPU of a microprocessor can be directly interpreted by the circuits being a characteristic of each type.

 

INSTRUCTIONS AND COMMANDS

When a microprocessor is used in a microcomputer to perform some type of work, such as running an accounting program, it operates by commands that are nothing more than equivalent instructions.

These commands appear in high-level languages ??such as Pascal, C, Basic, etc. And in reality it can not be interpreted directly by the microprocessor circuits.

These commands need to be translated or translated into machine instructions in a process called compilation or interpretation.

This means that for every operation we "order" the computer to do, depending on its complexity, several instructions need to be executed by the CPU.

 

For example, if we want to calculate X = A x B - C + D, this simple

Command, actually needs to be transformed into three instructions that are:

 

1. Multiply the value stored in A by the value stored in B. The result must be stored in X.

 

2. Subtract the value stored in C from the value stored in X and save the result to X (deleting what was before).

 

3. Add the value stored in X with the value stored in D and save the final value in X as a result of the command.

 

QUANTITY OF INSTRUCTIONS

Of course we might think that the more different types of instructions a microprocessor can perform, the better it will be.

Memories are slow devices, and much of what you can gain in processing speed is lost in accessing the databases.

 

In the first microcomputers the basic instructions that the CPU could execute were simple as:

- Add two values

- Subtract two values

- Perform a logical operation of type AND, NAND, OR or NOR

 

Over time, however, requiring more and more powerful machines, circuits for the execution of increasingly complex instructions were added to the chip, making the "instruction set" grow.

Of course, having a more powerful microprocessor is always very interesting for computer designers, but there is a problem to be considered: the circuits which perform the specific instructions must be manufactured on the chip itself and the greater its complexity or complexity of the instruction to be performed, more space they occupy.

Then it comes the moment when we have a set of instructions so great that it affects performance or the possibility of increasing other important functions of the same chip as the registers, control circuits, etc.

Is a lot of instructions really important for the performance of a computer?

 

RISC or CISC

IBM's lab did an analysis of how the instructions were being used by computers in the various types of applications and what they found was quite interesting.

It was found, for example, that for a computer with a microprocessor using a set with 200 instructions, most of the processing used only about 10 of them.

There were a lot of very unused instructions and sometimes even a single run in a long program.

And, more than that: it was found that the non-executed instructions could be implemented using the most commonly used basic instructions.

For example, you do not need to aggregate a specific statement to extract the square root of a value: you can find the square root of this value, using the multiplication and comparison a number of times.

It is how we do "in our heads" when we want to find the root of a number: we experience a value and multiply it by itself.

If the value exceeds the desired number, we experience a smaller value, and if we do not reach it, we experience a higher value.

With this procedure executed a few times we can find the desired root.

In other words, using fewer instructions, the microprocessor would not lose its ability to process or perform certain operations because they could be easily replaced by an external procedure using the existing instructions.

To differentiate computers with a more complex instruction set or Complex lnstruction Set Computer (CISC), IBM's John Cocke has announced a new architecture with fewer instructions or a reduced set of instructions, Reduced lnstruction Set Resulting (RISC).

 

THE ADVANTAGES OF RISC

As we have seen all the operation of the microprocessor is based on the execution of instructions.

But the instructions themselves do not consist of a single CPU operation. Each instruction involves a series of small procedures or steps called microcodes.

These microcodes can be used to perform several different instructions and a well-designed microprocessor takes full advantage of its performance using good microcodes.

The basic idea of the microcode comes from Maurice Wilkes from the University of Cambridge and consists of the placement of a microprocessor of a lower layer kind which performs these secondary instructions invisibly.

It is as if there is a nanoprocessor inside the microprocessor, allowing the chip to be designed independently of the instructions it wishes to perform.

This also means that it is possible to change the microcode even after the design of the microprocessor has been developed, which is much easier to correct an error than if the microprocessor itself had to be redesigned.

However, the disadvantage of using the microcode is in the decrease in performance caused by the existence of a second microprocessor within the first circuit.

Transferring signals from one to another means more steps and this slows down the execution of instructions.

However by going back to RISC and CISC, we can not exactly define a limit to the amount of instructions from a microprocessor set that indicates the passage from RISC to ClSC.

This happens not only because there is a reduced amount of instructions that characterizes this type of microprocessor, but rather the way they are executed, that is, the elimination of the microcode, the increasing speed in the use of the most used instructions and a relationship between the machine and the optimized compiler design.

Another feature of using RISC is in the fact that each instruction can be designed to perform a single function and all operate more evenly by working similarly.

 

 

 

 

 


Circuit Bench