Efficient and Robust Compute-in-Memory for Edge Intelligence