Continue to Site

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.

Verilog for loop error.

Status
Not open for further replies.

Rohit Ranjan

Newbie level 2
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top