starsunmoon
Junior Member level 1
((Question on Verilog-A . Please feel free to move to a more proper board if there is one: ))
How to assign a value to an element of an array ?
what I have by following an example from cad tool's example:
......
input vin;
electrical vin;
parameter real vd[0:7] = '{0,0,0,0,0,0,0,0};
analog begin
if (V(vin)==1) vd[0] = '{3.3};
end
......
The error message I got is:
ERROR (VACOMP-1567): "if (V(vin)==1) vd[0] = '{3.3};<<--? "
"~/block1/veriloga/veriloga.va",
line 26: Encountered assignment to a parameter in an incorrect context.
Assign parameters only in the same statement in which you declare
them.
How to assign a value to an element of an array ?
what I have by following an example from cad tool's example:
......
input vin;
electrical vin;
parameter real vd[0:7] = '{0,0,0,0,0,0,0,0};
analog begin
if (V(vin)==1) vd[0] = '{3.3};
end
......
The error message I got is:
ERROR (VACOMP-1567): "if (V(vin)==1) vd[0] = '{3.3};<<--? "
"~/block1/veriloga/veriloga.va",
line 26: Encountered assignment to a parameter in an incorrect context.
Assign parameters only in the same statement in which you declare
them.