This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HyperLink Example CPU Token Exchange

Hi,

I'm trying to run the HyperLink Example on a custom board with a HyperLink connection to an FPGA and can't understand how the CPU token exchange works i.e. how do the dstLoc2Rem and dstRem2Loc values get populated?  I'm assuming it's done by the FPGA but can't find it in the verilog example code.

  /* Write my srcLoc2Rem, and the other side's srcRem2Loc */
  hyplnkExampleSet(&local->srcLoc2Rem.value, token);
  hyplnkExampleSet(&remote->srcRem2Loc.value, token);

  /* Wait for the remote side to copy:                                          
   * local->dstLoc2Rem.value = local->srcLoc2Rem.value                          
   * and                                                                        
   * remote->dstRem2Loc.value = remote->srcRem2Loc.value                        
   */
  startTime = hyplnkExampleReadTime();
  while (((hyplnkExampleReadTime() - startTime) < timeLimit) && (!done)) {
    /* see if the other side did his copy */
    if (! other_side_copied) {
      val1 = hyplnkExampleGet(&local->dstLoc2Rem.value);
      val2 = hyplnkExampleGet(&remote->dstRem2Loc.value);
      other_side_copied = ((val1 == token) && (val2 == token));
    }

Thanks,

Farrah