static DALResult _CollectProperties(STMTraceDevCtxt *pDevCtxt)
{
   DALSYSPropertyVar PropVar;

   /* get the handle to the stm trace driver properties */
   if (DAL_SUCCESS != DALSYS_GetDALPropertyHandle( pDevCtxt->DevId,
                                                   pDevCtxt->hProp ))
   {
      return DAL_ERROR;
   }

   /* get the base extended stimulus port address */
   if (DAL_SUCCESS != DALSYS_GetPropertyValue( pDevCtxt->hProp,
                                               "stm_sp_base_addr", 0,&PropVar ))
   {
      return DAL_ERROR;
   }
   pDevCtxt->uSTMSPBaseAddr = PropVar.Val.dwVal;

   /* get the base extended stimulus port address */
   if (DAL_SUCCESS != DALSYS_GetPropertyValue( pDevCtxt->hProp,
                                               "stm_base_port", 0,&PropVar ))
   {
      return DAL_ERROR;
   }
   pDevCtxt->portRange.uBasePort = PropVar.Val.dwVal;

   /* get the number of stimulus ports allocated */
   if (DAL_SUCCESS != DALSYS_GetPropertyValue( pDevCtxt->hProp,
                                                "stm_num_ports", 0, &PropVar ))
   {
      return DAL_ERROR;
   }
   pDevCtxt->portRange.uNumPorts =  ROUND_UP_16(PropVar.Val.dwVal);

   /* get the base extended stimulus port address supporting BAMDMA */
   if (DAL_SUCCESS != DALSYS_GetPropertyValue( pDevCtxt->hProp,
                                               "stm_base_port_dma", 0,
                                               &PropVar ))
   {
      pDevCtxt->portRangeDMA.uBasePort = 0x0; /* No BAMDMA'able ports supported */
      pDevCtxt->portRangeDMA.uNumPorts = 0x0; /* No BAMDMA'able ports supported */
   }
   else
   {
      pDevCtxt->portRange.uBasePort = PropVar.Val.dwVal;
      /* get the number of BAMDMA'able stimulus ports allocated */
      if (DAL_SUCCESS != DALSYS_GetPropertyValue( pDevCtxt->hProp,
                                                  "stm_num_ports_dma", 0,
                                                  &PropVar ))
      {
         /* some mis-configuration issue*/
         return DAL_ERROR;
      }
      pDevCtxt->portRangeDMA.uNumPorts = PropVar.Val.dwVal;
   }

   return DAL_SUCCESS;
}
Esempio n. 2
0
void as_mbx_copy_prev ()
{
  uint32_t prev = (sd.num - 1) % sd.num_thr;

  mfc_getb (sd.ad.sol,		// store here (load address)
	    (uint32_t) sd.spe_ls_ea[prev] +
	      (int) &sd.ad.sol, // same address but in other SPU
	    ROUND_UP_16(sd.size), // number of bytes to copy
	    tag, 0, 0);
  waittag (tag);
}