S
Sam Lay
Guest
What is the significance of the curlies (concat operator)
on the RHS of the loop counter incrementer in the following
code:
function [WIDTH-1:0] crulyfunc;
input [WIDTH-1:0] my_input;
integer i;
begin
curlyfunc[WIDTH-1] = my_input[WIDTH-1]
/* Here */
for (i=WIDTH; i >= 0; i={i-1})
/* ^ ^ */
curlyfinc =curlyfunc[i+1] ^my_input;
end
endfunction
Some have told me that it causes the carry out to be discarded, thus
keeping the RHS and LHS the same size. Others have siad that the
concat op can be used on the LHS of an assignment for the same purpose.
I can't get much out of the LRM on this.
What are the simulation and synthesis implications of using or not using the
curlies in such cases?
Thanks, Sam
on the RHS of the loop counter incrementer in the following
code:
function [WIDTH-1:0] crulyfunc;
input [WIDTH-1:0] my_input;
integer i;
begin
curlyfunc[WIDTH-1] = my_input[WIDTH-1]
/* Here */
for (i=WIDTH; i >= 0; i={i-1})
/* ^ ^ */
curlyfinc =curlyfunc[i+1] ^my_input;
end
endfunction
Some have told me that it causes the carry out to be discarded, thus
keeping the RHS and LHS the same size. Others have siad that the
concat op can be used on the LHS of an assignment for the same purpose.
I can't get much out of the LRM on this.
What are the simulation and synthesis implications of using or not using the
curlies in such cases?
Thanks, Sam