To configure your HMC BFM to operate in half-width mode using your own testbench, follow the steps in the Workaround/Fix section.
Set the following parameters within the hmc_cfg.sv module:
link_cfg.cfg_half_link_mode_tx = 1;
link_cfg.cfg_half_link_mode_rx = 1;
The Altera testbench generated as part of the example design from the Quartus® II software does not include these parameters for the full-width (16 lanes) configuration but does include them for the half-width (8 lanes) variant.