Hardware-software co-exploration with racetrack memory based in-memory computing for CNN inference in embedded systems