XbarGen: A memristor based boolean logic synthesis tool