Design of a sub-1-V nanopower CMOS current reference