BartlebyScrivener
Member level 5
- Joined
- Feb 8, 2012
- Messages
- 90
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- 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.
If
is some multiple of
connect
else connect something else.
Once upon a time this code allowed me to simulate, but now I get the following error
X_NODES is passed as a parameter
from somewhere where it is defined
Where is it failing?
Thank you!
Code:
l_datain[i][4] = ((i % X_NODES) == 0) ? 'z : l_dataout[i-1][2];
If
Code:
i
Code:
X_NODES
Code:
'z
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!