STT-RAM-Based Domain-Specific Architectures for Resource-Constrained Systems