Vous êtes sur la page 1sur 12

Learning Outcomes

After learning this chapter, student should be able to; Define and explain the fundamental units in computer Define the basic elements of a microprocessor Explain the discuss multicore processors Explain pipelining, multitasking and multithreading Distinguish between assembly language and machine language Compare different types of interrupt: polled I/O, interrupt driven I/O and software interrupts Define and explain the advantage of DMA Define and explain type of buses

INTRODUCTION TO COMPUTER, MICROPROCESSOR AND BUSES

1. The Basic Computer Computer Basic Elements


The central processing unit (CPU) controls the operations by issuing a fetch to memory for an instruction, then executes it. Memory stores instructions and data until needed by the CPU. The ports are the I/O connections to the peripherals. The buses are groups of conductors with a common purpose. Peripherals are devices for inputting or outputting information.

1. The Basic Computer Central Processing Unit (CPU)


The CPU is the brain of the computer Control entire operations of a computer such as calculation, decision making, instruction decoding and etc. A microprocessor with associated circuits executes computer software program CPU fetch program instructions from memory, decode and executes Execution is done sequentially and frequently

1. The Basic Computer Memories and Storage

1. The Basic Computer I/O ports


Input/Output ports are interface for peripherals to communicate to the CPU. The computer sends data to a peripheral device through an output port and receives information through an input port. Input peripherals keyboard, mouse, removable storage Output peripherals monitor, printer I/O ports are classified as Serial ports single data line Parallel ports multiple data lines

Memories and Storage Store program instructions and data Several types
RAM stores temporary programs and data. The RAM is volatile, meaning that the information is lost if power is turned off or fails. Therefore, any data or program that needs to be saved should be moved to nonvolatile memory (eg: CD or hard disk) before power is removed. ROM also known as firmware stores permanent system program called Basic Input/Output System (BIOS) and certain location system programs in memory. Cache small RAM used to store limited amount of frequently used data that can be accessed much faster than the main RAM. Hard disk is the nonvolatile major storage used to store high level OS, application software and data files. Removable storage is external storage such as CDs, floppy disk, thumb drive, ZIP disk.

ROM

1. The Basic Computer Buses


Peripherals are connected to the computer ports with standard interface buses. A bus can be thought of as a highway for digital signals that consists of a set of physical connections as well as electrical specifications for the signals. Serial bus:
Examples of serial bus are FireWire and USB (Universal Serial Bus).

1. The Basic Computer Computer Software


Software makes the hardware perform Three major categories; System software Called operating system e.g. Windows, MacOS, UNIX and LINUX Allows the user to interface with the computer. Perform two basic functions; Manages all hardware and software. Eg: OS manages and allots space on the hard disk. Provides a consistent interface between applications software and hardware. Allow multitasking operations Application software Accomplish specific task E.g. Microsoft Office, ISEWebpack, Multisim, Acrobat BIOS (Basic Input/output System) On virtually every computer available, the BIOS makes sure all the other chips, hard drives, ports and CPU function together.
8

Parallel bus:
The most common parallel bus is simply called the parallel bus which connects to a port commonly referred to as printer port. Another example of parallel bus for connecting lab instruments to a computer is called the General Purpose Interface Bus (GPIB).

Internal buses (3 types):


Connects the CPU with memory, storage with I/O ports Also known as local bus Data bus transfer program instructions and data between the CPU, memories and ports Address bus used by the CPU to specify memory locations or addresses and to select ports. Control bus used for transferring control signals to and from the CPU.

1. The Basic Computer BIOS


- Is the lowest level of the computers operating system. It contains instructions that tell the CPU what to do when power is first applied; the first instruction executed is in the BIOS. It controls the computers basic start-up functions that include a self-test and a disk self-loader to bring up the rest of the OS. In addition, BIOS stores locations of system programs that handle certain requests from peripherals called interrupt which cause the current processing to be temporarily stopped. Sequence of operation when computer is turn on
BIOS from ROM is loaded into RAM, checking components and memory, provides information about storage and boot sequence. Operating system from hard disk is loaded into RAM Application software file (eg: Microsoft Word)is loaded into RAM from hard disk When a file is saved and the application is closed, the file is written back to the hard disk and both the apllication and the file are removed from RAM. Most computer data goes in random access memory (RAM) first. The CPU then stores pieces of data it will need to access, often in a cache, and maintains certain special instructions in the register.
9

