In the file altpcietb_bfm_rp_gen3_x8.sv there is a problem in how certain import statements are included within the module declarations.
To work around this problem, move the "import altera_xcvr_functions_sv_bfm::*; " after the module declaration, for example.
module sv_xcvr_plls #(
parameter plls = 1, // number of PLLs...
);
import altera_xcvr_functions_sv_bfm::*;
Further, move any *ncrypt files above the atom file of the same name as shown below:
vlog \" incdir /ep_g3x1_tb/simulation/submodules/\" "/ep_g3x1_tb/simulation/submodules/aldec/stratixv_pcie_hip_atoms_ncrypt.v" -work DUT_pcie_tb
vlog \" incdir /ep_g3x1_tb/simulation/submodules/\" "/ep_g3x1_tb/simulation/submodules/stratixv_hssi_atoms.v" -work DUT_pcie_tb