Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with a "while loop" in the hdl coder

Status
Not open for further replies.

marinet

Newbie level 4
Joined
Sep 2, 2013
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
74
Hello,

I have written a matlab code and I try to produce a vhdl code by using the hdl coder. The problem is that the following error is appearing during the procedure of the code generation. "Found an unsupported unbounded loop structure. This loop may be user written or automatically generated due to the use of specific vector expressions or functions. For more information on unsupported loop structures, please refer to the documentation."

I have in the code a "while loop" and it seems that this is the error. My while loop has the following form:

while(A(i,j)>=0)
DD(i,j)=DD(i,j)+1;
A(i,j)=A(i,j)-7;
end

where A is an array and takes value from a subtraction: A(i,j)=abs(parti(i,j))-7;


Does anyone know why this error appears? As I know, the vhdl supports the "while loop".
 

permute

Advanced Member level 3
Joined
Jul 16, 2010
Messages
923
Helped
295
Reputation
590
Reaction score
268
Trophy points
1,343
Activity points
8,543
Support for some features of VHDL are for simulation only. I'm not familiar with hdl coder, so it might not be able to do anything suitable with the while loop to make it synthesizable.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
49,421
Helped
14,442
Reputation
29,148
Reaction score
13,239
Trophy points
1,393
Location
Bochum, Germany
Activity points
284,394
Usuallly while loops aren't supported for synthesizable VHDL. This is specified in IEEE 1076.6-2004 (RTL synthesis) and also applies to tools not strictly following this standard.

Technically, only loops with "bounded" iteration number can be synthesized, because they are enrolled to parallel logic. The shown snippet seems completely unsuitable for synthesis. As far as I know, the Matlab HDL coder is targetting to synthesis, so this looks either like a bug or wrong configuration of the tool.
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,097
Helped
2,079
Reputation
4,177
Reaction score
2,037
Trophy points
1,393
Activity points
39,471
As fvm said, hdl coder is pretty black and white when it comes to what will and will not convert. So the only answer is replace the while loop.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top