dbelanga
Newbie level 1

Dear all,
I'm working on a design with FPGA & image processing. I need to access image data at certain pixels. The pixel data can be accessed using address which use certain equation that might use several multipliers and other components. However, a precalculated number can be used in exchage to the equation and stored to memory. My question is what is the pros & cons of this two approaches? Which one would take longer time, access to memory (external/internal) or calculate the address?
example:
for m=1:10
for n=1:5000
equationA=3*n; % can be more complex
img(equationA)
end
end
or save the value of equationA (3,6,9,12,15....15000)and straight access memory. No need to calculate equationA
for m=1:10
img(3 6 9 12 15....15000)
end
I'm working on a design with FPGA & image processing. I need to access image data at certain pixels. The pixel data can be accessed using address which use certain equation that might use several multipliers and other components. However, a precalculated number can be used in exchage to the equation and stored to memory. My question is what is the pros & cons of this two approaches? Which one would take longer time, access to memory (external/internal) or calculate the address?
example:
for m=1:10
for n=1:5000
equationA=3*n; % can be more complex
img(equationA)
end
end
or save the value of equationA (3,6,9,12,15....15000)and straight access memory. No need to calculate equationA
for m=1:10
img(3 6 9 12 15....15000)
end