Lecture 1: Course introduction g g g g g Course organization Historical overview Computer organization Why the MC68000? Why assembly language? Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University 1 Course organization g Grading Instructor n Exams g 1 midterm and 1 final n Homework g 4 problem sets (not graded) n Quizzes g Biweekly n Laboratories g 5 Labs Teaching Assistant g Grading scheme Quizes Laboratory Midterm Final Exam Ricardo Gutierrez-Osuna Office: 401 Russ Tel:775-5120 [email protected] http://www.cs.wright.edu/~rgutier Office hours: TBA Weight (%) 20 40 20 20 Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University Mohammed Tabrez Office: 339 Russ [email protected] Office hours: TBA 2 Course outline g Module I: Programming (8 lectures) g MC68000 architecture (2) g Assembly language (5) n Instruction and addressing modes (2) n Program control (1) n Subroutines (2) g C language (1) g Module II: Peripherals (9) g Exception processing (1) g Devices (6) n PI/T timer (2) n PI/T parallel port (2) n DUART serial port (1) g Memory and I/O interface (1) g Address decoding (2) Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University 3 Brief history of computers GENERATION FEATURES Early machines (3000BC-1945) Mech., Electromech. First (1945-1956) Vacuum tubes Second (1956-1963) Transistor (1947) Third (1964-1971) IC (SSI, MSI) Fourth (1971-present) Microprocessor LSI, VLSI MILESTONES Asia Minor, Abacus Blaise Pascal, Pascaline Charles Babbage Differential Engine Herman Hollerith, Punch Card Howard Aiken, Harvard Mark I Alan Turing, Colossus Eckert, Mauchly, ENIAC Von Neumann, EDVAC MIT Lincoln Labs, TXO High level programming languages IBM Stretch, Sperry-Rand LARC Seymour Cray, CDC 6600 IBM SYSTEM 360 DEC PDP-8 Intel 4004 Intel 8008 Motorola 6800 Intel 8086 Motorola 68000 Intel 80286 Motorola 68020 Intel 80386 Motorola 68030 Intel 80486 Motorola 68040 Motorola Power PC 601 (G1) Intel Pentium Motorola 68060 Motorola Power PC 603 (G2) Motorola Power PC 604 (G3) Intel Pentium Pro Motorola Power PC 620 (G4) Intel Pentium II Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University YEAR 3000BC 1642 1823 1889 1937 1943 1946 1950 1953 1956 1950s 1964 1964 1965 1971 1972 1974 1978 1979 1982 1984 1985 1987 1989 1991 1993 1993 1994 1994 1994 1995 1996 1997 NOTES Only replaced by paper and pencil Decimal addition (8 decimal figs) Steam powered US census, origin of IBM Ballistic charts of US Navy Decode German ENIGMA codes 1st general purpose electronic computer Von Neumann architecture st 1 computer based on transistors FORTRAN (1956), COBOL (1959) st 1 supercomputers, scientific computation st 1 to use parallelism (10 processors) Makes other systems obsolete st 1 successful minicomputer 4-bit (1st microprocessor) 8/8/14 8/8/16 16/16/20 32/16/24 16/16/24 32/32/32 32/32/32, pipelining 32/32/32, MMU 32/32/32, cache, FPP 32/32/32, FPP 32/64/32, RISC, super-scalar 32/64/32, super-scalar 32/32/32, super-scalar 32/64/32, portable computing 32/64/32, server, workstations 32/64/32 (optimized for 32-bit OS) 64/64/32 32/64/32, MMX 4 Anecdote: the first ‘bug’ (1945) g Grace Murray Hopper, working in a temporary World War I building at Harvard University on the Mark II computer, found the first computer bug (a moth) beaten to death in the jaws of a relay. n She glued it into the logbook of the computer and thereafter when the machine stopped (frequently) they would tell Howard Aiken that they were "debugging" the computer. n The very first bug still exists in the National Museum of American History of the Smithsonian Institution. The word bug and the concept of debugging had been used previously, perhaps by Edison, but this was probably the first verification that the concept applied to computers. Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University 5 Computer organization building blocks g Memory n Stores the instructions and data comprising the program to be executed g CPU n Interprets and executes program instructions in sequence g I/O devices n Communicates the CPU with the real world g System buses n A collection of wires that allow access to the circuitry around the CPU Address bus Data bus Control bus CPU I/O DEV MEMORY Interface circuitry Peripheral devices Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University 6 Memory types g Classification by access Registers n Registers: Internal to the CPU n Cache: Tightly linked to the CPU n Main memory: Connected to system buses n Secondary memory: On-line n Archival: Off-line Semiconductor Fast and Expensive Cache Main Memory Secondary Memory Magnetic/Optical Archival Storage Cheap and Slow g Classified by technology n Semiconductor g Random Access Memory (RAM) n Semiconductor memory Magnetic memory Optical memory Volatile, Read and write g Read Only Memory (ROM) n Non-volatile, Can only be read n Magnetic memory RAM g Disk, Tape ROM Disk Tape CDROM n Optical g CD-ROM MEMORY ACCESS Registers Cache Main memory Secondary memory Archival storage Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University RAM X X X MEMORY TECHNOLOGY ROM Disk Tape X Virtual X X Optical X X 7 Central Processing Unit g Registers g Arithmetic-Logic Unit (ALU) n n n n n n Performs the operations required by the CPU g Control Unit n Determines the operation to be performed by an instruction n Sets in motion necessary actions to perform the operation D0 IR D7 CONTROL UNIT PC A0 SR/CCR A7 Data/Address Registers Instruction Register Program Counter Status Register Memory Data/Address Registers MDR ALU MAR Data bus Address bus Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University 8 I/O devices g Mass-Storage Devices n Hold large quantities of information that cannot fit into the computer’s main memory n Disks, tapes, CD-ROMs g Human Interface Devices n Input: keyboard, mouse, ... n Output: displays, printers, ... g Control/Monitor Devices n Control devices are actuators (outputs) n Monitor devices are sensors (inputs) Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University 9 System buses g Address Bus n Carries the location in memory of a given item n Uni-directional (always supplied by the CPU) n Determines maximum amount of memory available to CPU g Data bus n Carries data between CPU and memory or I/O devices n Bi-directional n Determines the width of the architecture g Control Bus n Carries timing signals (and more) to synchronize CPU to external circuitry n Highly dependent on the specific CPU Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University 10 CPU operation g CPU “fetch-execute” cycle n fetch instruction from memory n decode instruction n perform operations required by the instruction function von_newmann { pc=init_pc(); while (not_done) { opcode = fetch_instr(memory[pc]); execute(opcode); pc=pc+1; } } function execute(opcode) { decop = decode(opcode); MEMORY FETCH CPU if need_data(decop) { EXECUTE (manipulate data as programmed) data = get_data(decop); } result = compute(decop, data); if save_result(decop) { save_result(decop, result); } Program Counter DECODE & EXECUTE Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University } 11 Opcode fetch CPU N Program Counter Address bus Data bus opcode Instruction Register MEMORY Clock ____ Read Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University Control bus opcode N+1 N N-1 12 Why the MC68000? g A straightforward and ‘nice’ µP Powerful and relatively simple instruction set Sophisticated interfacing capabilities Ability to support multi-tasking The most popular µP family in academia Flat memory map 3000 4-bit 8-bit 16-bit 2500 Look at the microcontroller market # microcontrollers (millions) n n n n n 2000 1500 1000 500 0 1990 Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University 1991 1992 1993 1994 1995 year 1996 1997 1998 1999 2000 13 Why assembly language? g Hardware prospective n Assembly language teaches how a computer works at the machine level (i.e. registers) n Assembly language helps understand the limitations of the Von Neumann architecture g Software prospective n The foundation of many abstract issues in software lies in assembly language and computer architecture: g Data types, addressing modes, stack, recursion, input/output g Assembly language is not used just to illustrate algorithms, but to demonstrate what is actually happening inside the computer! Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University 14 Micro-processor Vs. Micro-controller g Micro-processor (MPU, µP) n n n n CPU alone may contain some memory classified by data path width 4, 8, 16, 32 or 64 bits Ex: MC68000 g Micro-controller (MCU) n n n n microprocessor plus peripherals on a single chip a one chip computer system additional peripherals may be interfaced separately Ex: 68HC11 Microprocessor-based System Design Ricardo Gutierrez-Osuna Wright State University 15
© Copyright 2024 Paperzz