Lab 7: Store Unit Components

This is the last stage!

Using our final design diagram, put together a Store Unit containing three simple memry units:

Memory UNits

We need three new memory unuts here:

  • Stack
  • Data Memory
  • I/O memory

Each should have dynamically allocated memory arrays, like what you did for the instruction memory and register file earlier.

All of these memory units will support reading and writing, so we need a control signal that selects that action. For now, set up the stack so it only supports “push” and “pop” actions. This memory component will maintain the “stack pointer” internally, modifying it as needed for each supported action.

Testing New Parts *************

You should add test code to verify that all operations supported by these new components work properly. As usual, place this new code (header file, implementation, and test code) in the Lab2 project repository.