VHDL Loop error: Process Statement must contain only one Wait Statement

Status
Not open for further replies.

syyang85

Newbie level 3
Joined
Dec 16, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,331
This is a typical counter which counts until 31 with every clock coming in
but im havin this error
Error (10398): VHDL Process Statement error at count31.vhd(27): Process Statement must contain only one Wait Statement

why can't i have more than more than 1 wait statement in the process, if not how am i ever to loop it?
any ideas?


when i try to change wait until CLK='1'; to if (CLK'event and CLK='1') then

It gave me warning of exceeding 10,000 iteration.

Why it wont exit the loop when the condition of (intern_value<31) is fulfilled?
 

Re: VHDL Loop error

Instead of giving verbose explanations, why the code won't be synthesizable, may I simply ask, what you wan't to achieve?
 

Re: VHDL Loop error

Actually I was experimenting with the Loop statements.

Actually, im building a data acquisition module for a camera

Here's the scenario, typical camera have vsync,href,pclk and 8-bits data.
vsync represents new frame
href represents new line
pclk represents new pixel
**broken link removed**
I would like to capture the first 50x50 pixels of the frame and another frame after the 60th frame.

All I need is two frames.

I'm getting this error
Error (10519): VHDL Type or Variable Declaration error at camera.vhd(44): bounds of type or variable range must have same type

Error (10515): VHDL type mismatch error at camera.vhd(44): integer type does not match string literal

Here my code:
 

Re: VHDL Loop error

Yes, I see what you are intending. But it doesn't work this way. Taking just a snippet from code:
Code:
IF(href'EVENT AND href = '1' ) THEN 
FOR line_count IN "0000000" TO "110010" LOOP 
line_count <= line_count + "0000001";---------COUNTS LINE UNTIL 50 
...
END LOOP;
END IF;

First there is a syntax error. line_count as the loop parameter is already iterated by the FOR .. LOOP statement. It don't need an explicite declaration and must not be assigned a value.

Furthermore, the code doesn't work as intended. I understand, that href events shall be counted. But actually, the iteration is executed for each line. Basically, you can't build a counter this way.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…