added read_memory function which returns attencode and phasecode value from phasing memory location