Unformatted text preview:

Goals: Understanding Structure/Function of Digital ComputerScales, Units, and ConventionsMachine/assembly Language Programmer’s ViewMachine and Assembly LanguageThe Stored Program ConceptThe Fetch-Execute CycleAL Programmer’s World View:Instruction Set Architecture (ISA)Programmer’s Models of 4 commercial machinesMachine, Processor, and Memory StateHLL vs Assembly LanguageData Type: HLL vs. Machine LanguageWho Uses Assembly LanguageExamples of HLL to Assembly Language MappingAssembly Language Programming ToolsThe Computer Architect’s ViewThe Memory HierarchyLogic Designer’s ViewImplementation DomainsThree Different Implementation DomainsThe Distinction between Classical Logic Design and Computer Logic DesignTwo Views of the CPU PC RegisterTools of the Logic Designer’s TradeSummaryComputer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06Goals: Understanding Structure/Function of Digital Computer Multiple levels of computer operation Application level High Level Language(s), HLL, level(s) Assembly/machine language level: instruction set System architecture level: subsystems & connections Digital logic level: gates, memory elements, buses Electronic design level Semiconductor physics level Interactions and relations between levels View of machine at each level Tasks and tools at each level Historical perspective Trends and research activitiesThiscourseThiscourseComputer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06Scales, Units, and ConventionsTermK (kilo-)M (mega-)G (giga-)T (tera-)1031061091012210= 1024220= 1,048,576230= 1,073,741,824240= 1,099,511,627,776Normal Usage As a power of 2TermUsagem (milli-)µ(micro-)n (nano-)p (pico-)10-310-610-910-12bits/register filebytes/memorybytes/diskbytes/disk arraydisk latency (ms)off-chip memory access (µs)on-chip clock period (ns)Exp: MemoriesExp: Timinggate delay (ps) (e.g.,100ps)Units: Bit (b), Byte (B), Nibble, Word (w), Double Word, Long WordSecond (s), Hertz (Hz)Computer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06Machine/assembly Language Programmer’s View Machine language: Set of fundamental instructions the machine can execute A pattern of 1’s and 0’s Assembly language: Alphanumeric equivalent of machine language Mnemonics more human oriented than 1’s and 0’s Assembler: A program that translates assembly to machine language Computer’s native language is assembly/machine languageComputer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06Machine and Assembly LanguageMachine Language ProgramAssembly Language ProgramASSEMBLERMC68000 Assembly Language Machine Language0011 101 000 000 100ADDI.W #9, D200000110 01 000 0100000 0000 0000 1001MOVE.W D4, D5Op code Data reg. #5 Data reg. #4add 16b Reg 2Table 1.2 Two Motorola MC68000 instructionsComputer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06The Stored Program ConceptBasic operating principle for every computer.The stored program concept says that the programis stored with data in the computer’s memory. Thecomputer is able to manipulate it as data—forexample, to load it from disk, move it in memory,and store it back on disk.Computer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06The Fetch-Execute CycleProgram CounterInstruction RegisterRegister FileComputer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06AL Programmer’s World View:Instruction Set Architecture (ISA) Instruction set: the collection of all machine operations. Programmer’s View: sees set of instructions, along with the machine resources manipulated by them. ISA includes  instruction set,  memory, and  programmer accessible registers of the system. There may be memory or other resources used to implement some functions that are not part of ISA and are thus: “Non Programmer Accessible.”Computer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06Programmer’s Models of 4 commercial machinesComputer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06Machine, Processor, and Memory State The Machine State: contents of all registers in system, accessible to programmer or not. The Processor State: registers internal to the CPU. The Memory State: register contents in memory system. “State” is used in the formal finite state machine sense Maintaining/restoring machine & processor state:Important to many operations, especially procedure calls & interrupts.Computer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06HLL vs Assembly LanguageWhat capabilities are present/not present in HLL versus AL ?Under what circumstances will you choose one or the other ?Computer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06Data Type: HLL vs. Machine Language HLL’s provide type checking Verifies proper use of variables at compile time. Allows compiler to determine memory requirements. Helps detect bad programming practices. Most machines have no type checking The machine sees only strings of bits. Instructions interpret the strings as a type: usually limited to signed or unsigned integers and FP #s. A given 32 bit word might be an instruction, an integer, a FP #, or four ASCII characters.Computer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06Who Uses Assembly Language The machine designer must implement and trade-off instruction functionality The compiler writer must generate machine language from a HLL Applications where performance (time, space) is critical.  Special purpose or embedded processor programmers Special functions and heavy dependence on unique I/O devices canmake HLL’s uselessComputer Systems Design & Architecture 2ndEdition © 2004 Prentice Hall, Mark Franklin Spring 06Examples of HLL to Assembly Language MappingInst ruct ion Class C VAX Assembly LanguageDat a MovementArithmetic/ logicCont r ol f l owa = bb = c + d*egoto LBLMOV b, aMPY d, e, bADD c, b, bBR LBL The C compiler: Maps C integers to 32 bit VAX integers Maps C assign, *, and + to VAX MOV, MPY, and ADD


View Full Document

WUSTL CSE 362M - Lecture Notes

Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?