Introduction
We shall be expanding upon the work done in a previous lab, lab 11.
There we designed a basic three port memory, where we controlled
basic read write functionality and entered input data and addressed
different parts of the memory using the switches and push buttons.
In this lab, using the ALU functionality, we will be able to perform
basic arithmetic operations on the data stored in the different
memory addresses, and thus update them.
Procedure
The top module alu_lab paired up the main module, alu_regs with
a button debounce module called btn_debounce. It used modules
from previous labs to debounce the push button signals.
The alu_regs is the module where the main work happened. It was
formed by renaming and then adding additional combinational logic
and the alu module to the memory_lab module. The alu module
used basic case statements that takes input from a 2-bit control
signal to select either of four arithmetic operations, add, subtract,
increment or decrement.
In order to explain the workings of alu_reg more fully, it is
convenient to refer to its block diagram.
Results
Conclusion