Menu bar

Temel donaným bilgileri
© Copyright Brian Brown, 1992-2001. All rights reserved.
menu next


CPU AND MEMORY, Part 2

Top IO CHANNEL COPROCESSOR (IBM)
To allow concurrent operation of the CPU and I/O devices requires the use of a special I/O processor. The main CPU instructs the I/O processor to perform the required data transfer. When the transfer is completed, the I/O processor informs the main processor of the status of the operation.

This method frees the main processor to perform other tasks whilst I/O is being done (tasks requesting I/O are blocked by the OS and thus not scheduled for processor time).

Typical features of an I/O channel processor system are

There are two main types of IO channels

Both channels support a number of devices on a bus called a sub-channel.

The selector channel operates in burst mode only. It handles a single sub-channel at a time, and has very high transfer rates. Typically, it controls high speed disk units.

The multiplexor channel handles more than one sub-channel at a time by interleaving requests. It operates in byte and word mode, but does support burst at a much lower rate than a selector channel. Typically, it handles devices like printers and character terminals.

Channel Operation
The processor initiates an I/O transfer by setting up a special IOC program in main memory. It then issues a STARTIO instruction, which identifies the channel and sub-channel.

The channel then accesses and runs the channel program (the address of which is in location 72). When finished, the channel updates the IO flag in the processors status register to signal command completion. The processor then checks the channel status register for results.

Each channel gets informed of

IBM Channel Operation
Fig 4_4: IBM Channel Operation


Top The Central Processor Revisited
We shall now take a closer look at how the processor functions internally.

The Fetch, Decode, Execute Cycle
Most modern processors work on the fetch, decode, execute principle. This is also called the Von Nuemen Architecture. The execution of an instruction by a processor is split into THREE distinct phases, Fetch, Decode, and Execute.

 

Graphical Animation of Instruction Fetch
The following graphic animation illustrates typical operation of an instruction by the processor. It places the contents of the instruction pointer onto the address bus and fetches the instruction. Once decoded, the instruction is executed and the instruction pointer altered to point to the next instruction.

Graphical animation of fetch cycle
Fig 4_8: Animation of Instruction Fetch


We shall now look at the internal operation of the CPU, and how it performs the fetch, decode, execute cycle. Internally, the CPU is made up of a number of discrete sections.


Top The Programming Model of a CPU
The programming model of a processor defines the registers within the processor which are visible and programmable by the user.

These include

Executing a program: An example
Lets consider the operation of the following program at the processor level.


	Assembler	High Level Language
	MOV AX, #1 	A := 1;
	MOV BX, #2 	B := 2;
	ADD AX, BX 	C := A + B;
	PUSH AX 	Writeln( C );
	CALL WRITELN

Assume that the instruction pointer contains the address of the first instruction.

  1. Place the address of the instruction (IP) on the address bus
  2. Read the value from that location into the instruction register.
  3. Decode the instruction (Mov AX, #1), increment the instruction pointer
  4. Read the operand from the next location and transfer it into the AX register
  5. Place the address of the instruction (IP) on the address bus
  6. Read the value from that location into the instruction register.
  7. Decode the instruction (Mov BX, #2), increment the instruction pointer
  8. Read the operand from the next location and transfer it into the BX register
  9. Place the address of the instruction (IP) on the address bus
  10. Read the value from that location into the instruction register.
  11. Decode the instruction (Add AX,BX), increment the instruction pointer
  12. Transfer BX to the ALU, and add with AX. Move the result back into AX
  13. Place the address of the instruction (IP) on the address bus
  14. Read the value from that location into the instruction register.
  15. Decode the instruction (Push AX), increment the instruction pointer
  16. Put the value of the stack pointer on the address bus
  17. Write the value of AX to that location
  18. Increment the stack pointer register value
  19. Place the address of the instruction (IP) on the address bus
  20. Read the value from that location into the instruction register.
  21. Decode the instruction (Call WRITELN), increment the instruction pointer
  22. Read the operands from the next two locations into an internal hold register
  23. Transfer the operands into the instruction pointer.

Top Base Units
The computer base unit houses the CPU, memory, floppy disk, hard disk drive, power supply unit, and peripheral cards which support printers and modems.

Computer Base Unit
Fig 4_9: Computer Base Unit

The expansion slots are used to plug in additional peripheral cards like sound cards, TV Tuners cards, video capture cards etc. The two main types of expansion slots are PCI and ISA.


Top Summary
Most modern Processors work on three cycles, fetch, decode and execute.

Processors use internal temporary storage areas for holding data, these are referred to as registers.

The set of registers which programmers can alter is referred to as the programming model.

The Arithmetic Logic Unit handles mathematical operations like add, subtract, multiply, divide, shift and rotate.


menu next
Home | Other Courses | Notes | Tests | Videos
© Copyright Brian Brown, 1992-2001. All rights reserved.

Hosted by www.Geocities.ws

1