On-Chip Compensation of Device-Mismatch Effects in Analog VLSI Neural Networks