Verilog-A release version.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
484 B

//VerilogA for lightsource,cw_maginput,veriloga
`include "constants.vams"
`include "disciplines.vams"
module cw_maginput(Vmag,Vphase,Vlam,Opow,Ophase,Olam);
parameter real GainCoeff = 1 from [0:inf);
parameter real PhaseCoeff = 0 from (-360:360);
input Vmag,Vphase,Vlam;
output Opow,Ophase,Olam;
electrical Vmag,Vphase,Vlam,Pout,Opow,Ophase,Olam;
analog begin
V(Opow) <+ pow(V(Vmag)*GainCoeff,2);
V(Ophase) <+ PhaseCoeff+V(Vphase);
V(Olam) <+ V(Vlam);
end
endmodule