methods and apparatus for programming a ferroelectric memory according to various desired and constraining characteristics , such as the retention of the data written to the memory , the endurance of the memory itself , both retention and endurance , power consumption , constraints on available voltage levels , etc . the characteristics of the signal used to write the data to memory are selected to as to satisfy the various desired and constraining characteristics .