When you set ALTMEMPHY wrapper as top level project file, you will get following error message during compilation.
Error: The following I/O registers are used illegally and must drive delay chains feeding an I/O output buffer or delay chain fed by an I/O input buffer.
Fitter error message is saying that the outputs of the io_config blocks must drive I/O buffers if they're connected.
Since the PHY is set as a top-level entity, the outputs of the io_config blocks drive output pins, therefore,
the fitter requirement is violated.
To get around this error, in wraptop_ddr2_phy.v, replace the following line:
.hc_scan_dout(hc_scan_dout),
with
.hc_scan_dout(),
This action disconnects the io_config outputs from the top-level pins to resolve the illegality.