A non-parameter identifier used when constant expression is expected ! .

Status
Not open for further replies.

Aforak

Newbie level 5
Joined
May 16, 2013
Messages
8
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Visit site
Activity points
1,325
HI,
My code gives this error. A non-parameter identifier used when constant expression is expected !
Plz help


`include "constants.vams"
`include "disciplines.vams"
module ak_test1 (vi,vo,s1,s2,GND);
input [3:0] vi;
electrical [3:0] vi;
input GND,s1,s2;
electrical GND;
electrical s2,s1;
output vo;
electrical vo;
real si1,si2;
integer k ;
analog begin

if (V(s1,GND) > 0.9)
si1 = 1;
else
si1 = 0;
if (V(s2,GND) > 0.9)
si2 = 1;
else
si2 = 0;

if(!si1 && !si2)
k=0;
if(!si1 && si2)
k=1;
if(si1 && !si2)
k = 2;
if(si1 && si2)
k = 3;

V(vi[k],vo) <+ 0;
end
endmodule
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…