2. Microprocessors Microprocessor Basic Elements


A microprocessor -- also known as a CPU or central processing unit -- is a complete computation engine that is fabricated on a single chip. It is a digital integrated circuit that can be programmed with a series of instructions to execute numerous operations Four blocks are common to all microprocessors. These are:

2. Microprocessors Microprocessor Basic Elements


Instruction Decoder Is considered as part of the ALU. The microprocessor accomplishes a given task as directed by programs that consist of lists of instructions stored in memory. The instruction decoder takes each binary instruction appears in memory and decodes it. Register array Collections of flip-flop used to store data and memory address temporarily during the program execution. The ALU can access the registers very quickly, making the program run more efficiently. Control Unit The control unit is in charge of the processing of the instructions once they are decoded. It provides the timing and control signals for getting data into and out of the microprocessor and for synchronizing the execution of instructions.
11

2. Microprocessors Microprocessor Buses Three buses for microprocessors allow data, addresses and instructions to be moved. The address bus is used by the microprocessor to specify a location in memory or external device. Some processors have 64 address lines and can access 1.8 x 1019 locations. The data bus transfers data and instruction codes to and from memory and I/O ports. The control bus coordinates operations and communicates with external devices.

2. Microprocessors Processing Operations in Single Core and Multicore Processors Single Core processors
The Intel microprocessors up through the Pentium were all single core processors, meaning they had only one microprocessor in an IC. Eg: When a single core processor such as the Pentium runs multiple programs (multitasking), its has to divide its time between all of the programs by assigning different time slices to each one. This process increases the time it takes to complete a given program.

Multicore processors can execute more than one instruction at a time. This process is also called multiprocessing.

Multicore Processors
Many newer processors have more than one core on a single IC with its own memory cache. The cores operate in parallel and can run program much faster than a single core chip. Eg: Intel offers dual-core and quad-core processor such as Intel core 2 processors.

An example of multiprocessing is when two processors work on an image at the same time to adjust the contrast. The work is sectioned so that each processor works on only one part.

2. Microprocessors Pipelining Multitasking

2. Microprocessors

technique where the microprocessor begins executing the next instruction in a program before the previous instruction has been completed Several instructions are in the pipeline simultaneously, each at a different processing stage. Pipelining results in much shorter overall execution times

Multitasking is a technique that allows a computer to perform more than one task. Unlike multiprocessing, the work only appears to be simultaneous because of the speed of the processor.

2. Microprocessors Multithreading
Is

3. Computer Programming Levels of Programming Languages


Most programming today is done in a high-level language, which can run on various machines. It is easier to write and maintain high-level programs. HLL are portable and can be used in different computer. HLL must be converted to machine language by a process called compiling. Eg: C++, Java and BASIC. Assembly language was developed to make a simpler interface between the machine and the programmer. Assembly language is useful today for many operations because it executes fast and efficiently, but it must be written for a specific processor (not portable) and takes more time to write programs. Eg: an assembly program for the Motorola microprocessor s will not work on Intel microprocessor. Early computers were programmed in machine language, which was the only instructions the computer could execute. Machine language is tedious to write and prone to errors.

the process of executing different parts of a single program, called threads, simultaneously. Is an extension of the multitasking concept. Instead of multiple programs, multithreading involves multiple threads within a single program. A thread is a single sequence of execution within a program. OS of a computer not only can run multiple programs but it also can run multiple threads within each program

3. Computer Programming Conversion of a Program to Machine Language


High-level languages can run on any machine; the source code is converted to machine code by a compiler. (In some cases an interpreter is used; it converts source code line-by-line.)
High-level language program (Source program) Compiler Machine language program (Object program)

3. Computer Programming Assembly Programming


Assembly language is suited to instrumentation and control applications such as found in a production facility. It is also used to write device drivers for peripheral devices because necessary instructions are not readily available in high-level languages. In assembly language, there are two types of instructions assembler directives and executable instructions. Assembler directives provide the assembler with various types of information such as space requirements, or where to begin executing instructions. Executable instructions can be directly translated to machine code and include arithmetic and other operations.
dw 30 ;an assembler directive that reserves space for 30 as a word sub ax,bx ;an executable instruction - subtract (bx) from (ax)

