Using the Message Rule File

XOCC executes various Xilinx tools during kernel compilation. These tools generate many messages that provide compilation status to the users. These messages may or may not be relevant to all users depending on users’ focus and design phases. A Message Rule file can be used to better manage these messages. It provides commands to promote important messages to the terminal or suppress unimportant ones. This will help users better understand the kernel compilation result and explore ways to optimize the kernel.

The Message Rule file (.mrf) is a text file consisting of comments and supported commands. Only one command is allowed on each line.

Comment

Any line with “#” as the first non-whitespace character is a comment.

Supported Commands

By default, xocc recursively scans the entire working directory and promotes all error messages to the xocc output. The promote and suppress commands below provide more control on the xocc output.

promote

This command indicates that matching messages should be promoted to the xocc output.

suppress

This command indicates that matching messages should be suppressed or filtered from the xocc output. Note that errors can not be suppressed.

Command Options

The Message Rule file can have multiple promote and suppress commands. Each command can have one and only one of the options below. The options are case sensitive.

  • -id [message_id]

    All messages matching the specified message ID are promoted or suppressed. The message ID is in format of nnn-mmm. As an example, the following is a warning message from HLS. The message ID in this case is 204-68.

    WARNING: [XOCC 204-68] Unable to enforce a carried dependence constraint (II = 1, distance = 1, offset = 1) 
    between bus request on port 'gmem' 
    (/matrix_multiply_cl_kernel/mmult1.cl:57) and bus request on port 'gmem'-severity [severity_level]
  • -severity [severity_level]

    The following are valid values for the severity level. All messages matching the specified severity level will be promoted or suppressed.

    • info
    • warning
    • critical_warning

Precedence of Message Rules

suppress rules take precedence over promote rules. If the same message ID or severity level is passed to both promote and suppress commands in the Message Rule file, the matching messages are suppressed and not displayed.

Example of Message Rule File

The following is an example of a valid message rule file:

# promote all warning, critical warning
promote -severity warning
promote -severity critical_warning
# suppress the critical warning message with id 19-2342
suppress -id 19-2342