S
scott moore
Guest
Hi,
I am trying to perform a compare operation, and discard all of the right
side of an expression except for the carry. What I found works is:
input [7:0] opra;
input [7:0] oprb;
reg cout;
reg [8:0] dummy;
....
dummy = opra-oprb;
cout = dummy[8];
Because I just want the carry from the add, not the whole result.
The problem is that, of course, I get warnings about "dummy" not
being used.
I tried various things like:
cout = { opra-oprb }[8];
But that does not compile under Xilinx ISE.
Thank you.
Scott Moore
I am trying to perform a compare operation, and discard all of the right
side of an expression except for the carry. What I found works is:
input [7:0] opra;
input [7:0] oprb;
reg cout;
reg [8:0] dummy;
....
dummy = opra-oprb;
cout = dummy[8];
Because I just want the carry from the add, not the whole result.
The problem is that, of course, I get warnings about "dummy" not
being used.
I tried various things like:
cout = { opra-oprb }[8];
But that does not compile under Xilinx ISE.
Thank you.
Scott Moore