1. A resistive processing unit (RPU), comprising: a circuit including: at least two current mirrors connected in series; and a capacitor connected with the at least two current mirrors, the capacitor providing a weight based on a charge level of the capacitor, wherein the capacitor is charged or discharged by one of the at least two current mirrors.