--- Quote Start ---
The altera MF library is altera only memories.
If you want code that compiles in both altera and xilinx, you need to write code that infers ram rather than instantiate megafunctions/core-gen components. And you have to make sure it infers the same memory in BOTH vendors (there are subtle differences between the rams on Xilinx and Altera devices).
--- Quote End ---
Thank you for your comment,
I try to do it but I have never worked on altera and I have no idea about it's memories, can you help me please (in attached the file which I have to add "altsyncram" component compatible with xilinx),
Thank you again,