A co-design approach for SET mitigation in embedded systems