Accurate Mitigation of Single Event Effects on Flash-based FPGAs: A new Design Flow