Fixed ALU to use the inputs we're actually going to be giving it
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
`timescale 1ns / 1ps
|
`timescale 1ns / 1ps
|
||||||
|
|
||||||
module ALU(
|
module ALU(
|
||||||
input wire [8:0] instruction,
|
input wire [3:0] opcode,
|
||||||
|
input wire [8:0] operand0,
|
||||||
|
input wire [8:0] operand1,
|
||||||
output wire [8:0] result
|
output wire [8:0] result
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -18,7 +20,7 @@ module ALU(
|
|||||||
|
|
||||||
// MUX chooses which result to show based on the OPCODE
|
// MUX chooses which result to show based on the OPCODE
|
||||||
mux_16_1 mux_result(
|
mux_16_1 mux_result(
|
||||||
.switch(instruction[8:5]),
|
.switch(opcode),
|
||||||
.A(A),
|
.A(A),
|
||||||
.B(B),
|
.B(B),
|
||||||
.C(C),
|
.C(C),
|
||||||
|
|||||||
Reference in New Issue
Block a user