Two entities with the same name cannot be synthesized/simulated for a same FPGA target project.
File 1: entity fly is ... end; File 2: entity fly is ... end;
File 1: entity fly is ... end; File 2: entity dream is ... end;