A Si Metal-Semiconductor-Metal photodetector macromodel for circuit simulations