Accesing Serial Loopback Register for Transceiver

Hi all,
I read in Altera Transceiver Custom Phy ip Manual that there is a register at phy_mgmt_write-address 0x061. If I write 1 to this register then I can set transceiver serial loopback. So no need to externally connect wires to set serial loopback, by setting this register to 1 we can internally set serial loopback and use this technique to debug the transceiver. You can check at this link

Tranceiver internal serial loopback for debugging

Now, the tutorial above uses USB blaster cable and Quaruts 2 software Transceiver debug tool but unfortunately, I dont have USB blaster cable so is there any other way to set up this register? I tried to connect transciever to AVALON MM interface and used transciever address to write 1 to this register as shown below

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include <fcntl.h> 
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "C:\altera\15.1\embedded\ip\altera\hps\altera_hps\hwlib\include\hwlib.h"
#include "C:\altera\15.1\embedded\ip\altera\hps\altera_hps\hwlib\include\soc_cv_av\socal\socal.h"
#include "C:\altera\15.1\embedded\ip\altera\hps\altera_hps\hwlib\include\soc_cv_av\socal\hps.h" 
#include "C:\altera\15.1\embedded\ip\altera\hps\altera_hps\hwlib\include\soc_cv_av\socal\alt_gpio.h"
#include "D:\masterarbeit3\HWXCVRHW2\hps_0.h"

#define REG_BASE 0xFF200000 /*LWFPGA SLAVE Address*/
#define REG_SPAN 0x00200000

#define serial_loopback 0x061 /*phy_mgmt_address for serial loopback*/

volatile unsigned int *xcvr_addr; /*this is the pointer that will read from transceiver*/
volatile unsigned int *xcvr_addr_serial_loopback;
void* virtual_base; /*pointer to open device memory file*/

int main ()
int fd = EXIT_FAILURE;	

if (fd < 0) {

/*setting serial loopback of transceiver by setting register 1 at address 0x061*/
xcvr_addr_serial_loopback = (unsigned int *) (XCVR_CUSTOM_PHY_0_BASE+serial_loopback);
*xcvr_addr_serial_loopback =1;

/*memory mapping*/
xcvr_addr = (unsigned int *) (virtual_base+XCVR_CUSTOM_PHY_0_BASE); /*accessing base address of xcvr*/

printf("pointer value is %d\n", *xcvr_addr);
return 0;

This is my transceiver header file for addresses

#ifndef _ALTERA_HPS_0_H_
#define _ALTERA_HPS_0_H_

 * This file was automatically generated by the swinfo2header utility.
 * Created from SOPC Builder system 'soc_system' in
 * file 'soc_system.sopcinfo'.

 * This file contains macros for module 'hps_0' and devices
 * connected to the following master:
 *   h2f_lw_axi_master
 * Do not include this header file and another header file created for a
 * different module or master group at the same time.
 * Doing so may result in duplicate macro names.
 * Instead, use the system header file which has macros with unique names.

 * Macros for device 'xcvr_custom_phy_0', class 'altera_xcvr_custom_phy'
 * The macros are prefixed with 'XCVR_CUSTOM_PHY_0_'.
 * The prefix is the slave descriptor.
#define XCVR_CUSTOM_PHY_0_COMPONENT_TYPE altera_xcvr_custom_phy
#define XCVR_CUSTOM_PHY_0_COMPONENT_NAME xcvr_custom_phy_0
#define XCVR_CUSTOM_PHY_0_BASE 0x0
#define XCVR_CUSTOM_PHY_0_SPAN 2048
#define XCVR_CUSTOM_PHY_0_END 0x7ff

#endif /* _ALTERA_HPS_0_H_ */

Here is my qsys system

Can anyone please tell me if there is any other way to access and write 1 to this address 0x061? I tried accessing it using my c program but when I execute my program, it shows me error “SEGMENTATION ERROR”.
Any help please…??

You don’t need the USB Blaster cable. If you are communicating with your board from your computer through USB to program it (with a normal USB cable), then the board has a built-in USB Blaster.