Taking ECE 391 Without Having Taken ECE 190
Notes prepared by Prof. S. Lumetta
There are a few concepts and skills that one learns in ECE 190 and that are expected from students who want to enroll in ECE 391 to have.
Some of these can be obtained in other classes, but several have to be learned independently.
Can be obtained in other classes:
- Programming Experience. Students in ECE 190 typically write programs with O(500) lines of C code.
The major projects involves things like an LC-3 simulator, and iterative deepening search to drive
a number puzzle GUI (GUI provided), and a LC-3 assembler. If you have never written programs with more
than ten or a hundred lines of code, you will be at disadvantage. Itís hard to compare directly with
other languages, but CS 225 seems like an adequate preparation for programming experience.
- Basic Computer Organization. The LC-3 is described and examined at a fairly high level in ECE 190.
The more detailed designs in 290 should be more than adequate, even if you have not taken ECE 190.
Will have to be learned independently:
- Calling Conventions and Stack Frames. In ECE 190, we discuss in some detail how stack frames for
functions are created, used, and torn down with the LC-3, as well as discussing the meaning and
specifics of the LC-3 calling convention and how it is used to map C functions to assembly code.
You will not see this type of information in any of the classes that you might have taken before
ECE 391, so you are probably going to need to read Patt and Patel (ECE 190 book) and/or look at
assembly code generated by a compiler (gcc ĖS).
- C to Assembly Translation. Students in ECE 190 should have a reasonable good grasp of the
relationship between C code and the assembly code produced by compiling that code. They have also
been exposed to the implementations of various more advanced language and library constructs
(e.g. simple memory management, virtual function tables), but have not written implementations
themselves. As with the previous item, there is no exposure to these concepts in other classes
that you might have taken before (exception is ECE 411 and CS 426).
- Assembly Programming. Students first learn LC-3 machine code and LC-3 assembly code, and write a
machine problem at each level (O(100) lines, so a little smaller than the C experience). As working
with device interfaces requires fairly careful control of data movement, students with no assembly
experience will be at disadvantage. The only other class in which students get assembly exposure is
ECE 390 (the old ECE 291). ECE 190 students have already seen one assembly language, but they are
all reasonably similar.
So whatís the bottom line? If you havenít taken ECE 190 but want to enroll in ECE 391,
youíll probably want to go to the library and read through the relevant sections of Patt and Patel (ECE 190 book).
You may want to try your hand at using some of the things mentioned above. You can get assignments and pointers
from the ECE 190 website.