Basic Computer Organization

2,050 views

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,050
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
59
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Basic Computer Organization

  1. 1. ECE3120: Computer Systems Dr. Xubin He http://iweb.tntech.edu/hexb Email: hexb@tntech.edu Tel: 931-3723462, Brown Hall 319
  2. 2. <ul><li>Today: </li></ul><ul><ul><li>Basic Concepts </li></ul></ul><ul><ul><li>Software </li></ul></ul>
  3. 3. Computer Concepts <ul><li>Computer: </li></ul><ul><ul><li>Hardware: </li></ul></ul><ul><ul><ul><li>Processor: “brain”, CPU </li></ul></ul></ul><ul><ul><ul><ul><li>Datapath: registers and ALU </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Control unit: hardware instrucion logic. </li></ul></ul></ul></ul><ul><ul><ul><li>Memory: place to store software programs and data </li></ul></ul></ul><ul><ul><ul><li>I/O devices: enter data/programs into the computer/display outputs </li></ul></ul></ul><ul><ul><li>Software: programs </li></ul></ul><ul><ul><ul><li>A program is a set of instructions that the computer hardware can execute. </li></ul></ul></ul>
  4. 4. Computer Organization
  5. 5. Processor (Central Processing Unit) <ul><li>Datapath: </li></ul><ul><ul><li>Register file: a register is a storage location within the CPU. </li></ul></ul><ul><ul><li>Arithmetic Logic Unit (ALU):perform all the arithmetic computations and logic evaluations. </li></ul></ul><ul><li>Control Unit: </li></ul><ul><ul><li>Decodes and monitors the execution of instructions and coordinate the operations. The system clock synchronizes the activities of the CPU, which are measured by clock cycles. (GHz) </li></ul></ul><ul><ul><li>Maintain 2 registers: </li></ul></ul><ul><ul><ul><li>PC: keeps track of the address of the next instruction to be executed </li></ul></ul></ul><ul><ul><ul><li>Status Register: flags the instruction execution result </li></ul></ul></ul>
  6. 6. Microprocessor <ul><ul><li>A processor implemented on a single integrated circuit (IC). Peripheral chips are needed to construct a product. A microcomputer is a computer that uses a microprocessor as its CPU (such as today’s desktop). </li></ul></ul><ul><ul><li>Classifications: word length (number of bits that a microprocessor can manipulate in one operation). </li></ul></ul><ul><ul><ul><li>4-bit (intel 4004,1971), 8-bit, 16-bit, 32-bit, 64-bit. </li></ul></ul></ul><ul><ul><li>Limitations: </li></ul></ul><ul><ul><ul><li>Requires external memory to execute programs; </li></ul></ul></ul><ul><ul><ul><li>Peripheral chips are needed to interface with I/O devices </li></ul></ul></ul><ul><ul><ul><li>Glue logic (decoders, buffers) is needed to interconnect external memory and peripheral interface chips with the microprocessor. </li></ul></ul></ul>
  7. 7. Microcontroller <ul><li>A computer implemented on a single VLSI chip. It contains everything a microprocessor contains plus some more components, such as: </li></ul><ul><ul><li>Memory </li></ul></ul><ul><ul><li>Timer </li></ul></ul><ul><ul><li>ADC, DAC </li></ul></ul><ul><ul><li>DMA controller </li></ul></ul><ul><ul><li>parallel I/O interface (parallel ports) </li></ul></ul><ul><ul><li>asynchronous serial I/O interface, synchronous serial I/O interface </li></ul></ul><ul><ul><li>DSP features. </li></ul></ul>
  8. 8. Features of 68HCS12 microcontroller <ul><li>16-bit CPU </li></ul><ul><li>64 KB memory space (also supports expanded memory up to 1 MB through a 16-KB window) </li></ul><ul><li>0 KB to 4KB of EEPROM </li></ul><ul><li>2 KB to 14 KB of on-chip SRAM </li></ul><ul><li>32 KB to 512 KB flash memory </li></ul><ul><li>Sophisticated timer functions that include: input capture, output compare, pulse accumulators, real-time interrupt, and COP timer </li></ul><ul><li>Serial communication interfaces: SCI, SPI, CAN, BDLC </li></ul><ul><li>Background debug mode (BDM) </li></ul><ul><li>10-bit A/D converter </li></ul><ul><li>Instructions for supporting fuzzy logic function </li></ul>
  9. 9. Embedded Systems <ul><li>A product that uses one or more microcontrollers as controller (s). Also called embedded products. </li></ul><ul><li>End users are interested in the functionality of the product, not the microcontroller itself. </li></ul><ul><li>Cell phones, home security systems, and modern automobiles are examples of embedded products. </li></ul>
  10. 10. Memory <ul><li>Semiconductor memory, magnetic, optical memory. </li></ul><ul><li>Semiconductor memory: </li></ul><ul><ul><li>Random access memory (RAM):volatile </li></ul></ul><ul><ul><ul><li>Dynamic RAM (DRAM): periodic refresh operations to maintain the stored information. Every a few milliseconds to over a hundred ms. </li></ul></ul></ul><ul><ul><ul><li>Static RAM (SRAM):no need to refresh. More transistors are used to hold one bit information. </li></ul></ul></ul><ul><ul><li>Read-only memory (ROM): nonvolatile. </li></ul></ul><ul><ul><ul><li>MROM: mask-programed ROM, programmed when being manufactured. </li></ul></ul></ul><ul><ul><ul><li>PROM: programmable ROM, one-time programmable ROM using PROM programmer/burner by end users. </li></ul></ul></ul><ul><ul><ul><li>EPROM: erasable PROM, strong ultraviolate light.erasable in bulk. </li></ul></ul></ul><ul><ul><ul><li>EEPROM: electrically EPROM, erased by elctrical signals and reprogrammed. Individual location. </li></ul></ul></ul><ul><ul><ul><li>Flash memory: take advantages of EPROM and EEPROM </li></ul></ul></ul>
  11. 11. I/O devices <ul><li>Input device </li></ul><ul><ul><li>Allow users to enter data/programs into the computer so that computation can be performed. </li></ul></ul><ul><ul><li>Examples: </li></ul></ul><ul><li>Output device </li></ul><ul><ul><li>Display results of computation so that users can read them and equipment can be controlled. </li></ul></ul><ul><ul><li>Examples: </li></ul></ul>
  12. 12. Software <ul><li>Programs. A program is a set of instructions that can be executed by the computer hardware. </li></ul><ul><li>Machine instructions: </li></ul><ul><ul><li>A sequence of binary digits that can be executed by the processor </li></ul></ul><ul><ul><li>e.g: 0001100000000110 (Accumulator A<-- Accumulator A+B) </li></ul></ul><ul><ul><li>Hard to understand, program, and debug for human being </li></ul></ul><ul><li>Assembly language: </li></ul>Defined by assembly instructions An assembly instruction is a mnemonic representation of a machine instruction (e.g: ABA) Assembly programs must be translated before it can be executed (assembler) Programmers need to work on the program logic at a very low level and can achieve high productivity.
  13. 13. Assembly Language examples <ul><li>The programmer must be very familiar with the hardware organization of the microcontroller. </li></ul><ul><li>It’s difficult to understand for anyone other than the author; </li></ul><ul><li>Hard for large projects: Work on a very low level. </li></ul>line 1: 2: 3: 4: 6: addr. 1000 1003 1006 1009 machine code = 00001000 B6 0800 BB 0801 BB 0802 7A 0900 source code org $1000 ldaa $800 adda $801 adda $802 staa $900 end
  14. 14. High-level languages <ul><li>- Syntax of a high-level language is similar to English, (C/C++,Java,Fortran,PASCAL…) </li></ul><ul><li>- A translator is required to translate the program written in a </li></ul><ul><li>high-level language -- done by a compiler </li></ul><ul><li>- High-level languages allow the user to work on the program logic </li></ul><ul><li>at higher level. </li></ul>Source Code A program written in assembly or high-level language Object Code The output of an assembler or compiler

×