import math
#given
Trec=54; #in ns
Ttrans=40.0; #in ns
Pwd=(Trec-Ttrans)/Ttrans*100;
print"PWD=",Pwd,"percent";
import math
#given
#Vc=Vdin-Vdinq
Vc=5; #in mV Vdin-Vdinq=Vc
Irset =1.8*10**-3*(Vc*10**-3); #in A
print"Irset",Irset*10**6,"microA";
Vs=1.5; #Voltage at signal level below Vcc in V
Radj=Vs/Irset; #in Ohm
print"Radj",round(Radj*10**-3,4),"kohm";
import math
#given
Rl=50; #in Ohm
Ro=100; #in Ohm
Vos=450; #in mV
Vref=(Rl+Ro)/Rl*Vos/2;
print"Vref= ",Vref,"mV";
Vee=3.3; #in V
R1=500; #in Ohm
R2=16000.0; #in Ohm
#Rref=(Vee/Vref/10**3-1)*R1/(1-(R1/R2*(Vee/Vref/10**3-1)))
Rref=(((Vee/Vref)/(10**-3)-1)*R1)/((1-(R1/R2)*((Vee/Vref)/(10**-3)-1)));
print"Rref= ",round(Rref,4),"ohm";
print"Approx. Rref= ",round(Rref*10**-3,4),"kohm";