Presentation is loading. Please wait.

Presentation is loading. Please wait.

2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt1 ITBB – Structure ProcessorMemoryInput/Output Bus device...... Processorexecutes instructions Memorystores.

Similar presentations


Presentation on theme: "2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt1 ITBB – Structure ProcessorMemoryInput/Output Bus device...... Processorexecutes instructions Memorystores."— Presentation transcript:

1 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt1 ITBB – Structure ProcessorMemoryInput/Output Bus device...... Processorexecutes instructions Memorystores information (data & instructions) I/Omoves data in/out of computer Businterconnects other components and supports interactions between them

2 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt2 ITBB: Fundamental Binary Assumption  all information is binary encoded result of transistor technology one bit = one binary digitvalue either 0 or 1 one Byte = 8 bits grouped together b 7 b 6 b 5 b 4 b 3 b 2 b 1 b 0 e.g. 10011101 2 vs. 10011101 10 one word = machine dependent number of bits  information includes data and instructions! indicates base of number lsbmsb case!

3 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt3 Encoding (Representing) Data Using Binary Values  counting numbers  see Assignment 1  integers (format defacto standard)  floating point (IEEE standard)  characters (ASCII, Unicode)  boolean  days of the week  colours  other ??? later – Ch. 9 later – assembly language application / implementation dependent ( SYSC 2003 )

4 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt4  use some bits to encode operation  opcode  use some bits to encode operands (if present)  for now, assume fixed number of bits ( w ) per instruction fixed number of bits ( i ) used for opcode fixed number of bits ( j ) used for operand(s) Encoding (Representing) Instructions Using Binary Values opcodeoperands i bitsj bits w bits

5 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt5 ITBB Function  Recall functions in a computer: Data PROCESSING Data STORAGE Data MOVEMENT CONTROL  now we consider each component in terms of these functions and the roles of the components in the structure Function lecture 2

6 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt6 Processor ( a.k.a. CPU)  PROCESSINGarithmetic and logic unit ( ALU ) manipulates/changes/combines/calculates data values  STORAGEregisters hold values in CPU each register has a unique name  CONTROL control unit built-in instruction cycle  engine that drives machine instruction cycle drives control to memory and I/O components when appropriate ! CPU = Central Processing Unit

7 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt7 Processor Structure  MOVEMENT internal connections (control unit, ALU and registers) external Bus connections to other components ALURegisters Control Unit internal connections CPU external Bus connections

8 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt8 Processor Instruction Cycle START fetch instruction ( from memory ) execute the instruction HALT cycle may cause more memory accesses (for operands)

9 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt9 Memory ( 1 )  STORAGE fixed width locations (or cells) each location contains information – contents:the value stored in the location – address:unique “name” for each location  MOVEMENT internal connections external bus connections memory does not differentiate contents as instructions vs. data ( its all just binary values ) IMPORTANT SLIDE ! e.g. house numbers

10 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt10 Memory ( 2 )  PROCESSING(limited processing compared to CPU) refresh?  transistor technology  bit-level error checking? error correction ?  CONTROL (of memory actions) write – copy input value as new contents of a location read – output (but do not modify) contents of a location write / read driven from “outside” (e.g. processor, other ?) may provide external control  error condition? Ch. 5 later

11 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt11 Memory Structure memory processor locations Control Unit internal connections Memory external Bus connections

12 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt12 Input Output ( 1 )  function depends on connected devices  STORAGEfixed width registers (or ports) each register contains information – contents:the value stored in the register – address:unique “name” for each register  MOVEMENT internal connections external bus connections

13 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt13 Input Output ( 2 )  PROCESSING device dependent ! specialized hardware  CONTROL (of device-related processing) write – copy input value as new contents of a port read – output contents of a port not always the case that can read & write a port ! write / read driven from “outside” (e.g. processor, other) may drive external control  interrupts ! Ch. 7

14 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt14 Input Output Structure N. B. I/O component = Memory ! device processor registers ( ports ) Control Unit internal connections I/O external Bus connections device

15 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt15 Bus  pathway for interactions among components  standard signaling protocols for using the Bus specified using timing diagrams  MOVEMENTYES!  CONTROLarbitration (traffic cop) resolve concurrent requests to use the Bus  STORAGEnot usually  PROCESSINGnot usually Appendix 3A sometimes … arbiter

16 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt16 Instruction Cycle - State Diagram access to memory no operands

17 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt17 Interrupts  Mechanism to interrupt normal sequence of processing  Why? I/O events: e.g. mouse click, network data arrives timer: e.g. animation program exception: e.g. overflow, division by zero hardware error: e.g. memory error  these are asynchronous events! require programmed service  events caused by hardware, not software instructions Ch. 7.4 Unpredictable timing

