Analysis and simulation modeling of programmable circuits using digital potentiometers