Computer Science 516 Week 4 Lecture Notes
Addresses Related to C++ pointers Not consistently covered in CS575 Essential to Computer Architecture
Where Are We? Pierce College? Computer Science Building? Room 1502? Pierce College 6201 Winnetka Ave. Woodland Hills CA 91301?
Where Are We? How about: ,
Which Is Accurate? All of them......depending on the context in which they are used!
Variable Names Versus Addresses C++ Variables are like "Room 1502" Accurate location within the context of the program Storage addresses are like , Accurate regardless of context
C++ implementation Pointer * Dereference * Reference & Refer to CS575 text
Function Pointers Pointers usually reference variables Pointers may also reference a program Called Function Pointers Commonlyh used in operating systems
Addresses in Computer Architecture 16-bit storage locations 32-bit - 4,294,967,295 storage locations 64-bit quintillion
Computer Architecture: The VAX History – Introduced 1979 – Virtual Address eXtension for PDP-11 – Actually new architecture – In production through 2005 Many still in use
Key Points 16 Registers had special uses Processor Status Register four 1GB address regions P0, P1, S0, S1 Complex Instruction Set Computer (CISC)
Registers 12 - Argument Pointer 13 - Frame Pointer 14 - Stack Pointer 15 - Program Counter
VAX Characteristics Many, many addressing modes Highly Orthogonal – Each instruction usable in all addressing modes
Computer Architecture: RISC Problems With CISC – Complex to build – Complexity made some things slow – Complexity increased cost Hence...Reduced Instruction Set Computers
RISC History John Cocke - IBM Several Vendors in 1980s-1990s – Sun – MIPS – Apollo/HP – IBM RS-6000, Power – DEC Alpha
RISC Principles All instructions one word usually 32 bits All instructions take one cycle – In CISC, only simplest instructions finish in one cycle Few instruction formats More registers (usually 32) – Register 0 always zero, read-only Complexity moved to compiler
ARM Architecture Advanced RISC Machines – Major vendor to mobile, tablet arena – Originally 32-bit, later bit instructions, later 16-bit added Several different families Generally instructions Raspberry Pi
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
Examples Of Computer Architecture CDC 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”
CDC 3300
IBM System/360
Pep-8 Architecture Defined in course text Simulated architecture Similar to DEC PDP-8 See book for details