binarytobcd

This commit is contained in:
2024-12-23 02:57:13 +03:00
parent c5af5cfeda
commit 2f91f173de
10 changed files with 5491 additions and 3351 deletions

View File

@@ -2,7 +2,7 @@ module ALU (
input [3:0] A, B,
input CarryIN,
input [2:0] opCodeA,
output [7:0] Y,
output [11:0] bcd,
output CarryOUT, overflow
);
@@ -13,7 +13,7 @@ wire [3:0] add_Y, sub_Y;
wire [3:0] resultA, resultO, resultX, lUOutput1;
wire [3:0] aUtemp1, aUtemp2, lUOutput2;
wire [3:0] wireY, wireLA;
wire [7:0] opwireM, wireM;
wire [7:0] opwireM, wireM, Y;
opCode opCd (.A(opCodeA), .opCode(opCode8));
@@ -73,5 +73,7 @@ or o36 (Y[5], 1'b0, wireM[5]);
or o37 (Y[6], 1'b0, wireM[6]);
or o38 (Y[7], 1'b0, wireM[7]);
BinaryToBCD btod1(.binary(Y), .bcd(bcd)); // WIRE Y BINARY!!!!
endmodule