Partial Circuit Replication for Masking and Detecting Soft Errors in SRAM-Based FPGAs