Negative capacitance effect in semiconductor devices