Lecture 1: Number Representation Binary Codes

advertisement

3D1-Microprocessor Systems 1

Lecture 2: Introduction to the Von Neumann Architecture

A computer can be seen as a machine that manipulates coded data and responds to events occurring in the external world. This is called the stored-program or Von Neumann machine architecture. In this lecture, our primary purpose is to develop an understanding of this machine architecture.

Learning Outcomes:

On completion of this lecture, you will be able to:

Describe the simple representation of the Von Neumann Architecture;

Describe the fetch and execute cycle;

 Distinguish between microprocessor, microcomputer and embedded computer.

2.1

The Von Neumann machine.

A simple representation of a computer consists of a processor connected to some memory and some input and output (I/O) devices by a bus or data highway. This design principle separates special functions into special purpose devices.

The CPU (Central Processing Unit) is the unit specialised in executing instructions.

Memory has the property to retrieve information in a particular way. Data and programs are both stored in memory in binary. Two of the most commonly used types of memory are

RAM (Random Access Memory) and ROM (Read Only Memory). RAM stores the data and general-purpose programs that the machine executes. RAM is temporary: its content can be changed at any time and it is erased when power to the computer is turned off. ROM is permanent; it can retain its content even when the machine is powered-off and is used to store programs for the initial boot-up of the machine.

Peripheral interfaces mediate between the outside world and the interior world of the computer. They allow the computer to communicate to the user and to I/O devices.

Information is moved across the different units via a bus.

Fig. 2.1 Representation of the Von Neumann machine architecture

2-1

3D1-Microprocessor Systems 1

The Concept of Stored Program: The core of the Von Neumann architecture states that the memory is used to store both data and programs. In order for a CPU to accomplish meaningful work, it must have two inputs: instructions and data. Instructions tell the CPU what actions need to be performed on the data. Instructions are represented with binary codes just like data. In fact, the CPU makes no distinction about the whether it is storing instructions or data in memory. This concept is called the stored-program concept.

Early computing devices were not known for their flexibility, as the program that each device executed tended to be built into the control unit as a part of the machine. One approach used to gain flexibility in early electronic computers was to design the control units so they could be conveniently rewired. A breakthrough came with the realization that the program, just like data, can be coded and stored in main memory. If the control unit is designed to extract the program from memory, decode the instructions, and execute them, a computer's program can be changed merely by changing the contents of the computer's memory instead of rewiring the control unit. This stored-program concept has become the standard approach used today. To apply it, a machine is designed to recognize certain bit patterns as representing certain instructions.

2.2

Te Central Processing Unit

The Central Processing Unit (CPU) is where all the work is done. It contains the hardware resources required to execute instructions. These resources are used by the CPU’s instruction set.

The CPU reads the sequence of commands that make up a program one by one from memory and executes them.

The CPU functions by following a cycle of fetching an instruction, decoding it, and executing it. This process is known as the fetch-decode-execute cycle. The cycle begins when an instruction is transferred from memory to the CPU along the data bus. Then the unique bit patterns that make up the machine-language are extracted and decoded. A decoder recognises which operation the bit pattern represents and activates the correct circuitry to perform the operation. Once the operation is performed, the cycle begins again with the next instruction.

2.3

The Instruction Set

This is the set of instructions that a particular make of CPU can recognise.

The instruction set is finite since it corresponds to the circuitry that the hardware provides.

A machine language program is a set of instructions which utilise the CPU's resources to perform some specified tasks on data.

2.4

Memory

Memory is simply a mechanism in which information can be stored. The only operations that can be performed on memory are reading information from it, or writing information to it.

Memory is used to store everything—data and instructions—that has to be accessible to the CPU.

Memory contains:

 The instructions in the program currently being executed;

 The data upon which the program is currently operating.

2-2

3D1-Microprocessor Systems 1

2.5

Peripherals

Peripherals are devices external to the computer system. They are connected to the system through gateways called interfaces.

Some peripherals include Terminals, Disk Drives, Printers, but there are many different ones in industrial applications.

A telephone exchange could be considered a peripheral if it is controlled by the computer.

2.6 Embedded Computers

A computer wholly contained within a machine, e.g. mobile phone, is said to be

‘embedded.’

The market for embedded computers is larger than for ‘ordinary’ computers.

Energy consumption is often very important for embedded computers.

2.7 Microprocessor

A Microprocessor is simply a CPU on a small number (usually 1) of integrated circuit packages. Often called a Microprocessor Unit (MPU). Abbreviated μP.

In conjunction with memory, power supply, and the necessary peripherals it can be said to be a microcomputer.

2.8 Microcomputer

A Single-Chip Microcomputer is a complete computer system on one integrated circuit package - it has a CPU, memory and interfaces all on the chip.

2.9 Conclusion

In this lecture we have introduced a simple representation of the Von Neumann machine architecture and outlined the concept of stored program. Other important notions introduced include:

 The fetch -decode-execute cycle constitutes the main activity of the CPU.

 The role of memory is to store information; no other operation can be processed in memory.

 An instruction set is restricted by the hardware of the machine.

 Peripherals allow the machine to communicate with the outside world.

We finally differentiated embedded computers, microprocessor and microcomputer.

REFERENCES:

 Dr. Mike Brady, Microprocessor Systems 1, dept. of Computer Science, Trinity College

Dublin: http://deimos3.apple.com/WebObjects/Core.woa/Browse/tcd.ie.1547815781

.

 A. Clements; The CPU and its Memory, In: 68000 Family Assembly Language; pp.45-61;

PWS Publishing Company; 1994.

 Look on the Web at http://www.mee.tcd.ie/~assambc/3D1 .

2-3

3D1-Microprocessor Systems 1

2-4

Download