Automated synthesis of EDACs for FLASH Memories with User-Selectable Correction Capability