Verilog for loop error.

Status
Not open for further replies.

Rohit Ranjan

Newbie level 2
Joined
Oct 24, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
12
I am encountering this error. I think I just need someones second eye on it.
Tool: Modelsim
Error:
near "+": syntax error, unexpected '+'

Here is the section of code

initial
begin // Populate the memory.
firstvalue = 10;
for (iter=0;iter<=20;iter + 1)
begin
mem_array[iter]= firstvalue;
firstvalue = firstvalue +10;
#10;
end
end

Please help.Thankd in Advance
 

Thanks alexhugo,

Now I am getting an error that say
'iter' is an invalid type in Generate loop. Must be a genvar
 

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