Charge-based modeling of capacitance in MOS transistors