ECE243 - “SPRING” 2014

Natalie Enright Jerger (notes originally developed by Andreas Moshovos (*))

 

** Warning **

 

There may be errors or omissions in the notes that follow and of course I’m responsible for them. If you do spot an error please let me know. There are no intentional errors in the notes. Irrespective of any typos and other errors, you are responsible for the “correct answer” to questions and problems.

 

If you want to experiment with NIOS II programs outside of the labs I recommend purchasing a DE-1 or a DE-2 board.

 

Chapter 8 from Altera’s NIOS II Processor Reference: NIOS II Instruction Reference

The complete NIOS II Processor Reference: NIOS II Processor Reference Handbook

 

 

THEMATIC SECTION #1: Understanding what computers do at the low level:

What you need to know to successfully program a computer

 

Week of January 5

 

1. Introduction, course goals, digital systems and why they are useful.

 

2. Using Binary Quantities to Represent Other Things.

      **** Program to print out the floating point representation in hexadecimal.

**** Practice questions Answers

* More information about floating point numbers – we will not cover or discuss any of this material.

 

 

Week of January 12

 

3. Behavioral Model of Memory.

* if there is time we will cover this in the lectures:

       - The DE1 SRAM memory chip interface: lecture slides, datasheet

**** Practice questions

 

4. Introduction to the NIOS II programming model.

(book 3.8 and some of 3.9 and 2.4)

Practice questions: ADDI and immediates.

5. Using Assembly to Write NIOS II programs.

 

Week of January 19

 

     

   Step-by-Step Examples of loads and stores

 

6. Simple Control Flow (non straight-line sequencing).

 

7. For loops, arrays and do-while loops.

      (not as-is in the book related sections 2.11 and 3.15)

 

Week of January 26

 

8. Subroutines – Requirements – Calling and Returning

 

9. Subroutines – Passing Arguments

      Examples of functions using strings as arguments

      Strings are zero-terminated in C. So “lala” is stored in memory as five bytes: ‘l’, ‘a’, ‘l’, ‘a’, 0.

      You can think of strings as arrays of bytes where the last element is always zero.

      See lecture 2 for more information.
      Another example of subroutine calls

 

Week of February 2

 

 

10. Introduction to I/O Devices: The Parallel Port Interface (PIT)

      Please ignore the digital design of the PIT interface and the circuits for address decoding. We will discuss these later in the course.

 

Week of February 9

 

11. The Timer Device

12. The Serial Port / Universal Asynchronous Receiver Transmitter (UART)

13. Structures and recursive datatypes

 

Week of February 16

 

Reading week.

 

 

Week of February 23

 

14. Introduction to Interrupts / UART

15. Instruction Encoding

 

THEMATIC SECTION #2: Building Processors:

What you need to know to build a computer

 

16. A Single-Cycle Processor

17. Modifying the single-cycle processor

      Slides used in the lectures: singlecycle.ppt

 

 

 

Weeks of March 3 and March 10

 

18. Multi-cycle implementation: General principle and the datapath

      Datapath drawing

      Notes formatted for better printing

 

19. Multi-cycle implementation: The control

      Control drawing

      Slides used in the lectures: multicycle.ppt

 

20. Modifying the multi-cycle implementation

 

 

 

Week of March 16

 

 

21. Memory Interface: Connecting to Memory and Devices

 

 

22. Memory-Mapped I/O: Physical Implementation

 

Week of March 23

 

23. Synthesizing Large Memory from Existing Components

 

24. Caches (Prof. Steffan) – We will be going over this material over several lectures

    Additional Notes on Caches

    Examples on Caches and Execution Time

 

Week of March 30

 

25. The C Switch Statement

 

26. Binary Manipulation Instructions and Multiplication as a series of sum or differences of multiplication with powers of 2 / Booth’s Algorithm

 

Week of April 6

 

27. Instruction Set Classification

 

28. Emulating instructions in software

 

 

 

(*) Permission is given to reproduce these notes provided that a notice of their origin is clearly given. All rights reserved just in case :)