input IN28V;
input IN19V;
input IN14V;
input IN10V;
input BAT14V;
input nRESET;
input BAT10V;
input TEMP47;
output SPDWN;//step-down OE signal
output CHRGR;//charger OE signal
output TMPC;//temperature compensation OE signal
output SPDWN_O;//step-down output switch control
output SPDWN_BP;//step-down bypass switch control
output BAT_O;// backup battery switch control
output BAT_LOW;//active if backup battery low
output OVRVLTG;//active if input voltage is too high
output OVERHEAT;//active if the ambient temperature is more than 48C
output CHARGING;//active when the battery is charging
output MAIN_FD;//active if main power is absent or low
wire SPDWN;
wire CHRGR;
wire TMPC;
wire SPDWN_O;
wire SPDWN_BP;
wire BAT_O;
wire BAT_LOW;
wire OVRVLTG;
wire OVERHEAT;
wire CHARGING;
wire MAIN_FD;
assign CHRGR = (((IN28V & !IN19V) | (IN14V & !IN10V)) & BAT14V & TEMP47 & nRESET);
assign TMPC = (((IN28V & !IN19V) | (IN14V & !IN10V)) & BAT14V & TEMP47 & nRESET);
assign CHARGING = (((IN28V & !IN19V) | (IN14V & !IN10V)) & BAT14V & TEMP47 & nRESET);
assign OVERHEAT = !TEMP47;
assign BAT_LOW = BAT10V;
assign MAIN_FD = ((IN19V & !IN14V) | (IN10V));
assign OVRVLTG = !IN28V;
assign SPDWN_O = (IN28V & !IN19V & nRESET); //28>Uin>14
assign SPDWN = (IN28V & !IN19V & nRESET); //28>Uin>19
assign SPDWN_BP = (IN14V & !IN10V & nRESET); //14>Uin>10
assign BAT_O = (((IN19V & !IN14V) | (IN10V)) & BAT14V & !BAT10V & nRESET);