AIM: Software and Hardware Co-design for Architecture-level IR-drop Mitigation in High-performance PIM