A P1500-compatible programmable BIST approach for the test of embedded flash memories