Hi, I'm trying to generate a VHDL code from Hdl coder. My function file is like below.
Mostra commenti meno recenti
function[a]=frfunc(x,y,c)
a=0;
for i=0:c
a(i)=x(i)+y(i);
end
end
The error was
"Found an unsupported unbounded loop structure at '...'. This loop may be user defined or automatically generated due to the use of specific vector expression or function".
so how to write a for loop whose limit(i.e 'c') is read from the test bench file.
1 Commento
Walter Roberson
il 25 Gen 2017
Modificato: Walter Roberson
il 25 Gen 2017
You appear to be indexing at 0, which would not lead to the message you are seeing but would lead to other errors.
You should be using initializing a to the appropriate size, such as
a = zeros(1, c+1);
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su HDL Coder in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!