6.5 Transfer Instruction (XferInstruction) Pseudo Operation

Format:
XferInstruction (instruction)
Purpose:
  • To send 32 bits of data for the device to execute.
Description:
  • The instruction is clocked into the device and then executed by CPU.
Restrictions:
  • The device must be in Debug mode.
Example:
  • The following is an example of how to use the Transfer Instruction (XferInstruction) function:
    XferInstruction (instruction)
    {
    // Select Control Register
    SendCommand(ETAP_CONTROL);
    // Wait until CPU is ready
    // Check if Processor Access bit (bit 18) is set
    do {
    controlVal = XferData(32’h0x0004C000);
    } while( PrAcc(contorlVal[18]) is not ‘1’ );
    // Select Data Register
    SendCommand(ETAP_DATA);
    // Send the instruction
    XferData(instruction);
    // Tell CPU to execute instruction
    SendCommand(ETAP_CONTROL);
    XferData(32’h0x0000C000);
    }