All-digital embedded meters for on-line power estimation