ARES: A mapping framework of DNNs towards diverse PIMs with general abstractions