ECE352 - Fall 2019

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 answers to questions and problems.

 

If you want to experiment with NIOS II programs outside of the labs I recommend purchasing a SOCkit board.

 

The schedule below is from an earlier offering.

The material and order may change as we move forward.

 

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

What you need to know to successfully program a computer

 

 

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

 

2.  Using Binary Quantities to Represent Other Things.

We will not cover real number representations (including floating point) yet. We will do so later in the semester.

**** Self-Assessment Quiz (answers)

**** 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.

 

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

**** Self-Assessment Quiz

 

 

4.  Introduction to the NIOS II programming model.

Practice questions: ADDI and immediates.

 

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

Lecture Slides: A = B + C, if-then-else (PPTX)

 

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

 

7.  Subroutines – Requirements – Calling and Returning

Lecture Slides: i. Calling and Returning (PPTX)

               ii. Call/return execution sequence (PPTX)

           

8.  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

 

9.  A Recursive Subroutine

 

10.Structures and recursive datatypes
We did not go over the assembly code yet. We will do so later on in the course.

 

11.Introduction to I/O Devices: The Parallel Port Interface (PIT)
For the time being read only the mapped I/O section.

 

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

 

13.Introduction to Interrupts / UART

 

14.The Timer Device

This is for reference for your lab.

 

   14.1     Floating-Point Number Representation

            Slide deck

            In lecture 2 there is additional material.

 

15.Code Races.

15.1     Stack Smashing Attacks (Viruses)

 

16.Emulating instructions in software via interrupts.

Lecture slides

 

17.A Single-Cycle Processor

 

18.Modifying the single-cycle processor
Slides used in the lectures: singlecycle.ppt

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

      Datapath drawing

      Notes formatted for better printing

 

20.Multi-cycle implementation: The control

      Control drawing

      Slides used in the lectures: multicycle.ppt

 

21.Modifying the multi-cycle implementation

 

22.Pipelined implementation

Lecture slides: pipelining

Description of the SRAM chip to be used in the lab: DE1 SRAM chip. The datasheet for this SRAM chip.

 

23.Multi-programmed Control Optional

 

24.Bus-based datapath/control implementation Optional

 

25.Pipelining example, interrupts, preserving sequential semantics and superscalar: slides.

 

26.Memory Interface: Connecting to Memory and Devices

Slides used in the lectures: bus and devices.pptx

 

27.Memory-Mapped I/O: Physical Implementation

 

 

28.Dynamic Scheduling: Out-of-order execution and register renaming: slides.

 

29.A Modern Processor: slides:

 

30.Independence Architectures: VLIW, SIMD, and Vector Processors: slides.

 

31.Graphics processors for general purpose computation: slides.

 

32.Control Flow Prediction: slides.

 

33.Synthesizing Large Memory from Existing Components

 

34.Memory: internal organization and operation, SRAM and DRAM: slides.

 

35.Caches (Prof. Steffan) – We will be going over this material over several lectures. We will cover it in a different way, and we may cover topics not referred to in these notes. Please keep notes during the lectures.

      Additional Notes on Caches

      Examples on Caches and Execution Time

  

35.Replacement policies, Virtual Memory and Multiprocessor systems: slides.

 

36.Floating Point Representation (see earlier notes #2 above): slides.

 

37.Addition and Adder Circuits: slides.

 

38.Multiplication and Division: slides.

 

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