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.

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

Status
Not open for further replies.

Aforak

Newbie level 5
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top