Course Overview CS 271- Computer Architecture and Assembly Language Outline • • • • • Syllabus Course objectives Schedule Required Software Basics of Computer Architecture 1 CS271 This?? Syllabus • • • • • Course website Contact information Office hours Textbook Grades 2 CS271 Syllabus: Course Website • http://classes.engr.oregonstate.edu/eecs/fall2014/cs271-501/ 3 CS271 Syllabus: Contact Information • Dr. Marc Rubin • Cascades Hall 210 • marc.rubin@osucascades.edu 4 CS271 !!! Syllabus: Office Hours • Cascades Hall 210 • Monday / Wednesday: 16:00 – 17:00 5 CS271 Syllabus: Textbook • Assembly Language Step by Step: Programming with Linux (3rd Edition) by Jeff Duntermann 6 CS271 Syllabus: Recommended e-book • Digital Design and Computer Architecture (2nd Edition) by Harris and Harris • FREE E-book for OSU students!! 7 CS271 Syllabus: Grades • 50% Homework • 35% Midterm • 15% Final (or Final Project, TBD) • Cheating will NOT be tolerated. 8 CS271 Outline • • • • • Syllabus Course objectives Schedule Required Software Basics of Computer Architecture 9 CS271 Course Objectives • Identify the major components of a computer architecture, and explain their purposes and interactions. • Simulate the internal representation of data, and show how data is stored and accessed in memory. • Explain the relationships between a hardware architecture and its instruction set, and simulate micro-programs. 10 CS271 Course Objectives (cont.) • Create and simplify circuits that produce specified output for given inputs (e.g., adders, multiplexers, etc.). • Explain the Instruction Execution Cycle. • Explain the differences and relationships among high-level, assembly, and machine languages. • Write well-modularized computer programs in an assembly language, implementing decision, repetition, and procedure structures. 11 CS271 Course Objectives (cont.) • Simulate the system stack as it is used for procedure calls and parameter passing. • Explain how editors, assemblers, linkers, and operating systems enable computer programming. • Explain various mechanisms for implementing parallelism in hardware/software. 12 CS271 How to Learn.. 13 CS271 What’s your learning style? • Visual, Auditory, Read / Write, Kinesthetic • http://www.vark-learn.com/english/page.asp?p=questionnaire 14 CS271 Outline • • • • • Syllabus Course objectives Schedule Required Software Basics of Computer Architecture 15 CS271 Schedule • Detailed schedule on course website • Increasing levels of abstraction: • • • • • • Logic gates Integrated circuits Micro-architecture Instruction set Assembly language … This is an Intel processor!!! 16 CS271 Schedule (rough) • • • • • Week 1: Introduction, logic gates Week 2: Boolean logic, data representation, simple circuits Week 3: Micro-architecture, execution Week 4: Macro-architecture, midterm Weeks 5-10: Assembly programming… Schedule may change as course progresses 17 CS271 Outline • • • • • Syllabus Course objectives Schedule Required Software Basics of Computer Architecture 18 CS271 Required Software • Main tools: 1. 2. 19 CS271 Logic gate / circuit simulator Assembler (on Linux OS) Required Software: logic gate / circuit simulator • Logisim: open-source, free simulator • Runs on Windows, Mac, and Linux • Simulate logic gates and simple circuits 20 CS271 Required Software: Assembler • NASM: The Netwide Assembler • NASM is installed on the Linux servers in Corvallis • Minimal (to no) lab support at OSU Cascades 21 CS271 Required Software: NASM on Linux • In accordance with main campus, we will use NASM on Linux 22 CS271 Required Software: NASM on Linux • For this course, you must either: • “ssh” into the Linux server(s) in Corvallis -OR• Install a Linux virtual machine on your PC 23 CS271 Required Software: NASM on Linux • Option (1): “ssh” into Linux machine(s) • For Windows, download the PuTTY client application • For Macs, use the Terminal application • OSU Engineering has help page(s) for ssh access: • http://engineering.oregonstate.edu/computing/personal/85 • Must use command line for navigation, editing, etc.! • You’re a computer scientist, after all.. 24 CS271 Required Software: NASM on Linux • Option (2): Install a Linux virtual machine on your PC • VMWare is free for OSU Engineering students to download • Create a Linux virtual machine • I can provide a virtual image with necessary software Linux running on my Mac!! 25 CS271 Required Software • Don’t worry about Logisim or NASM just yet • I will provide instructions later • In the mean time: • Download PuTTY and “ssh” into OSU Linux servers • Experiment with Linux command line: • There are many, many tutorials online http://community.linuxmint.com/tutorial/view/100 http://www.cyberciti.biz/tips/linux-unix-commands-cheat-sheets.html • Download / install VMWare 26 CS271 Break Time… Take 5-10 • Average attention span of American adult? • • • • 27 CS271 A) 10 minutes B) 20 minutes C) 40 minutes D) SQUIRREL!! Outline • • • • • Syllabus Course objectives Schedule Required Software Basics of Computer Architecture 28 CS271 Architecture Basics • ALL computers have the same basic components • • • • Computer Central Processing Unit (CPU) Memory Input Output CPU Memory Input 29 CS271 Output Architecture Basics: Central Processing Unit • “Brains of the computer” Computer • Main focus of this course • Control Unit: CPU Control ALU • Fetch / decode instructions • Arithmetic Logic Unit (ALU) Memory • Integer arithmetic • Logic operations • Much more… 30 CS271 Input Output Architecture Basics: CPU Intel i7 31 CS271 *images not to scale* Architecture Basics: Memory • Memory buffers data between I/O and CPU Computer CPU • Primary memory (RAM) • Expensive, fast • Volatile, limited size • “Close” to CPU Memory • Secondary memory (disk) • Inexpensive, slow • Persistent, vast size • “Far” from CPU 32 CS271 Input Output Architecture Basics: Input • Input devices for access • • • • • Computer Keyboard Mouse Joystick Sensor(s) … CPU Memory Input 33 CS271 Output Architecture Basics: Output • Output devices • • • • Computer Monitor(s) Speaker(s) Actuators … CPU Memory Input 34 CS271 Output Architecture Basics: Operating System • Operating system controls how CPU, Memory, Input, and Output interact • Operating system is software that runs on hardware • How is software and hardware related to each other? 35 CS271 Computer CPU Memory Input Output Architecture Basics: Hardware, Software, and Languages 1. High-level computer programming language (e.g., C++) 2. Low-level computer programming language (e.g., x86 assembly) 3. Machine language (binary code) 36 CS271 Architecture Basics: Hardware, Software, and Languages • High-level languages • English-like • Portable to various architectures • Translated into lower levels using compilers and assemblers 37 CS271 1. High-level computer programming language (e.g., C++) Architecture Basics: Hardware, Software, and Languages • Low-level languages • Instructions for specific architectures • Assembly is machine specific • Direct control of hardware • Translated into machine language using assemblers 38 CS271 2. Low-level computer programming language (e.g., x86 assembly) Architecture Basics: Hardware, Software, and Languages • Machine language • Binary code instructions for specific architecture • NOT human readable 3. Machine language (binary code) 39 CS271 Architecture Basics: Hardware, Software, and Languages 1. High-level language compiler translates source code to… 2. Low-level language assembler translates instructions to… 3. Machine language object code gets loaded and executed 40 CS271 Summary of Today’s Lecture • Went over course objectives, syllabus, grading, and schedule • Described the software required for this course • Logisim • NASM on Linux • Covered the basic components of ALL computers • CPU, Memory, I/O • Described hierarchy of languages • High-level, low-level, machine language 41 CS271 Next Steps… • Download this lecture • “ssh” into OSU’s Linux server(s) • Get oriented with Linux command line… • Stay tuned for first homework assignment • Next lecture will cover Logic Gates 42 CS271