Mapping arbitrary logic functions into synchronous embedded memories for area reduction on FPGAs