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.

Multiplying integer variables in verilog

Status
Not open for further replies.

hassanzia

Junior Member level 3
Joined
Nov 24, 2011
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,506
Hi,

Is it possible to multiply integer variable in a verilog for loop?

example
Code:
integer i,j = 0;

for (i=0; i<10; i=i+1)
j = 16 * (i+1);
 

yes, should be possible, but in your case, the answer is just a constant.
 

Its giving a syntax error whenever I try to do this. (HDLCompiler : 806, if that helps)
 

why not post the actual code and the actual error? or read what the error says and fix it? Syntax errors are normally self explanitory.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top