The document provides an overview of basic computer architecture. It discusses the history of computer architecture and defines computer architecture as describing what the computer does and how its functional units are interconnected. The document also describes computer organization as dealing with low-level hardware components and their arrangement. Additionally, it covers topics such as instruction codes, memory hierarchy including cache, and the organization of hard disks.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
17 views
Basic Computer Architecture
The document provides an overview of basic computer architecture. It discusses the history of computer architecture and defines computer architecture as describing what the computer does and how its functional units are interconnected. The document also describes computer organization as dealing with low-level hardware components and their arrangement. Additionally, it covers topics such as instruction codes, memory hierarchy including cache, and the organization of hard disks.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33
Unit3 Basic Computer Architecture
Prepared By: Sujan Shrestha
Contents • Introduction – History of computer architecture, – Overview of computer organization, – Memory hierarchy and cache, – Organization of hard disk • Instruction codes – Stored program organization – Indirect address, – Computer registers – Common bus system – Instruction set – Timing and control – Instruction cycle Computer architecture? • Architecture – Art and science of designing and object – Every object in the real word is based on some architecture, for example an architect will define the building in term of building drawings and specifications for various building components • Similarly computer architecture defines various functional unit of the computer system and how they are interconnected • Architecture describes what the computer does • Programmer has to be aware of which instruction set is used to increase performance • Is there a multiply instruction? Computer system functional unit Contd… • In order to built a computer system, first step is to design and develop the system architecture • Computer architecture deals with high level design issues logical functions such as instruction sets, registers, data types, addressing modes and cache optimization Categories of computer architecture • System design – It include all hardware components in the system, including data processor such as CPU, GPU and memory elements • Instruction set architecture(ISA): – Set of binary command supported by the CPU – Embedded programming language(eg. Assembly language) of the central processing unit – It defines the CPU function and capabilities based on the what programming it can performed or process – This includes word size, processor register type, data formats and the instruction set that programmer use – Two types: • RISC: reduce instruction set computer arch. – Consists of simple instruction that take single cycle to execute – Deploy in mobile devices • CISC: complex instruction set computer arch. – Consists of complex instruction that take multiple cycle to execute – Deploy in server, desktop, laptops etc. Contd… • Microarchitecture – This types of architecture defines the data paths, data processing and storage elements, as well as how they should be implemented in the ISA – This might be DVD storage devices or other similar devices Computer organization? • Computer organization is based on computer architecture • Computer organization deals with low level design issues such as circuit design, adder, signal and peripherals • Is there a hardware multiply unit or is it done by repeated addition? • Hence, computer organization deals with the arrangement of the various system hardware components and the function performed by the components History of computer architecture • The first document of computer architecture was a correspondence between Charles Babbage and Ada Lovelace, that describe the analytical engine Harvard architecture • Data and programs stored in separate memory areas • Allows for faster operation • Simultaneous access of both data and programs • Allows data and instruction bus to be diff sizes • Used in microcontrollers Von Neuman Architecture • Classic computer architecture • Data and program instructions stored in same memory • Fetch-execute cycle • Suffers from Von Neumann ‘bottleneck’ • Used in personal computers, laptops etc Class work • Write difference between computer organization and computer architecture • Write difference between Harvard and Von Neuman Architecture Memory hierarchy • Memory unit is essential component in any digital computer since it is needed for storing programs and data • The memory unit that communicates directly with the CPU is called main memory • Device the provide backup storage are called auxiliary memory(Eg. hard disk) • Auxiliary memory are used for storing system programs, large data files and another backup information • Only programs and data currently needed by the processor reside in the main memory • And all other information is stored in auxiliary memory and transfer to main memory when required Contd… • The total memory capacity of the computer can be visualized using the hierarchy of the memory components • The memory hierarchy system consists of all storage devices employed in the computer system Contd… • As we move down the hierarchy we can see that – Increasing distance from the processor or decreasing access by the processor – Increasing access times or decreasing speed – Increasing capacity – Decreasing cost per bit • The designer always follow the memory hierarchy Cache memory • It holds frequently requested data and instruction so that they are immediately available to the CPU when needed • The cache memory access time is less than the access time of main memory by the factor of 5 to 10 so it is called as high speed memory • the basic operation of the cache: – When CPU need to access the memory, the cache is examined – If the word addressed is found in the cache, CPU read cache memory – If the word address requested by the CPU not found in the cache, the main memory is accessed to read the specified word – After accessed word from main memory, then transferred to cache memory Contd… • In the given diagram, the main memory can store 32K words of 12 bit each • And the cache is capable of storing 512 words of each 12 bit • CPU communicate with the both memory: – CPU sends 15 bit address to cache. If there is a hit, the CPU accept the 12 bit data from cache • If the required data is in the cache it is called cache hit – If there is a miss, the CPU reads the word from main memory and the word is then transferred to cache • If the required data is not in the cache, it is called cache miss Organization of Hard Disk • A hard disk drive(HDD) is a non- volatile(data retain when computer turned off) storage device containing magnetic disk or platters rotating at high speeds • It is a secondary storage device used to store data permanently • A HDD is also known as Hard drive Components of hard disk • Magnetic platters – Platters are the round plates, each platter holds the certain amount of information – So drivers with a lot of storage will have more platters than one with less storage – When information is stored and retrieved from the platters it is done so in concentric circles, called tracks. – Tracks are further broken down into segments called sectors Contd… • Read and write head – Read-Write(R-W) head moves over the rotating hard disk – Read-Write head that performs all the read and writes operations on the disk and hence, the position of the R-W head is a major concern – To perform a read or write operation on a memory location, we need to place the R-W head over that position Contd… • Motor – The motor is used to spin the platters from 4,500 to 15,000 RPM – The faster the RPM of drive, the better performance will achieve from it – When the computer wants to retrieve data from the hard drive, the motor will spin up the platters and the R-W head move itself to the appropriate data that can be used by the computer – When data is sent to the drive, the head send magnetic pulses at the platters and changing the magnetic properties of the platters, thus storing information Example • Example – Consider a hard disk with: 4 surfaces ,64 tracks/surface,128 sectors/track, 256 bytes/sector • What is the capacity of the hard disk? Disk capacity(Byte) = surfaces * tracks/surface * sectors/track * bytes/sector Instruction Code • Instruction code is a group of bits that instruct the computer to perform specific operation • The operation code(opcode) of an instruction is a group of bits that define operations such as addition, subtraction, shift, complement, etc. • An instruction must also include one or more operands, which indicate the registers and/or memory addresses from which data is taken or to which data is deposited • The instructions are stored in computer memory in the same manner that data is stored • The control unit interprets these instructions and uses the operations code to determine the sequences of microoperations that must be performed to execute the instruction • Micro0peration – Elementary operation performed with the data stored in the registers – Types: • Register transfer • Arithmetic transfer • Logic • Shift etc. Stored program organization • Operands are specified by indicating the registers and/or memory locations in which they are stored • Instruction are stored in one section of memory and data(operand) in another • For memory unit with 4096 word, 12 bits are required to specify the address i.e. 2^12=4096 Indirect addressing • The data to be operated is available inside the memory location and that memory location is indirectly specified by the HL register pair • Example: – MOV A,M • Move the content of the memory location pointed by the HL register pair to the accumulator Computer Registers • Registers are the fastest and smallest type of memory element available to a processor • Register are normally measured by the number of bits they can hold permanently, for example , 8 bit register, 32 bit register and 64 bit register Common Bus system • To avoid excessive wiring, memory and all the register are connected via a common bus • The specific output that is selected for the bus is determined by S2S1S0 • The register whose LD (Load) is enable receives the data from the bus • Registers can be incremented by setting the INR control input and can be cleared by setting the CLR control input • The Accumulator’s input must come via the Adder & Logic Circuit • This allows the Accumulator and Data Register to swap data simultaneously • The address of any memory location being accessed must be loaded in the Address Register. Contd… • The basic computer has eight registers, memory unit and control unit • Path must be provided to transfer information from one register to another and between memory and registers • Four register DR, TR, AC, and IR has 16 bit bus • Two register AR and PC have 12 bits each since they hold a memory address • When content of AR and PC applied to the 16 bit common bus, the four MSB bits are set to 0’s • When AR and PC receives the information from the bus, only the 12 LSB are transferred into the register • The INPR and OUTR have 8 bit each and communicate with 8 LSB in the bus • INPR is connected to provide information to the bus but OUTR can only receive information from bus • INPR receives the data from input device which is then transfer to AC • OUTR receives the data from AC and deliver it to the output device • There is no transfer from OUTR to any of the other register • The common bus system receives the information from six register and memory unit • The bus lines are connected to the input of input of six registers and the memory unit • Five register have three control inputs: LD, INR(increment),CLR(clear) • The input data and the output of the memory are connected to the common bus, but the memory address connected to AR • AR must always be used to specify memory address • The content of the any register can be specified for memory data input during a write operation • Any register can receive the data from memory after read operation except AC Timing and control • The timings for all the registers is controlled a master clock generator • Its pulses are applied to all flip-flops and registers, including in the control unit • The control signals are generated in the control unit and provide control inputs for the bus’s mutlitplexers and for the processor registers and provides micrroperations for the accumulator Instruction cycle • The instructions of a program are carried out by a process called the instruction cycle • The instruction cycle consists of these phases: – Fetch an instruction from memory – Decode the instruction – Read the effective address from memory if the operand has an indirect address – Execute the instruction