Simulation of polysilicon quantization and its effect on n- and p-MOSFET performance