Design Of Robust Memristor-Based Neuromorphic Circuits And Systems With Online Learning