Energy-optimal SRAM supply voltage scheduling under lifetime and error constraints