INSTRUCTION SET DESIGN

September 10, 2011 Leave a comment

INSTRUCTION SET DESIGN

A computer must be able to perform all the computable functions. For this it uses different types of instructions, which are collectively called as instruction set

Instruction set design is the most interesting, analyzed aspect of computer design. It affects many aspects of the computer system and is a tough task, so it must designed very carefully.

The following are the most important fundamental design issues in instruction design.

(i) Operation Repertoire : This issue is concerned with how many and which operations are to be provided, and how complex operations should be

(ii) Data Types : This issue deals with the various types of data upon which operations are performed.

(iii) Instruction Format : This issue is concerned with instruction length (in bits), number of addresses, size of various fields and so on.

(iv) Registers : This is concerned with the number of registers that can be referenced by instructions, and their use.

(v Addressing: This issue is concerned with the mode or modes by which the address of an operand is specified.

These fundamental issues are interrelated with each other and so they must be considered together while designing an instruction set.

Classification of Instructions Based on CPU Organisations

September 10, 2011 Leave a comment

Classification of Instructions Based on CPU Organisations

Computers may have instructions of several different lengths containing varying number of  addresses. The number of address fields in the instruction format of a computer depends on the internal organization of its registers. Most computers fall into one of the three types of CPU organizations:

(i) Single Accumulator Organization: In this type of organization all operations are performed on an implied accumulator. The instruction format uses only one address field. For example, the instruction that loads the accumulator with the contents of a memory location.

LoadX

Where X is the address of the source operand. This results in the operation AC ÷— M (X). AC is the accumulator and M(X) symbolizes the memory word located at address X.

(ii) General Register Organisation : In this organization, the instruction format needs 2 or 3 register address fields according to the operation.

For example, an instruction for addition may be written as

ADD R1, R2, R3,

It denotes the operation R1 <—R2 -f- R3

The same ADD instruction needs only two register address fields if the destination register is one of the source registers, i.e. if the operation is

R1 R1 + R2

Then the instruction is ADD R1, R2

The instruction may also contain one memory address field and one register address field. For example, the instruction,

ADD R1, X

Specifies the operation R1 —R1 + M [X]

(iii) Stack Organization : In this organization, the computers will have PUSH and POP instructions which require an address field. For Kathplê, the instruction PUSH X will push the word at address Xonto the top of the stack. The operation — type instructions do not need any address field. For example, the instruction

ADD

Consists of only opcode and no address field. It has the effect of popping the top two numbers from the stack, adding them, and pushing the sum onto the stack. Thus all the operands are implied to be in the stack.

Most of the computers fall into one of the above three types of organizations. Some computers combine features from more than one organizational structure.

SOURCE AND RESULT OPERANDS AND INSTRUCTION FORMAT

September 10, 2011 Leave a comment

Source and Result operands can be in any of the areas.

(i) Main or Virtual Memory : The source operand may be present in the memory and the result operand may need to be stored in memory or in virtual memory.

(ii) CPU Register: A CPU can contain one or more registers, and these can be referenced by machine instructions. If only one register exists, its reference may be implicit, if more than one register exists, then each register is given a unique number, and in the instruction the  number of the desired register must be specified.

(iii) I/O Device : The source operand may be present at an Input Device and the result may need to be send out to an output device. Hence the instruction must specify the I/O module and the device for the operation.

2.3 INSTRUCTION FORMAT

Each instruction is represented by a sequence of bit within the computer. These bits are divided into groups called fields. Each field consists of an element of the instruction. This layout of the instruction is known as the instruction format.

The format of an instruction is usually depicted in a rectangular box symbolizing the bits of the instructions as they appear in memory words or in a control register

The most common fields found in instruction formats are:

(i) An operation code field that specifies the operation to be performed

(ii) An address field that designates a memory address or a processor register.

(iii) A mode field that specifies the addressing mode, which specifies the way the operand or the effective address is determined.

With most instruction sets, more than one format is used.

DIFFERENT TYPES OF CODES

September 10, 2011 Leave a comment

Operation Code (opcode) : This field contains a binary code to specify various operations which must be performed by the CPU. For example, Add, Subtract, Shift, I/0 etc.

Source Operand Reference : This field specifies operands or operand that are inputs for the operation. In this field the operand location may be explicitly specified, as a memory address or general register number, or it may be implicit within the opcode or as a single accumulator etc.

Result Operand : After the operation is performed the result may need to be stored. This result location may be specified explicitly or it may be specified implicitly in the opcode.

Next Instruction Reference: This tells the CPU where to fetch the next instruction after the execution of this instruction is complete. This instruction is located in main memory. In a virtual memory system, it is located in either main memory or secondary memory. In this case this location address must be specified explicitly.

In most cases, the next instruction to be fetched immediately follows the current instruction and it does not need any explicit reference.

INTRODUCTION OF ELEMENTS OF AN INSTRUCTION

September 10, 2011 Leave a comment

INTRODUCTION

Instructions are  the means by which the CPU performs all its functions. These instructions are called as computer instructions or machine instructions. The CPU may perform a variety of functions, and these are reflected in the variety of instructions defined for the CPU. The set ofdifferent instructions that the CPU an execute is called as CPU’s instruction set.

ELEMENTS OF AN INSTRUCTION

In every instruction, it is needed to specify all the information required by the CPU to execute it. Hence regardless of the kind of the machine, or CPU organization, or instruction nature, each instruction must contain the following elements. They might be specified implicitly or explicitly. The elements are

  1. Operation Code
  2. Source operand reference
  3. Result operand reference
  4. Next instruction reference

Fm Generation

Fm Generation are essentially two basic methods of generating FM  waves namely, the direct FM generation, and indirect Fm generation. In the direct method of producing FM, the carrier frequency is directly varied in accordance with the input modulating wave, whereas in the indirect method, the modulating waves is first integrated and then used to produce a narrow band FM wave. Frequency multiplication is next used to increase the frequency deviation to the desired level.

Direct FM Generation

Direct FM is straight forward and requires nothing more than a voltage control oscillator, whose oscillation frequency has a linear dependence on the applies voltage. This is readily implemented in the microwave band, where devices such as the klystom tube have linear VCO characteristics over a substantial frequency range, typically several MHz. If lower carrier frequency is desired, then the modulated signal can be down converted by heterodyning with the output of a fixed frequency oscillator.

Categories: Uncategorized Tags: , ,

Peripheral Component Interconnect

The Peripheral Component Interconnect  to often referred to as a local bus, was developed by intel in the early 1990’s and has since become a widely adopted standard for microprocessor based computer products such as single board micro computer. The peripheral component interconnect bus is designed to be easily interfaced with different microprocessor families, main memory, and a very wide range of I/O devices.

The Peripheral Component Interconnect bus is basically intended for attaching I/O devices to a computer, but it has many of the characteristics of a high performance system bus. It can be configured as an I/O bus so that the microprocessor can communicate with memory via its system bus while PCI bus controller communicates independently with I/O devices via the Peripheral Component Interconnect bus.

The current standard allows the use of up to 64data lines at 33 MHz, for a raw transfer rate of 264 MBytes/sec, or 2.112 Gbps. It requires very few chips to implement and support other buses.

Traditional Bus Architecture

The local bus connects the processor to a cache memory and that may support one or more local devices. The cache memory controller connects the cache to the local bus and a system bus. The use of a cache structure insulates the processor to frequently access main memory. Hence, main memory can be moved off the local bus onto a system bus. Thus I/O transfers to and from the main memory across the system bus do not interfere with the activity of the processor.

Categories: Uncategorized Tags: ,

Von Neumann Machine

Any discussion of computer architectures, of how computers are organized, designed and implemented, makes reference to the “Von Neumann Architecture” as a basis for comparision. Every electronic computer ever built had its basis in their architecture.

Von Neumann and his collegues designed a new stored program computer called IAS Computer.

The main Features of Von Neumann Machine are

  • Use of a single general purpose processor
  • Use of a stored programs which are in read-write memory
  • Sequential processing of instructions
  • Alternating instructions fetch and execute cycles.

The machine contains the following elements

  • Centralized memory unit to store both data and instructions
  • Arithmetic logic unit to perform arithmetic and logical computations

Control unit to establish sequencing of the data

Concepts of Von Neumann Machine

During the first generation, machines like ENIAC. ENIAC means Electronic Numerical Integrator and Computer. ENIAC were special purpose machines which perform a particular task. They had memory to store data and eletronics ircuit to perform the operations on that data. But to reprogram it, the designers had to reconfigure it manually which is extremely tedious.

General purpose machines are built by using stored program concept, which is first put forth by john von neumann. This concept is “to store the program instructions in memory along with data. Then the computer can read and execute its instructions at electronic speed. And the reprogramming involves resetting a portion of the memory rather than reconfiguring the electronic circuitry.

The stored Program Concept

  • Provides for flexible, general purpose computing
  • Instructions are represented as numbers

Program can be stored in memory to be read or written like numbers