ECE243 - “SPRING” 2009
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 no intentional errors in the notes. Irrespective of any typos and other errors, you are responsible for the “correct answer” to questions and problems.
How these relate to the recommended book: In our lectures we will use a slightly different order than the book and also emphasize some topics more than others. Accordingly, there may not always be a direct correspondence between a lecture and a book section. Where possible I will be noting the book sections each lecture corresponds to.
If you want to experiment with NIOS II programs outside of the labs I recommend purchasing a DE-1 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
These are the notes from 2008. I will be updating as we progress through the course as needed.
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
(book chapter 1 except 1.6 & 1.7)
Week of January 12
2. Using Binary Quantities to Represent Other Things. Typos at the last conversion fixed. Jan 23rd, 2009.
* More information about floating point numbers – we will not cover or discuss any of this material.
(book 2.2 – 2.3)
* if there is time we will cover this in the lectures:
**** Practice questions
(book 3.8 and some of 3.9 and 2.4)
Week of January 19
Please note that in some of the lecture notes I use the io variety of loads and stores. That is a leftover that I have yet to edit from an earlier version of the lab system.
Please replace all ldwio, etc. with the non-io version. IO loads and stores bypass processor caches (we will talk about caches later on). Your program may run slower and in some cases incorrectly if you use the io versions of loads and stores.
(book 2.6, 3.10 and the MSL website)
Additions and modifications on January 19, 2010: Simplified code for understanding (removed %hiadj() and %lo() – code is less efficient). Added discussion of if-then, and examples of branch immediate field calculations.
(book 2.4.5, 2.4.6, 3.11.1, 3.11.2)
(not as-is in the book related sections 2.11 and 3.15)
Week of January 26
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.
Week of February 2
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
13. The Timer Device
Fixed typos and rewrote the introduction on Feb 6 and Feb 10.
Week of February 16
Week of February 23
THEMATIC SECTION #2: Building Processors:
What you need to know to build a computer
(*) Permission is given to reproduce these notes provided that a notice of their origin is clearly given. All rights reserved just in case :)
Week of March 2
Week of March 9
Corrections made on April 3. Please download the corrected control diagram.
Week of March 16
We skipped this à 23. Bus-based datapath/control implementation
Corrections made on April 3. NIOS II does not enable ME for only one cycle, it stays on for the duration of the transaction.
Also, one of the byte enable examples was wrong (correction shown in red).
Week of March 23
27. Caches (Prof. Steffan) – We will be going over this material over several lectures
Week of March 30
Week of April 6
33. Virtual Memory and Pipelining Concept (no notes – not part of the material that will be tested in the final)