Availability:
     Level 2    , 'P'
     Level 7    , 'P'
     Level F    , 'P'
     Level H    , 'P'

  Quick Help:
     Set Buffer Pattern, P[PatternSelOrPatternLow],[PatternHi],[PatternBits],[Opts],[BlkNum],[NumBlks]

  Description:
    This command loads the specified data buffer blocks with the specified data pattern.

    This command supports both the legacy ST-10 mode and a new mode that allows the user to
    enter data patterns of up to 16-bytes (128-bits in length).  The Legacy ST-10 mode only
    allowed the user to enter 4-byte (32-bit) patterns.

    In legacy ST-10 mode Parameter 0 selects either a pre-defined pattern (i.e. If Parameter 0
    is equal to 0x1212, random data will be selected) or it contains the lower 16-bits of a
    user specified pattern.  In this mode Parameter 1 contains the upper 16-bits of a user
    specified pattern, Parameter 2 specifies the pattern length, in bits, and the pattern
    is assumed to be right justified.  For example if Parameter 0 is equal to 0x5678,
    Parameter 1 is equal to 0x1234 and Parameter 2 is equal to 0x14, the buffer will be
    filled with the repeating 20-bit pattern 0100 0101 0110 0111 1000 which are the least
    significant 4-bits of Parameter 1 followed by the 16-bits of Parameter 0 (45678).

    The new 16-byte user pattern mode is selected by entering 0x1818 for Parameter 0.  In
    this mode Parameter 1 contains the 16-byte pattern to be used, Parameter 2 specifies
    the pattern length, in bits, and the pattern is assumed to be left justified.  The
    pattern should be entered as a 1 to 32 character hexadecimal value with no spaces or
    commas separating the bytes.  For example if Parameter 0 is equal to 0x1818,
    Parameter 1 is equal to 0x123456789ABC and Parameter 2 is equal to 0x24, the buffer
    will be filled with the repeating 36-bit pattern 0001 0010 0011 0100 0101 0110 0111
    1000 1001 which are the most significant 36-bits of Parameter 1 (123456789).

  Input Parameters:

    0 - Select Pre-Defined Data Pattern or Data Pattern Low.
    
        If Parameter 3 bit 1 is cleared, the value of Parameter 0 will first be checked
        to determine if it selects any of the following pre-defined patterns and only
        if no match is found with any of the pre-defined patterns, will Parameter 0 be
        interpreted as the data pattern low.
    

          0x1111 = Incrementing Pattern.
          
                   Each buffer block will be filled with a 16-bit value containing
                   its block offset relative to the first block filled.
    

          0x1212 = Random Pattern.
          
                   The buffer will be filled with random data.
    

          0x1313 = Alternating Pattern.
          
                   The number of buffer blocks to be filled will be divided in half and
                   the first group of blocks will be filled with 0x1313 and the second
                   group of blocks will be filled with random data.
    

          0x1414 = Isolated Pulse Pattern.
          
                   The buffer will be filled with the 64-bit pattern 0xffff0000.
    

          0x1515 = Incrementing 2-Byte Pattern.
          
                   Each buffer block will be filled with a 16-bit incrementing pattern
                   that resets to zero at the start of each block.
    

          0x1616 = Repeating 127-bit Pattern.
          
                   If the first 11 blocks will be filled with the following 127-bit
                   repeating binary pattern and the remaining blocks, if any, will be
                   filled with zeroes.
          
                      00010011 00010111 01011011 00000110 (13 17 5B 06 hex)
                      01101010 01110011 11011010 00010101 (6A 73 DA 15 hex)
                      01111101 00101000 11011100 01111111 (7D 28 DC 7F hex)
                      00001110 11110010 11001001 0000001  (0E F2 C9 02 hex)
          
                   Note: When loading the buffer with the repeating 127-bit pattern, each
                   byte will be flipped end to end.  So when displayed, the filled buffer
                   will actually contain the following data.
          
                      11001000 11101000 11011010 01100000 (C8 E8 DA 60 hex)
                      01010110 11001110 01011011 10101000 (56 CE 5B A8 hex)
                      10111110 00010100 00111011 11111110 (BE 14 3B FE hex)
                      01110000 01001111 10010011 01000000 (70 4F 93 40 hex)
    

          0x1717 = Repeating 15 byte 6T Pattern.
          
                   The buffer will be filled with the following 15-byte repeating pattern.
          
                      F0 F3 F3 C3 03 03 03 0F 3F 3F 3F 3C 30 30 F0 hex
    

          0x1818 = Repeating 1 to 128 bit user specified pattern.
    
                   The buffer will be filled with the 1 to 128 bit (16 byte) pattern
                   entered for Parameter 1.  The number of Parameter 1 bits to be repeated
                   will be specified by Parameter 2.
    
        If Parameter 3 bit 1 is set or Parameter 0 is not equal to any of the values listed
        above, Parameter 0 will specify the least significant 16-bits of the data pattern
        with which the buffer is to be loaded.  In this case Parameter 1 will specify the
        most significant 16-bits of the data pattern, the maximum pattern length will be
        32-bits and the specified pattern will be assumed to be right justified.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xffff,
    
          Default: 0x1212 (Random Data)
    
    1 - Data Pattern high or 16-byte Data Pattern.
    
        If Parameter 3 bit 1 is set or Parameter 0 does not select one of the pre-defined
        data patterns (0x1111, 0x1212, etc.), Parameter 1 specifies the most significant
        16-bits of the data pattern with which the buffer is to be loaded.  In this case
        Parameter 0 will specify the least significant 16-bits of the data pattern, the
        maximum pattern length will be 32-bits and the specified pattern will be assumed
        to be right justified.
    
        If Parameter 3 bit 1 is cleared and Parameter 0 is equal to 0x1818, Parameter 1
        will specify a 1-bit to 16-byte pattern.  The number of Parameter 1 bits to be
        repeated will be specified by Parameter 2.  In this case the specified pattern
        is assumed to be left justified.
    
          Type:    Unsigned 16-byte value
    
          Range:   0 to 0xffffffffffffffffffffffffffffffff
    
          Default: 0
    
    2 - Data Pattern Bits.
    
        This parameter specifies the length, in bits, of the fill pattern specified by
        parameters 0 and 1.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0x80
    
          Default: 0x20 (32-bit pattern)
    
    3 - Options.
    
        This parameter is a bit-significant value that selects the following options.
    
          Bits 31-1:  not used
    
          Bit 0:      Disable Pre-Defined Data Patterns.
    
                      If this bit is set, the value of Parameter 0 will not be used to
                      select pre-defined data patterns and will always be interpreted
                      as the data pattern low.  For example, setting this bit allows
                      the user to specify a 16-bit data pattern of 1212 hex instead of
                      a random data pattern.
    
                      If this bit is cleared, the value of Parameter 0 will first be
                      checked to determine if it selects any of the pre-defined patterns
                      and only if no match is found with any of the pre-defined patterns,
                      will Parameter 0 be interpreted as the data pattern low.
    
          Type:    Unsigned 32-bit value
    
          Range:   0 to 0xFFFFFFFF
    
          Default: 0 (Enable Pre-Defined Data Patterns )
    
    4 - First Buffer Block Number to fill.
    
        This parameter specifies the number of the first buffer block to be filled.
    
        ************************************ NOTE *******************************************
        This option should be used with great caution, since it has the potential to corrupt
        critical data stored in the data buffer.
        *************************************************************************************
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to last buffer block number
    
          Default: If this parameter is not entered, the first block of Diagnostic Write
                   Buffer will be the first buffer block filled.
    
    5 - Number of consecutive Buffer Blocks to fill.
    
        This parameter specifies the number of consecutive buffer blocks to be filled.
    
        ************************************ NOTE *******************************************
        This option should be used with great caution, since it has the potential to corrupt
        critical data stored in the data buffer.
        *************************************************************************************
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xffff
    
          Default: If this parameter is not entered and Parameter 4 was not entered, the
                   entire Diagnostic Write Buffer will be filled.  If this parameter is
                   not entered and Parameter 4 was entered, only the buffer block specified
                   by Parameter 4 will be filled.
    
  Output Data:

    If an error occurred, the following information will be displayed.
    
          "DiagError aaaaaaaa"
    
       where
    
          aaaaaaaa is the Diagnostic Error Code
    
  Examples:
    The following commands will load the Diagnostic Write Buffer with pre-defined patterns:

       F3 2>P1111     (Incrementing Pattern - 1st block 0x0000, 2nd block 0x0001, etc.)
       F3 2>P1212     (Random Pattern)
       F3 2>P1313     (Alternating Pattern - 0x1313 and Random Data)
       F3 2>P1414     (Isolated Pulse Pattern - 0xFFFF0000)
       F3 2>P1515     (Incrementing 2-Byte Pattern - 0x0000000100020003...)
       F3 2>P1616     (Pre-Defined 127-bit Pattern - 0x13175B06...)
       F3 2>P1717     (Pre-Defined 15 byte 6T Pattern - 0xF0F3F3C303...)

    The following commands will load the Diagnostic Write Buffer with user defined patterns:

       F3 2>P1818,01020304050607080910111213141516,80  (User 128-bit pattern 0x010203...16)
       F3 2>P0304,0102                                 (User 32-bit pattern 0x01020304)
       F3 2>P4,,3                                      (User 3-bit pattern 100b)
       F3 2>P1111,,10,1                                (User 16-bit pattern 0x1111)

    The following commands will load the specified buffer blocks with a user defined pattern:

       F3 2>P0304,0102,,,D5C,4  (Buffer Blocks D5C-D5F with user 32-bit pattern 0x01020304)

  Revision History:

    0001.0000   Initial revision.
    0001.0001   Added support for 6T pattern and user specified 16-byte pattern.
    0011.0000   Combined the PSG Diagnostic Error Codes (PSGDEC) and the Diagnostic External
                Test Service Error Codes (DETSEC) into a single set of Diagnostic Error Codes
                (DiagError).