A novel design and modeling paradigm for memristor-based crossbar circuits