JussiS
New Member
Offline
Posts: 9
Scandinavia
|
Has anyone else encountered a problem where the simulator (Cadence AMS) gives an error, if you change any of the parameters in a component from the schematic properties-view?
The error it gives is:
ncelab: *E,CUBSPA (./ihnl/Buck_vcm/Buck_voltage/schematic/verilog.vams,26||44): Assigment of string to real or integer type parameter.
The code is:
/Verilog-AMS HDL for "Buck_vcm", "Compensator" "verilogams"
`include "constants.vams" `include "disciplines.vams"
module Compensator ( Vref, Vin, Vout);
input Vref, Vin;
output Vout;
parameter real Pole_a = 10;
parameter real Pole_b = 100e4;
parameter real Pole_c = 100e5;
parameter real Zero_a = 1000;
parameter real Zero_b = 20e3;
parameter real Gain_dB=20;
real PI=3.14159265;
real Poles[0:5];
real Zeros[0:3];
real Gain;
electrical Vin, Vref, Vout;
analog begin
Gain = pow(10,(Gain_dB/20));
Poles[0] = -2*PI*Pole_a;
Poles[1] = 0;
Poles[2] = -2*PI*Pole_b;
Poles[3] = 0;
Poles[4] = -2*PI*Pole_c;
Poles[5] = 0; Zeros[0] = -2*PI*Zero_a;
Zeros[1] = 0;
Zeros[2] = -2*PI*Zero_b;
Zeros[3] = 0;
V(Vout) <+ Gain*laplace_zp(V(Vref,Vin),Zeros,Poles);
end
endmodule
If I don't touch the properties, the simulation is completed normally.
|