lib/sw_apps/zynq_dram_test/src/test01.c
void update_patterns()
{
  int i, imaski;
  if (bus_width == 32)
  {
    for (i=0; i<128; i++)
    {
      imaski = (i >> 4) & 0x07;  // invert mask index
      pat1[i] = pattern1[i & 15];
      pat2[i] = pattern1[i & 15] ^ invertmask[imaski];
    }
  }
  else
  {
    for (i=0; i<128; i++)
    {
      imaski = (i >> 4) & 0x07;  // invert mask index
      pat1[i] = pattern1_16bit[i & 15];
      pat2[i] = pattern1_16bit[i & 15] ^ invertmask[imaski];
    }
  }
}
/****************************************************************************
 * Function: update_patterns
 * Description: Create the 128-word patterns for 32-bit and 16-bit tests
 ****************************************************************************/
update_patterns
Description: Create the 128-word patterns for 32-bit and 16-bit tests
update_patterns Description : Create the 128 - word patterns for 32 - bit and 16 - bit tests
void update_patterns()
{
  int i, imaski;
  if (bus_width == 32)
  {
    for (i=0; i<128; i++)
    {
      imaski = (i >> 4) & 0x07;  
      pat1[i] = pattern1[i & 15];
      pat2[i] = pattern1[i & 15] ^ invertmask[imaski];
    }
  }
  else
  {
    for (i=0; i<128; i++)
    {
      imaski = (i >> 4) & 0x07;  
      pat1[i] = pattern1_16bit[i & 15];
      pat2[i] = pattern1_16bit[i & 15] ^ invertmask[imaski];
    }
  }
}
void update_patterns ( ) { int i , imaski ; if ( bus_width == 32 ) { for ( i = 0 ; i < 128 ; i ++ ) { imaski = ( i >> 4 ) & 0x07 ; pat1 [ i ] = pattern1 [ i & 15 ] ; pat2 [ i ] = pattern1 [ i & 15 ] ^ invertmask [ imaski ] ; } } else { for ( i = 0 ; i < 128 ; i ++ ) { imaski = ( i >> 4 ) & 0x07 ; pat1 [ i ] = pattern1_16bit [ i & 15 ] ; pat2 [ i ] = pattern1_16bit [ i & 15 ] ^ invertmask [ imaski ] ; } } }
Function: update_patterns
 Description: Create the 128-word patterns for 32-bit and 16-bit tests
Function : update_patterns Description : Create the 128 - word patterns for 32 - bit and 16 - bit tests
// invert mask index // invert mask index