particleynamics
Newbie level 5
but y isn't it working here.. am doing my project work on this xilinx and I have to link a fpga to it.. how to get correct output here??
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
module adder(result,operand1,operand2);
input signed [31:0]operand1;
input [15:0]operand2;
output signed [31:0]result;
reg signed [31:0] result;
always @(operand1,operand2)
begin
result = operand2 + operand1;
end
endmodule
module adder(result, operand1, operand2);
input signed [31:0] operand1;
input [15:0] operand2;
output signed [31:0] result;
reg signed [31:0] [COLOR="#FF0000"]interim2[/COLOR];
always @(operand1, operand2)
begin
[COLOR="#FF0000"]interim2 = $signed(operand2);[/COLOR]
result = operand1 + [COLOR="#FF0000"]interim2[/COLOR];
end
endmodule