A computer program product, the computer program product for detecting n-level slopes for a voltage level in a processor, wherein n is greater than 1, comprising a computer readable storage medium having program instructions embodied therewith, the program instructions readable and/or executable by a computer to cause the computer to:
- monitor, by a slope detector, a voltage in a processor for a voltage level corresponding to a predefined first edge;
- monitor, by the slope detector, for a voltage level corresponding to a predefined second edge within a first count limit from the detection of the predefined first edge;
- in response to detecting the predefined second edge within the first count limit, monitor, by the slope detector, for a voltage level corresponding to a predefined third edge within a second count limit from detection of the predefined second;
- and
- in response to detecting the predefined third edge within the second count limit, determine whether to adjust a power applied to a processor based on the monitored voltage levels.