Beruflich Dokumente
Kultur Dokumente
1
What if we want to compute z= X2/y2
Make another circuit and rewire the circuit,
This approach is not flexible.
Software Approach
Make a general- purpose arithmetic and logic unit with basic operations and compute.
Put the sequence of operations (commands) and data in memory by coding them in some form
Make a circuit that reads the commands and generates the right control signals (s1s0), delivers data
to the ALU and put result (z) back to memory.
Let a command (instruction) has the following format
The ALU has four possible operations, so we can use 2 bits for the operation code
A memory location is accessed with a numerical address
Let the memory has 8 locations with addresses 0 to 7 (we can use 3 bits for memory address)
Let Operand 1, Operand 2 and Result be addresses of memory location (we need 3 bits for each )
2
Such stored-program concept was introduced by von Neumann.
The design is referred to as the von Neumann architecture
Von Neumann Architecture
Virtually all contemporary computer designs are based on concepts developed by John von Neumann at the
Institute for Advanced Studies, Princeton.
The von Neumann architecture is based on three key concepts:
1. Data and instructions are stored in a single readwrite memory
2. The contents of this memory are addressable by location, without regard to the type of data
contained there
3. Execution occurs in a sequential fashion (unless explicitly modified) from one instruction to the
next
3
Computer top-level components and the interactions among them
The Control Unit , the ALU and some registers constitute the Central Processing Unit (CPU)
Data and instructions need to get into the system and results out I/O components.
Temporary storage of code and results is needed Main Memory
These components communicate with each other using interconnection structure (system bus).
Some basic registers inside CPU some are used for the purpose of data exchange among this
components
4
o Fetch : Processor reads instruction from memory
o Execute: Processor performs actions specified by the instruction
Let us do the example on the program execution given in your guide book, page 10.
Interrupt
Normally instruction is executed sequentially
This may be altered
o If an instruction (control instruction) specifies that the sequence be changed
o If an interrupt occurs
Mechanism by which other modules (e.g. I/O) may interrupt normal sequence of processing
Interrupts are provided primarily as a way to improve processing efficiency. How?
When interrupt occurs control is transferred to the interrupt handler routine (program)
5
Interrupts Cycle
Program :
o e.g. overflow, division by zero
Timer :Generated by internal processor timer
I/O :From I/O controller
Hardware failure
o e.g. memory parity error
6
2.3 Inter connection structures
A computer consists of a set of components or modules of three basic types (processor, memory, I/O) that
communicate with each other. In effect, a computer is a network of basic modules. Thus, there must be
paths for connecting the modules.
The collection of paths connecting the various modules is called the interconnection structure.
The design of this structure will depend on the exchanges that must be made among modules.
Figure shown below suggests the types of exchanges that are needed by indicating the major forms of input
and output for each module type:
Memory to processor: The processor reads an instruction or a unit of data from memory.
Processor to memory: The processor writes a unit of data to memory.
I/O to processor: The processor reads data from an I/O device via an I/O module.
Processor to I/O: The processor sends data to the I/O device.
I/O to or from memory: For these two cases, an I/O module is allowed to exchange data directly with
memory, without going through the processor, using direct memory access (DMA).
7
2.4 Bus Interconnection
A bus is a shared communication pathway connecting two or more devices.
It is one of the most common interconnection structures.
Multiple devices connect to the bus, and a signal transmitted by any one device is available for
reception by all other devices attached to the bus. [broadcast]
Only one device at a time can successfully transmit.
Computer systems contain a number of different buses that provide pathways between components
at various levels of the computer system hierarchy. A bus that connects major computer
components (processor, memory, I/O) is called a system bus.
Although there are many different bus designs, on any bus the lines can be classified into three
functional groups.
o Data lines
o Address lines, and
o Control lines.
Data lines
Used to designate the source or destination of the data on the data bus.
The width of the address bus determines the maximum possible memory capacity of the system.
Control lines
Are used to control the access to and the use of the data and address lines.
Because the data and address lines are shared by all components, there must be a means of
controlling their use.
Control signals transmit both command and timing information among system modules.
Timing signals indicate the validity of data and address information.
Command signals specify operations to be performed.
Elements of Bus Design
Although a variety of different bus implementations exist, there are a few basic parameters or
design elements that serve to classify and differentiate buses.
BUS TYPES
Bus lines can be separated into two generic types:
o dedicated and
o Multiplexed.
8
Dedicated Bus Type
In this type of bus the same set of lines are used for multiple purposes.
For example, address and data information may be transmitted over the same set of lines using an
Address Valid control line.
Uses Address valid or data valid control line to indicate the type of signal on the bus at the time.
Advantage
9
Buses Examples:
10