minor fixes on alu
This commit is contained in:
@@ -47,6 +47,7 @@ always @(*) begin
|
|||||||
alu_out = tmpOut;
|
alu_out = tmpOut;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
//TODO: improve this part using increment/decrement logic
|
||||||
if (alu_out < 0)
|
if (alu_out < 0)
|
||||||
flag = 0; // negative flag
|
flag = 0; // negative flag
|
||||||
else if (alu_out = 0)
|
else if (alu_out = 0)
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ package lookahead (
|
|||||||
input [15:0]b,
|
input [15:0]b,
|
||||||
);
|
);
|
||||||
|
|
||||||
res = and16(y, a, b);
|
res = and16(y, a, b);
|
||||||
|
|
||||||
for (i=0; i<15 ; i=i+1)
|
for (i=0; i<15 ; i=i+1)
|
||||||
if (res[i] = 0)
|
if (res[i] = 0)
|
||||||
carry_bit[i] = 0;
|
carry_bit[i] = 0;
|
||||||
else
|
else
|
||||||
carry_bit[i] = 1;
|
carry_bit[i] = 1;
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
endpackage
|
endpackage
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import alu::*;
|
||||||
Reference in New Issue
Block a user