SMS dit: Testing and testable design of high-density random-access memories