--- Quote Start ---
With a 512x512 image - you need to use ram. There will not be enough resources to store an entire image in registers (and it would take forever to compile).
You need to rethink your design.
--- Quote End ---
I understand that sir completely... But currently i have to work with a small matrix only...once algorithm is developed it is not very difficult to apply it to a full size image..
(i have generated the hex file of the image from MATLAB, all i need is to load each value from that file with every clock cycle, hence i am trying to develop the code for algorithm first...)