Excessive use of resources by vhdl converted file from MATLAB (HDL CODER)
Mostrar comentarios más antiguos
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 comentarios
Mohammad Rafi Lone
el 26 de Ag. de 2014
Tim McBrayer
el 26 de Ag. de 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.
Respuestas (1)
Tim McBrayer
el 25 de Ag. de 2014
0 votos
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.
Categorías
Más información sobre HDL Coder en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!