18 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt18 An Interrupt Scenario App. code interrupt handler (a.k.a. ISR) “driver”? independent execution contexts “threads of control” ISR = Interrupt Service Routine performs s/w action appropriate to interrupt event Suppose App. code executing: interrupt occurs want ISR to run then resume App. eg. editor eg. audio CD want to share processor between threads!

19 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt19 resume thread @ i+1 hardware invokes interrupt handler Transfer of Control via Interrupts App. code interrupt handler suspend thread ! interrupt occurs during execution of instruction at i 1 2 3 4 5 6

20 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt20  after instruction execute phase of cycle – processor checks: exception occurred? e.g. divide by 0 interrupt event signal input to processor?  If interrupt pending: Suspend and save context of current thread of execution Set PC to start address of ISR Continue Cycle  fetch 1 st instruction of ISR code  Eventually, ISR s/w restores context  resume interrupted thread  If no interrupt pending: Continue Cycle  fetch next instruction Extending Instruction Cycle for Interrupts done by processor h/w – no s/w !

21 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt21 Extending Processor Instruction Cycle START fetch instruction execute instruction HALT cycle interrupt pending no save context & set PC to start address of interrupt handler yes hmmmm….. last 3 slides all say the same thing

22 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt22 Digital Signaling  signals are indicated as voltage levels use particular levels to represent binary values –e.g. +5 volts  1 0 volts  0 change values “quickly” 1 0 time want to avoid reading when not stable signals stable Signals: “here is the data”, “read the contents of this address”, “I want to use the bus”, etc. Or could be –5V, 0V or…?

23 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt23 Signals and Timing Diagrams  often bundle groups of related signals as one in a timing diagram e.g. 16-bit addresses  16 address signals  one per bit 1 0 falling (trailing) edge rising (leading) edge 1 0 address signals may be stable, but do not represent a useful value signals stable, represent a useful 16-bit address App. 3A ~ ~ indefinite time elapsed

24 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt24 Bus  communication pathway connecting components  shared  communications broadcast to all on bus  organize communicated information into 3 groups: address data control of information being communicated everything else

25 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt25 Bus Interconnection Scheme memory I/O

26 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt26 Data Bus  carries data remember that there is no difference between “data” and “instruction” at this level  data bus width is a key determinant of performance 8, 16, 32, 64 bit

27 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt27 Address bus  identify the source or destination of data e.g. CPU needs to read an instruction (data) from a given location in memory  address bus width determines maximum memory capacity of system (address space) e.g. 8080 has 16 bit address bus giving 64k address space 2 16

28 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt28 Address and Data Groups  often bundle address and data signals separately and use different physical pathways  may multiplex using same physical pathway 1 0 address 1 0 data 1 0 address data

29 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt29 Some Common Control Signals  reset – force all components to reset  clock(s) to synchronize communication  destination indicator – usually memory or I/O  acknowledgment from component – info received  interrupts  arbitration “hand shake”

30 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt30 Bus Protocols  signaling and sequencing to permit interactions between components processor puts address value on bus, and “memory read” control indication memory receives read signal, reads address, gets appropriate data, puts data on bus processor waits, then reads data from bus  May be Synchronous - synchronized by a clock – organize protocol by clock “ticks”  T i Asynchronous – no pacing by a shared clock e.g. memory read

31 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt31 T1T1 stable data E.G. Synchronous Memory Read T2T2 T3T3 clock addrs stable address mem read data T 1 initiate memory read (addrs, mem read) T 2 time for memory to do internal work T 3 data ready for reading from bus Assumption: Sensing of bus signals done during clock trailing edge

32 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt32 E.G. Asynchronous Memory Write no shared clock pacing the protocol mem write command processor memory

33 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt33 Single Bus Problems  lots of devices on one bus leads to: propagation delays –long data paths mean that co-ordination of bus use can adversely affect performance –if aggregate data transfer approaches bus capacity  most systems use multiple buses to overcome these problems evolution for performance!

34 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt34 Traditional bus (with cache) I/O Memory ProcessorCache: Remembers data from previous requests. Can processor request be answered from cache? If not  pass request on via system bus Ch. 4 aka Front side bus

35 2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt35 High Performance Bus slower devices faster devices FireWire


Download ppt "2008 Sept. 8SYSC 2001 - Fall 2008. SYSC2001-Ch2and3.ppt1 ITBB – Structure ProcessorMemoryInput/Output Bus device...... Processorexecutes instructions Memorystores."

Similar presentations


Ads by Google