A 0.6V rail-to-rail regenerative comparator with a thyristor-based latch