Patent ID: 8581595

Claim:
A method of providing an output based on the value of a current comprising: providing a current in a transistor of a flash memory cell by applying a first voltage to the gate of the transistor, the voltage being provided by a built-in self test (BIST) voltage pad; providing voltage based on the current; comparing, in a comparator, the provided voltage with a reference voltage; providing an output the value of which is based on the comparison of the provided voltage with the reference voltage, wherein the output comprises a digital voltage output; sampling the output of the comparator at each pulse of a clock until a full clock divide period is reached; storing the digital voltage output in a digital filter for a duration of time; and filtering noise from the comparator in the digital filter over the duration of time, wherein the comparator comprises a quantizer, and wherein filtering noise in the digital filter comprises performing noise-shaping to move a quantization noise error of the quantizer to a higher frequency spectrum.