Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science 516 Week 3 Lecture Notes. Computer Architecture - Common Points This lecture will cover some common things which characterize computer.

Similar presentations


Presentation on theme: "Computer Science 516 Week 3 Lecture Notes. Computer Architecture - Common Points This lecture will cover some common things which characterize computer."— Presentation transcript:

1 Computer Science 516 Week 3 Lecture Notes

2 Computer Architecture - Common Points This lecture will cover some common things which characterize computer architectures We will also look at two computer families in this lecture Two or three more to cover next week First, the basics…

3 Von Neumann Architecture Also called Princeton or IAS (Institute For Advanced Studies)

4 Harvard Architecture Based on 1944 Mark I computer Note separate memories for data and for instructions

5 And the winner is... Many designs today use a modified Harvard design – Single memory rather than separate data and instruction memories – Separate data and instruction caches Generally not a programmer-visible feature

6 Arithmetic Generally Binary arithmetic – Arithmetic performed in registers – Many designs offer decimal arithmetic – Decimal may be performed in storage rather than registers

7 Registers Very high speed storage area Input to/Output from Adder circuit, etc. Defines word size

8 Word size The number of bits in the basic binary arithmetic unit Many sizes – Generally 16, 32, 64 bits – Some older machines used different sizes

9 Memory May be word addressable or byte/character addressable Actual size of transfers to/from memory is called Data Path Size – Generally not a programmer visible feature Memory size generally limited to largest number a register holds – May be smaller – May be bigger

10 Programmer Visible Features Programmer Visible means a program can see or change it Typical Programmer Visible Features – Registers – Storage contents – Program counter (current instruction address) – Status bits (Zero, Overflow, Negative, Carry)

11 Many Features Not Visible To Programmers Storage Address Register (SAR - also MAR) Storage Data Register (SDR - also MBR) Storage Parity Bits Instruction Register Many others

12 Instruction Result Status When an instruction completes, status may be set Status used to implement if statements Status carried in status bits – AKA status flags – AKA condition code

13 Instruction Result Status Example C++ Example: // if (a = 1) // b = 1; // else // b = 2; In assembler, might be : LDA a CMP 1 JNE E1 MOV b,1 J I3 E1 MOV b,2 I3 NOP

14 Typical Status Bits Many variations among architectures Some commonly used status bits: – Zero = last result was zero – Carry = last result was larger than word size – Negative - last result less than zero – Overflow - last result was larger than word size – Equal - may be Zero renamed May be others IBM System/360 – status in “condition code”

15 Interrupts How do you know an outside event is finished? Examples: – I/O operation – Interval timer – Other external source

16 Interrupts versus Polling Polling simpler –...but much slower – Example: Picking up your telephone every minute to see if you have a call Interrupt – Outside event hardware tells CPU it is done – Example: Doing your homework while waiting for a phone call

17 Exception Interrupts Interrupts may also signal a problem – Example: storage parity error Interrupts may also signal internal event – program exception (overflow, underflow, etc.) – Generally program related Interrupts may also signal service request – Some instructions are restricted – Require state change from normal to executive, etc. – Example: opening a file

18 Operation Code Part of each instruction Tells the control unit what to do next May be fixed size: – six bits (CDC 3300) – eight bits (IBM System/360) – Often longer May be multiple bytes, split into two or more sections, et cetera

19 Instruction Set Set of low-level operations the computer can perform Sometimes called Instruction Repetoire Categories: – Arithmetic – Control and branching – Bit manipulation – Character operations – Floating-point arithmetic – Decimal arithmetic – …and more Instruction set grows over time

20 Instruction Format Most machines have several formats Generally one word in simpler designs CDC 3300 – one word May be multibyte: – IBM System/360 - 2, 4, or 6 bytes – Intel x86 - 1 to 15 bytes As designs mature, instruction formats may be added

21 Addressing Modes How does an instruction specify what memory location holds the data to be used? Examples: – Direct – actual memory address carried as part of the instruction More prevalent in older, smaller designs – Indexed – adds a value in an index register to formulate the actual address – Indirect – Memory location has the address of the data rather than the actual data – Register – address is in a register – Register with displacement – instruction holds a value added to a register value to arrive at the actual data address – Program-counter relative addressing – instruction holds the offset (difference) from the current instruction address Common for jump/branch instructions

22 Examples Of Computer Architecture CDC 3300 - simple accumulator architecture – Typical 1960s design – Used at CSUN – early 1970s – Typical CDC – both positive and negative zero - IBM System/360 - multiple register design – Introduced 1964 – 8-bit characters – Still in production 50 years later – “the mainframe”

23 CDC 3300

24 IBM System/360

25 Pep-8 Architecture Defined in course text Simulated architecture Similar to DEC PDP-8 See book for details


Download ppt "Computer Science 516 Week 3 Lecture Notes. Computer Architecture - Common Points This lecture will cover some common things which characterize computer."

Similar presentations


Ads by Google