Excessive use of resources by vhdl converted file from MATLAB (HDL CODER)
Ältere Kommentare anzeigen
The function that I input to the hdlcoder provided by matlab is of the form function y = add_images(a,b) a = reshape(a,256,256); b = reshape(b,256,256); y = a + b; y = reshape(y,1,65536); the resulting hdl code utilises 65536 adders!!! which is too high,, I want just one adder that adds up the input values repetitively... I mean it should consider just one value for a and b each at a time.... How is that possible??? Please help
2 Kommentare
Mohammad Rafi Lone
am 26 Aug. 2014
Tim McBrayer
am 26 Aug. 2014
I'm sorry that I wasn't clear. If loop streaming does not take effect on your matrix add as originally written, then you need to try loop streaming on the explicit loop version. The code you have written has 64K adders, in either form. HDL Coder needs to be instructed that you want some lesser number of adders, with a corresponding increase in the required clock speed. The way to do this is via the loop streaming feature.
Antworten (1)
Tim McBrayer
am 25 Aug. 2014
0 Stimmen
You can investigate Loop Streaming to see if it will address your issue. If it does not do so using the native matrix '+', you may need to write the nested for loops explicitly.
Kategorien
Mehr zu Code Generation finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!