Assembly language must written for the specific processor it will be used on and the programmer must understand the register structure of the processor. An assembler converts the source code to the machine code.
Assembly language program (Source program) Assembler Machine language program (Object program)

The following slide lists categories of executable instructions

3. Computer Programming Types of Instructions

4. Interrupts
In microprocessor based systems such as the PC, peripheral devices (eg: printer, keyboard) require periodic service from the CPU. The term service means sending data or to taking data from the device or performing some updating process. Interrupt is a signal or instruction that causes the current process to be temporarily stopped while a service routine is run. There are three ways to start a service routine for a peripheral device. These are: Polled I/O the CPU tests each device one at a time to check if it needs service. If it does, the service routine is invoked. Polling is suitable for devices that can be serviced at regular and predictable intervals and only in situations in which there are no priority considerations. Interrupt driven I/O the peripheral device requests service by sending an interrupt request signal. The CPU acknowledges the interrupt, fetches the service routine, and returns to its program when the routine is completed. Software interrupts a software interrupt is issued from software rather than external hardware. After the interrupt occurs, the steps are the same as with a hardware interrupt. Defined by the BIOS and DOS to perform many of the I/O operations such as reading and writing data to the disk, writing data to the display and reading data from the keyboard.

5. Direct Memory Access


Direct memory access (DMA) is a data transfer technique in modern computer in which data is transferred to or from a peripheral device and memory without involving the CPU. A DMA controller handles the data transfer several times faster than the CPU. DMA is useful in real-time computing applications (eg: CCTV) where critical operations must be done concurrently. Stream processing is another application of DMA, where transfer and data processing are done simultaneously. Many hardware systems use DMA including floppy and disk drive controllers, graphics cards, network cards, sound cards and graphics processing units.

6. Bus Standards
Can be thought as a highway for digital signal It is a physical connection of printed circuit traces or wires Basically categorized into; 1) Internal buses Local Bus, PCI Bus, ISA Bus. 2) External buses 3) Serial I/O interface buses RS-232, IEEE 1394, USB 4) Parallel I/O interface buses IEEE 488, SCSI External and I/O buses provide interface the computer system to the peripheral equipment such as monitor, printer, keyboard, mouse and removable storage

24

6. Bus Standards Internal Buses


Internal buses interconnect various component within a computer system such as CPU, memory, disk drive and interface cards An internal bus connects all the internal components of a computer to the motherboard (and thus, the CPU and internal memory). Also known as local bus. Carry address, data and control signals between elements inside computer system Consists of three types; Local buses Address bus - Unidirectional lines for microprocessor sends and address code to memory Data bus - Bidirectional lines on which data or program instructions are transferred to or from microprocessor Control bus - Bidirectional lines to carry control signal from or to microprocessor Peripheral Control Interconnect (PCI) bus Develop by Intel Interfacing microprocessor to external devices via expansion slot PCI slots can be used for network, graphics and sound card Industry Standard Architecture (ISA) bus Develop by IBM Act similar to PCI bus
25

6. Bus Standards External Buses


An external bus connects external peripherals (eg: scanner, printer) to the motherboard via I/O interface called a port Connect external devices to computer system Consists of two types; Serial port Used for 1-bit at a time communication such as connecting modems and mice to computer Parallel port Used for multiple data at one time communication such as for traditional printer

26

6. Bus Standards Serial I/O Interface Buses


RS-232C Referred as EIA-232 Used commonly for interfacing data terminal equipment (DTE) with data communications equipments (DCE) DB-25 and DB-9 cables which can connect only one devices FireWire Referred as IEEE 1394, developed by Apple The cable consists of six wires, two twisted pair for data and two for power Ability to hot plugging; add or remove devices while computer is running Can connect up tp 63 devices The system is commonly used for connection of data storage device and digital video cameras. Universal Serial Bus (USB) Support two data transfer rate; 12Mbps and 1.5Mbps The cables has four wire, two for data and two for Firewire power Ability of plug and play and hot plugging Can connect up to 127 devices
27

6. Bus Standards Parallel I/O Interface Buses Small Computer System Interface (SCSI)
Widely used in personal computer 25-pin cable consists of eight data lines ad support 8Mbps Can connect up to 16 devices Your USB port is good at carrying the data and electricity required for small electronic devices that do things like create and store pictures and music files. But that bus isn't big enough to support a whole computer, a server or lots of devices simultaneously. It's a fast bus that can connect lots of devices to a computer at the same time, including hard drives, scanners, CD-ROM/RW drives, printers and tape drives. Fully replaced by FireWire

