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.

[SOLVED] Error: Modulus operator invalid for REAL.

Status
Not open for further replies.

BartlebyScrivener

Member level 5
Member level 5
Joined
Feb 8, 2012
Messages
90
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
2,081
Using systemverilog, I am trying to work out if one number is an integer multiple of another. An example is below.

Code:
l_datain[i][4] = ((i % X_NODES) == 0) ? 'z : l_dataout[i-1][2];

If
Code:
i
is some multiple of
Code:
X_NODES
connect
Code:
'z
else connect something else.

Once upon a time this code allowed me to simulate, but now I get the following error

Code:
Error: Modulus operator invalid for REAL.

X_NODES is passed as a parameter

Code:
parameter X_NODES = `X_NODES,

from somewhere where it is defined

Code:
`define X_NODES 8

Where is it failing?

Thank you!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top