convert HDLState.get_mem() to a dictionary of memory state results