6. Bus Standards The IEEE 488 (GPIB) Bus


Known as General Purpose Interface Bus (GPIB) Referred as IEEE 488 Widely used for measurement applications by Hewlett Packard Has 24 lines, eight parallel data line, right control signal, three handshake lines and five bus-management lines Maximum data transfer rate for IEEE 488 is 1Mbps Can connect up to 14 peripherals and laboratory instruments To connect test equipment to a computer using the IEEE 488 bus, an interface card is installed in the computer
29

6. Bus Standards The IEEE 488 (GPIB) Bus


To connect test equipment to a computer using the IEEE bus, an interface card is installed in the computer which turns the computer into a system controller. There are three types of devices defined by the standard. Listeners are devices that receive data such as monitors or printers. Talkers are devices that send data such as computer, DMMs, Data lines oscilloscope or signal generators. Controllers are devices that determine who can talk and who should listen such as computer.
Management lines Handshake lines

6. Bus Standards The IEEE 488 (GPIB) Bus


Handshaking is a process of jointly establishing communication

Example: GPIB

Describe the operation when a talker send data to the listener depicted by the GPIB timing diagram of Figure 1. Develop a basic block diagram of the system involved in this operation.

Figure 2: Timing diagram for the GPIB handshaking sequence The GPIB handshaking signals: Data transfer control bus When ATN is high, it causes the listeners to interpret data as a command from the controller (talker) and activates the handshaking function. Now, NRFD, DAV and NDAC is activated. When a listener is ready to accept data, the NRFD signal goes high. After the talker detects a HIGH on the NRFD line, a LOW is placed on this line by the talker when the data on its I/O are settled and valid. The first two bytes of data (3F and 41) issend to a listener assigned by address 001A and second two bytes of data (C8 and AD) is send to listener with address 001B. After the data is accepted by listener, the NDAC line will go high.

A physical interface on a computer through which Port


data are passed to or from a peripheral.
Interrupt! A computer signal or instruction that causes the current process to be temporarily stopped while a service routine is run.
Assembly A programming language that uses English like language
words and has a one-to-one correspondence to machine language.
A type of output on logic circuits that exhibits three Tristate
states: HIGH, LOW, and high Z; used to interface the outputs of a source device to a bus.

1. In a computer, the address bus is a a. one way bus from the CPU b. one way bus to the CPU c. two way bus between the CPU and memory d. two way bus between the CPU and ports

2. A example of software that resides in ROM (firmware) is a. assembly language b. application software c. the BIOS d. all of the above

2008 Pearson Education

2008 Pearson Education

3. The part of a microprocessor that translates the programming instruction into an address where microcode resides is the a. ALU b. instruction decoder c. register array d. control unit

4. The part of a microprocessor that fetches the next instruction from memory is called the a. ALU b. BIU c. EU d. bus controller

2008 Pearson Education

2008 Pearson Education

5. The figure illustrates the segment/offset method of addressing used in Intel processors. The advantage of this method is a. code can be easily relocated b. a smaller address bus can be used c. addresses can be pipelined d. the clock speed can be increased
16-bit segment base address 16-bit offset address

6. An advantage to assembly language is that it is a. fast and efficient b. easier to write programs c. can be used on any processor d. all of the above

20-bit physical address

2008 Pearson Education

2008 Pearson Education

7. Information given to an assembler such as where to begin executing instructions is provided by a. the BIOS b. system programs c. executable instructions d. assembler directives

8. The CPU is not involved in a. arithmetic instructions b. loop instructions c. software interrupts d. direct memory access

2008 Pearson Education

2008 Pearson Education

9. For the circuit shown, the output will be a. LOW b. HIGH c. high impedance d. not enough information to tell
HIGH

10. The IEEE 488 bus standard a. is a serial bus with 2 types of devices
?

b. is a parallel bus with 2 types of devices c. is a serial bus with 3 types of devices d. is a parallel bus with 3 types of devices

LOW

2008 Pearson Education

2008 Pearson Education

Answers: 1. a 2. c 3. b 4. b 5. a 6. a 7. d 8. d 9. c 10. d

Vous aimerez peut-être aussi