SIMULATION #9
ALU with write back
There is one major change for this lab. You no longer need an output LED Display. The outputs will be stored back into A. This creates a timing issue that you will need to handle. A WB (write back) register is suggested. Have your clock be a single pulse generator that you control so you can see what occurs at each step.
The Opcode for the 6 required functions (8 total) are as follows
FUNCTION NAME OPCODE OUTPUT
ADDA 0x02 A = A + operand
SUBA 0x06 A = A – operand
ANDA 0x04 A = A AND operand
ORA 0x01 A = A OR operand
EORA 0x07 A = A XOR operand
LDAA (immediate) 0x09 load A with #
LDAA (direct) 0x0A load A with memory
STAA 0x0C store A to memory
The full adder should have the following inputs and outputs.
INPUTS
Opcode - Attach to a 4-bit hex keypad
Operand - Attach to a 4-bit hex keypad
OUTPUTS
S0-S3 - NONE
C3 - Attach to LED