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.
20 lines
478 B
20 lines
478 B
7 months ago
|
//VerilogA for lightsource,cw_powinput,veriloga
|
||
|
`include "constants.vams"
|
||
|
`include "disciplines.vams"
|
||
|
|
||
|
module cw_powinput(Vpow,Vphase,Vlam,Opow,Ophase,Olam);
|
||
|
parameter real GainCoeff = 1 from [0:inf);
|
||
|
parameter real PhaseCoeff = 0 from (-360:360);
|
||
|
|
||
|
input Vpow,Vphase,Vlam;
|
||
|
output Opow,Ophase,Olam;
|
||
|
electrical Vpow,Vphase,Vlam,Pout,Opow,Ophase,Olam;
|
||
|
|
||
|
analog begin
|
||
|
V(Opow) <+ GainCoeff*V(Vpow);
|
||
|
V(Ophase) <+ PhaseCoeff+V(Vphase);
|
||
|
V(Olam) <+ V(Vlam);
|
||
|
end
|
||
|
|
||
|
endmodule
|