1 / 148

EE2531 Computer System Engineering

EE2531 Computer System Engineering. Academic Year 2011/2012 PT Degree Subject Code – EE2531 Lecturer – Y.F. Fung Office (Y.F. Fung) : CF605 email: eeyffung@polyu.edu.hk Consultation: Thursday evening. Lab. Schedule. Commence in week 4 A briefing will be provided before the session

kylescott
Download Presentation

EE2531 Computer System Engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EE2531 Computer System Engineering • Academic Year 2011/2012 • PT Degree • Subject Code – EE2531 • Lecturer – Y.F. Fung • Office (Y.F. Fung) : CF605 • email: eeyffung@polyu.edu.hk • Consultation: Thursday evening

  2. Lab. Schedule • Commence in week 4 • A briefing will be provided before the session • Form your own group and with 2 students per group

  3. Computer System Engineering • Reference Textbook – • The Intel Microprocess …, Prentice-hall, Barry Brey. ISBN 0-13-060714-2 • Intel Microprocessors: Architecture, Programming and Interfacing, Ray & Bhurchandi, McGrawHill, ISBN 0-07-120169-6 • Pentium Processor System Architecture-2nd Editions, Don Anderson/Tom Shanley-Mindshare, Inc. • Latest edition for the above titles

  4. Reference books • IBM PC Assembly Language and Programming - Fourth Edition (Peter Abel - Prentice-Hall International Inc.) • The 8086 and 80286 Microprocessors Hardware, Software and Interfacing (A. Singh, W.A. Triebel, Prentice-Hall)

  5. Teaching materials • Available in WebCT web site • Also some useful information can be found in ftp.ee.polyu.edu.hk/yffung/ee2531

  6. Related Topics • Computer Architectures of microprocessors (2.5 weeks) • Assembly Language programming (3 weeks) • Memory system overview (2 weeks) • Input/Output mechanism (2 weeks) • Other computing supporting facilities: interrupt (1.5 weeks), communication (1.5 weeks)

  7. Assessment methods • Continuous assessment (40%) • Performance in Lab and online exercises (10%) • Lab report (10%) • Quiz (usually only 1 test or quiz) (usually around week 8 or 9) (20%) • Examine (60%)

  8. Criteria Reference Assessment • Pass (D/D+) • Some understanding of assembly language programming • Some understanding of other topics • Grade C/C+ • Able to write simple assembly language programs • Able to demonstrate in-depth understanding of certain topics • Grade B/B+ • Able to write assembly language program to achieve specific tasks • Able to demonstrate in-depth understanding for most topics • Grade A/A+ • Able to write assembly language program • Able to demonstrate in-depth understanding of all topics • Able to apply knowledge learnt to solve real-life problems

  9. Objectives • To understand the basic principles (hardware components) of a computer system • To learn how to control a computer system using assembly language • To learn how to design a simple computer system (eg for the development of an electronic mouse, robot, simple control system for your project)

  10. Learning outcomes 1. Given specifications of an application and the instruction set of the microprocessor, design an assembly program to carry out the necessary operations 2. able to appreciate advanced features of the latest microprocessors 3. given a set of conditions, design a simple computer system 4. able to think logically and be able to present results

  11. Attention!!!!!!!!!!!!! • This is not a traditional “Engineering” subject!!!!!!!! • Equations – almost none!!!!!! • Try to think, understand and learn • Do not try to memorize

  12. What is a computer ????? • Nowadays, computer comes in different forms!!!!!!!!!!!!!!!!!!! • In this subject, we try to learn the generic form of a computer!!!!!!!!!!!!!!!! • If you are willing to spend your time, it is possible to build your own game console or a cell phone

  13. What is a computer?

  14. The PC is dead • “It was fun while it lasted, but as of 2011 the era of the desktop computer is officially over.”Read more: http://www.foxnews.com/scitech/2011/01/11/pc-is-dead-ces-tablets-smartphone/#ixzz1X1jBuY8N

  15. Different forms of computer • Can you think of a real-life example that involves the application of a microprocessor or a computer?

  16. Computer is a digital system • Computer is a combination of digital and analogue systems, but mainly digital • So to learn this subject, you also need to understand basic digital system as well as binary number system

  17. Number systems (revision) • The microprocessor (µP) is a binary device, everything inside the microprocessor is represented by 0 and 1. • The most direct number system used inside the microprocessor is the binary system (base 2) with only 0 and 1, for example 01010101. Each digit in the number represents a value in power of 2, starting from the RHS (Right hand side). The first digit is 20, then 21, 22 , etc. Usually, the most RHS bit is also called the LSB (least significant bit) while the most LHS bit is the MSB (most significant bit). • So the value 01010101 = 0x27 + 1x26 + 0x25 + 1x24 + 0x23 + 1x22 + 0x21 + 1x20 = 64+16+4+1 = 85

  18. Number system • In base 10 • 123 = 1x102 + 2x101 + 3x100 • In subtraction 0-1 = 11 because there is no (-) sign in binary system. The first “1” is called the borrow bit • In addition 1+1 = 10 the first “1” is called the carry bit

  19. Number system • In addition, we use the term byte to represent an 8-bit data and the term word to represent 16-bit value, for a 32-bit value, it is called double word. • If we want to represent a very large number then we need to use many bits and this is not very convenient. Therefore we usually use number systems derived from the binary system and the most commonly used number system are Octal (base 8) and hexademical (base 16) usually we just use the term Hex.

  20. Hex number system • In octal, only digits from 0 to 7 will be used and in hexadecimal, we use 0 to 9 and A, B, C, D, E, F to represent the values. A = 10, B = 11, C = 12, D = 13, E = 14, F = 15 • To convert, from a binary number to a hex, it can be done very easily, starting from the RHS, every 4-bit from the binary number can be converted directly into a hex digit. • For example: 01010101 is equal to 55H (H == hexadecimal), we have two 4-bit groups 0101 and 0101. The value 0101 = 5 so the binary pattern is 55H (in Hex). • Example: 1100 0111 1010 1011 = C 7 A B H • To convert back ABCDH = 1010 1011 1100 1101

  21. Unsigned and signed numbers • If a binary pattern represents both positive as well as negative values then it is regarded as signed, otherwise, it is unsigned (only positive). • There are two types of signed notations, using a sign bit (usually the most LHS bit) and 2’s complement. • For example using the LHS bit as a sign-bit, (0 is positive; 1 – negative ) • 10101010 = -42 while 00101010 = 42

  22. 2’s complement • Usually the 2’s complement system is used. To convert a value X to –X using 2’s complement, we first do a 1’s complement of X and then add 1 to the result. The 1’s complement of a binary value is to invert its 0’s and 1’s. • Example: X = 00101010 = 42 first convert X using 1’s complement gives 11010101 • then add 1 to the result, i.e. 11010101 + 1 = 11010110 = -42 (comparing 10101010 )

  23. Floating point representation • As mentioned above, each digit in a binary pattern represents a value in the power of 2. In a floating point format, the digits after the decimal point represent value 2-1, 2-2, etc. • Example, 0.1010 = 1x2-1+0x2-2+1x2-3+0x2-4 = 0.5+0.125 = 0.625 • How to represent signed floating point values will be discussed in later stage.

  24. Floating-point format Floating-point numbers are represented in the form X = ±F •2 ±E Fis called the fraction (or mantissa) and E is the exponent Floating-point number is usually represented in two standard (defined by IEEE ) 32-bit (single precision) and 64-bit (double precision). A 80-bit (extended precision) standard is also available.

  25. IEEE Floating-point standard • For single precision • There are 23 bits for fraction and 8 bits exponent and 1 sign bit • For double precision • There are 52 bits fraction, 11 bits exponent and 1 sign bit • The bit formation is sign Exp. Fraction

  26. Floating-point arithmetic • Using the format ±F •2 ±E can implement floating point arithmetic very easily • X = a x 2 b • Y = c x 2 d • X*Y = (axc)* 2 (b+d) • X/Y = (a/c )* 2 (b-d) • How about X+Y and X-Y ??????

  27. Floating-point format For single precision format • If E=255, F0; NaN (not a number) • If E=255, F=0, S=1; then –infinity • If E=255, F=0, S=0; then +infinity • If 0<E<255 , X = (-1)S*2* (E-127) *(1.F) • If E=0, F 0, X = (-1)S*2* (-126) *(0.F) • If E=0, F=0, S=1 then X = -0 • If E=0, F=0, S=0 then X = +0

  28. Example of floating point • Given 6.125 express the value in binary format using single precision floating-point format • First convert the value into the format 1.XXX*2y • 6.125 = 1.53125 x 22 • So the exponent is 2 and the fraction is 1.53125 • As all floating-point values always come with the ‘1.’ so the ‘1.’ is not stored and only 53125 is saved!!!! • 0.53125 = .10001 • 0 10000001 10001000000000000… E-127 = 2 => E=129

  29. Exercise • Convert the number -4.5 into a IEEE 32-bit floating-point pattern • Convert 9 into a IEEE 32-bit floating point • Without using a calculator, determine 01010010 + 10101101 • Without using a calculator, determine 01010010 – 10101101 • What is a-B?

  30. Characters • In addition to values, characters are also represented using binary codes usually in ASCII (American Standard Code for Information Interchange) code.

  31. ASCII table A = 41H ; a = 61H so a>A

  32. Revision exercises • What is a Bit, a byte, a word, one K, one M • What is Hex, Oct, binary • Do you know how to convert a number into different base systems without using a calculator? • Binary number notation (10101010 = ???) • How many different values can be represented by a 8-bit pattern? • Hexadecimal A = ??? How to convert binary 1101010101110101 to Hex? • CFH (Hex) = ???

  33. More exercises • How to present negative values in binary number system? • How about using binary system to represent a floating number??? • What is ASCII? What is BCD? What is a string??? • Do you know how to program in C/C++, Fortran, Java, assembly language etc ??? • Do you know what is a multiplexer, register, latch? • Referring to the block diagram of a memory, do you know what is an address; what is data?

  34. Microprocessor/Microcomputer What is a Microcomputer • A complete computer based on a particular microprocessor chip. • So the microprocessor is the most important component in a microcomputer • So to study a microcomputer system, we must first understand the microprocessor What is a Microprocessor • Processor-on-a-chip can be described as a microprocessor. • 8051 series, 8086, Pentium series, etc

  35. Block diagram of a generic microcomputer system Hard Disk CD ROM RAM Data and address bus Keyboard, mouse Monitor, printer

  36. Microprocessor based system uP with Control program motor sensor Output Input

  37. Structure of a modern computer system

  38. http://www.hknotebook.com/polyu2011/lenovo/main_notebooks.jsphttp://www.hknotebook.com/polyu2011/lenovo/main_notebooks.jsp

  39. The Intel 8086 Microprocessor • The 8086 is a popular device used in the early 70’s and 80’s and its architecture is simple and suitable for teaching computer architecture • Once we gain the basic concept of the 8086, we can then discuss the more advanced microprocessors • Many features found in 8086 are still being embedded in modern microprocessors but enhanced!

  40. 8086 Microprocessor • This is a 16-bit microprocessor chip manufactured by high-performance metal-oxide semiconductor (HMOS) technology • Circuitry on chip is approximately 29,000 transistors • Comes in a 40-pin package

  41. Self test • Do you know what does it mean by 16-bit, 32-bit, or 64-bit processor? • How would you describe an Intel Core2 Duo CPU ?

  42. Basic 8086 features • True 16-bit microprocessor with 16-bit internal and external data bus • The address bus and data bus are multiplexed??? • Multiplex – address and data share the same pin!! • A 20-bit address bus which allows access to 1 MB of memory. • Can address up to 64K byte-wide I/O ports • Or 32K word-wide ports (word = 16 bits) • Details regarding I/O ports will be discussed in the I/O System

  43. Pins layout for 8086 A/D – address/data (address and data share the pins - multiplexed) Also pay attention to “active high” and “active low” signals

  44. 8086 Features • The 8086 has two modes – min. and max. • Min. mode – used as a typical microprocessor • Max. mode – use with multiple processors, usually for floating-point arithmetic) • The mode selection is via the MN/MX input

  45. Block diagram for a simple computer system Display unit LCD What are the basic operations performance by a computer? memory CPU I/O Get instruction from memory Perform/Execute operation Get next instruction

  46. What are the basic operations performed by a microprocessor? • Get instruction from memory • Perform/Execute operation • Get next instruction • So inside the microprocessor, it is organized into two units: Bus Interface Unit (BIU) and Execution Unit (EU). So that it can perform the above operations effectively

  47. Processor Model for 8086

  48. The 8086 Internal Architecture • The internal functions of the 8086 µP are divided between two separate processing units. They are the Bus Interfacing Unit (BIU) and the Execution Unit (EU). • The BIU is responsible for performing all bus operations, such as instruction fetching, reading and writing operands from/to memory, and inputting and outputting of data for peripherals. • The EU is responsible for executing instructions • The two units operate asynchronously so overlapping instruction fetch and execution is possible (what’s the advantage of this???)

  49. Terminology • Program is stored in memory and consists of a sequence of instructions and some data • To execute an instruction it may require some operands • What is an operand? • Operand is the object that is being operated upon! • Example, in an instruction ADD A, B (A = A+B) • ADD (addition is the operation) • A and B are the operands

More Related