Forum Discussion
Altera_Forum
Honored Contributor
13 years agoHi all,
A quick update: I am now able to implement my algorithm and it is working fine. However, the amount of resources being used increased by 25% due to (inferred) division megafunction with compilation time of 8 minutes <- used to be 2.5 minutes. Is this expected? Can we optimise this? Compiler by default setup LPM_DIVIDE parameter (as expected) to be: Info (12134): Parameter "LPM_WIDTHN" = "40" Info (12134): Parameter "LPM_WIDTHD" = "40" Info (12134): Parameter "LPM_NREPRESENTATION" = "UNSIGNED" Info (12134): Parameter "LPM_DREPRESENTATION" = "UNSIGNED" Attached is code snippet for division, where all signals are 40 bits.
when calc_RGB_dyn =>
state <= wait_for_new_frame;
-- Calculate dynamic RGB = normalise new RGB
R_dyn_thresh <= ((R_thresh) / (normaliser));
G_dyn_thresh <= ((G_thresh) / (normaliser));
B_dyn_thresh <= ((B_thresh) / (normaliser));
end case;
Vincent