Hi everybody! I have a question about coding&timing/delay relationship.
Considering a code like this
Quote:
for index 0 to MAX_N loop
varMatrix:= CONV_INTEGER(matrix(index));
diff := avarMatrix;
if(diff < VAL) then
c:= coeff(diff);
else
c := 1;
end if;
prod := ker(index)*c;
...
end loop;

where i create a variable for every accessed array element , and considering this code
Quote:
for index 0 to MAX_N loop
if( abs(aCONV_INTEGER(matrix(index))) < VAL) then
prod := ker(index)*coeff( aCONV_INTEGER(matrix(index)) );
else
prod := ker(index);
end if;
...
end loop;

where i use every time that i need the "whole" indexedarray element.
If these two codes have different hardware mapping, which of these two codes are faster?
Code 1 implies a register (thus a delay) for every created variable?
Code 2 implies only that a "wire" is taken from a source?
Sorry if it sounds a bit messy