CSE A225 - Assembly Language Programming for Engineers

Class: Tues/Thurs 1:00-2:15 PM, ENGR-109

Engineering Building, 2nd Floor, Office 227C
Phone: 907-786-6756
Cell: 303-641-3999
E-mail: ssiewert@uaa.alaska.edu

Office Hours:
Tues, Wed, Thurs @ 2:30-4:00 PM; Tues, Thurs @ 9:30-11:00 AM
Please note that all course materials should be consulted on Blackboard at http://uaa.alaska.edu/classes
If for some reason you can't access BB, this page is provided as a backup.


Course Description: Analysis and design of electronic devices used as building blocks for construction of simple combinational and sequential digital systems. Presents formats for data storage, number systems and alphanumeric codes, and methods of implementing logical and arithmetic operations within computers. Relates hardware components’ capabilities and limitations to design requirements for computer processing, memory, and control functions. The TI-OMAP processor is used (Beagle xM) to explor ARM assembly programming using Linux and to provide a reference architecture to study. The MIPS assembly language is used with with a simulator to follow the text and to understand and compare MIPS with ARM.

Important Course Links
  1. Link to Order REQUIRED TEXT, Computer Organization and Design, Fourth Edition: The Hardware/Software Interface by David A. Patterson and John L. Hennessy, from Amazon
Link to Example Code for CSE A225
Labs
Docs
Qt SPIM - MIPS Simulator
MARS - MIPS Simulator
ARM TI-OMAP OMAPpedia
Grading Policies

Syllabus (See Blackboard for Definitive Copy)
Week-1 [8/28, 30]:

    Read: Computer Organization and Design (COD), Chapter 1
    Acquire Beagle xM and start to work on setup
    Lecture: on why studying Assembly is valuable for Computer Engineers
    Start Lab #0 - Getting Started with the Beagle xM and Assembly

Week-2 [9/6] : 9/4 is a Holiday

    Discuss: Chapter 1 and Lecture on High Level Features of a CPU
        Processing
        I/O
        Memory
        ALU - Arithmetic Logic Unit
    Discuss: Lab #0 and any challenges faced in doing the work

Week-3 [9/11, 13]:

    DUE: Lab #0 FIRST DRAFT via e-mail to instructor before class on 9/11
    Discuss: IPC and CPI Performance Metrics and Why They are Important
        Read "Performance monitoring and tuning", http://www.ibm.com/developerworks/webservices/library/pa-bigiron3/
    Read: Chapter 2 of COD
    Lecture: on Methods of Hardware and Software Debug and Typical IDE (Integrated Development Environment)
        The Host and Target IDE
        Software Debug - How it Works?
        Hardware Debug with a JTAG - How it Works?
    Discuss: Lab #0 on 9/13 and Chapter 2
    Start Lab #1 - Authoring and Verifying Simple Assembly Code for ARM-7 ISA on Beagle xM
    DUE: Lab #0 on 9/14 @ Midnight

Week-4 [9/18, 20]:

    Class Lab Work: Assembling, Linking, and C-code Dis-assembly on ARM
    DUE: Lab #1 on 9/21 @ Midnight
    Lecture: on Fundamentals of Logic Design Used in an ALU and Pipeline Concepts

Week-5 [9/25, 27]:

    Read: Chapter 3 of COD
    Lecture: on Number Representation and ALU Arithmetic
        Review - 1's and 2's Complement for Addition and Subtraction
        Multiplication and Division
        Floating Point - Read "FPU architecture, now and then", http://www.ibm.com/developerworks/library/pa-bigiron1/
    Start Lab #2 - Exercises on Paper for ALU Arithmetic

Week-6 [10/2, 4]:

    Lecture: ARM ASM vs MIPS ASM and Fundamentals of Register Files and Instruction Formats
    Class Lab Work: Debugging ASM on ARM
    DUE: Lab #2 on 10/5 @ Midnight

Week-7 [10/9, 11]:

    REVIEW: Material in COD Through Chapter 3 (SQ3R - Scan, Question, Read, Recite, Review)

    EXAM-1: Through the End of Chapter 3 in COD on 10/11

Week-8 [10/16, 18]:

    Exam Solutions Overview
    Read: Chapter 4 of COD
    Start Lab #3 - Algorithm Investigation in Assembly #1: Finding Duplicates

Week-9 [10/23, 25]:

    Lecture: Fundamentals of a Pipeline Processing Unit
        The ALU Datapath
        Pipeline Concepts and the RISC ISA
        Pipeline Hazards
        Exceptions
    Discussion: RISC vs. CISC ISA
    Class Lab Work: Measuring Performance of the Basic Block and Mixed Mode C and Assembly Coding
    DUE: Lab #3 @ Midnight on 10/19

Week-10 [10/30, 11/1]:

    Read: Chapter 5 of COD
    Hands-On Lab Work in A219 - Demo of Mixing C and Assembly for ARM

    Start Lab #4 - Algorithm Investigation in Assembly #2: Simulation of Dynamics with Floating Point

Week-11 [11/6, 8]:

    Lecture (Ch. 5): Design of Memory Hierarchy and How it Works
        Direct Mapped and Set-Associative Cache
        The MMU
        SRAM and DDR
        Memory Performance
    Discussion: Hardware Set-Associative Cache vs. Software Cache Methods, MMUs - what are they and what are they good for?
    Read: Chapter 6 of COD
    DUE: Lab #4 @ Midnight on 11/9

Week-12 [11/13, 15]:

    11/13 - Guest Lecture - Dr. Randy Moulic

    Finish Up COD Chapter #5 and Lab #4

    Lecture (Ch. 5): Design of Memory Hierachy and How it Works (Part 2)
        Virtual Memory
        Virtual Machines
    Class Lab Work - Memory Fundamentals on Linux (e.g. Proc, top, slabtop, and meminfo)
    Discuss Lab #4 and #5


Week-13 [11/20]: 11/22 is a Holiday

    Lecture (Ch. 6): I/O and Storage - MMIO, Peripheral Bus, Nand Flash and SATA
        MMIO vs Dedicated I/O Pins
        Peripheral bus and MMIO
        Peripheral bus and DMA
        Nand Flash Devices I/O Interface
        SATA Disk Driver I/O Interface

    Class Lab Work - I/O Fundamentals

    Start Lab #5 - I/O on the Beagle xM

Week-14 [11/27, 29]:

    Review Through Chapter 6 in COD
    EXAM-2: Through the End of Chapter 6 in COD (Emphasis on Chapters 4,5,6) on 11/29

    Read: Chapter 7 of COD
    Start Lab #6 - Optimize/Analyze Code Generation and/or ASM for your Favorite Algorithm Selected from Labs #3, #4, or #5

    DUE: Lab #5 @ Midnight on 11/30

Week-15 [12/4, 6]:

    Lecture: How Multi-Core CPUs work and NUMA vs. UMA
        Amdahl's Law
        Flynn's Taxonomy
        Connecting Multiple Processor Cores to a Shared Memory - On/Off Chip UMA
        Connecting Multiple CPUs to Memory - Off Chip NUMA

    Discussion: Pulling it All Together
    Lecture: Review for the Final Exam

    DUE: Lab #6 @ Midnight on 12/7

Finals Week [12/10, 15]:

    FINAL EXAM