User Tools

Site Tools


haas:spring2011:asm:week2

If you haven't taken a look at the repository lately, we've had some changes.

Be sure to do an “svn update” to get the latest and greatest goodies.

We now have discrete classes for AND, OR, NOT, and XOR. I hear at least one flip flop implementation may be on its way. There's still the negated versions of the binary gates to implement (NAND, NOR, XNOR— which would be neat to see implemented by using the existing functionality in the existing classes).

In addition to the basic logic gates, I'd hope everyone takes a look at and familiarizes/asks questions about/starts implementing the following:

  • flip flops
  • registers
  • half adder
  • full adder
  • shift register
  • rotating register (similar to shift but has a useful feature)

In terms of the actual CPU simulator, we'll also want to start looking at an interface of sorts. I'd recommend starting with a plain ASCII interface… this should consist of a looping prompt enabling the following for the user to select:

  • display memory (perform a formatted hex dump of memory)
  • display registers (display registers and their current values (in hex)
  • list program (translates hex into assembly mneumonics)
  • edit program (enter code into memory)
  • execute program
  • single step program (execute, but pause after each instruction to allow memory/register display and other commands as needed).
  • load system (enable loading of system parameters– cpu type, ram, devices)
  • load program (enable loading of code into “memory”)
  • save program (save code from our “memory” to file)
  • quit

Obviously, since we haven't even implemented our registers or memory yet, we can fully implement these features yet… but we can have a shell program in place that can be extended once we get various pieces of functionality on-line.

As always, ASK QUESTIONS. A lot of things will make more sense.


If you go to the course notes wiki (which everyone should be updating each week), I have added some stuff that would facilitate our documentation of our code APIs.

Specifically, there's a Directory Tree table showing the various files in our repository and associated descriptions, along with a link to the AND Gate API (showing function breakdowns, explanations, and sample usage).

I'd like for us to document all our stuff this way so anyone can get up to speed on the functionality of a piece of code (whether or not they wrote it).

haas/spring2011/asm/week2.txt · Last modified: 2011/01/30 16:00 by 127.0.0.1