Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VITIS-8128 Update help Menu generator for SubCmds #7568

Merged
merged 6 commits into from
May 29, 2023

Conversation

dbenusov
Copy link
Contributor

Problem solved by the commit

https://jira.xilinx.com/browse/VITIS-8128

The new configuration files are implemented the help menu will need to be formatted differently that reflect the device type being accessed by the user.

This PR focuses on updating SubCmdExamine

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

The current help menu displays all options under a single group. As an example the examine help menu shows reports:

-r, --report       - The type of report to be produced. Reports currently available are:
                         aie             - AIE metadata in xclbin
                         aiemem          - AIE memory tile information
                         aieshim         - AIE shim tile status
                         all             - All known reports are produced
                         debug-ip-status - Status of Debug IPs present in xclbin loaded on device
                         dynamic-regions - Information about the xclbin and the compute units
                         electrical      - Electrical and power sensors present on the device
                         error           - Asyncronus Error present on the device
                         firewall        - Firewall status
                         host            - Host information
                         mailbox         - Mailbox metrics of the device
                         mechanical      - Mechanical sensors on and surrounding the device
                         memory          - Memory information present on the device
                         pcie-info       - Pcie information of the device
                         platform        - Platforms flashed on the device
                         qspi-status     - QSPI write protection status
                         thermal         - Thermal sensors present on the device

However, certain reports are unique to Alveo and others to AIE devices. Displaying them at all times does not make sense and is confusing.

How problem was solved, alternative solutions (if any) and why they were rejected

This problem was solved by utilizing the new command configuration json that specifies which reports are associated with certain device types. Within the constructor of the chosen command we construct a help menu unique to that device type. Depending on which device the user specifies we change which help menu is displayed to one of the premade help menus.

In addition, if no device is specified ALL reports are displayed. However, the reports are broken into device specific categories.

At the moment, the device type is not available. We are waiting on the shim upgrade before activating that portion of the filter. The current device specific reports will continue to function as they have in the past.

Risks (if any) associated the changes in the commit

This is changing how the help menu appears so some users may be startled by the new menu. However, it is much clearer than the previous iteration and specifies which reports they can run at all.

What has been tested and how, request additional testing if necessary

Ubuntu 20.04 u55c
No device specified result

dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov$ xbutil examine --help

COMMAND: examine

DESCRIPTION: This command will 'examine' the state of the system/device and will generate a report of interest
               in a text or JSON format.

USAGE: xbutil examine [--help] [-d arg] [-r arg] [-f arg] [-o arg]

OPTIONS:
  -d, --device       - The Bus:Device.Function (e.g., 0000:d8:00.0) device of interest
  -r, --report       - The type of report to be produced. Reports currently available are:
                         all             - All known reports are produced
                         dynamic-regions - Information about the xclbin and the compute units
                         electrical      - Electrical and power sensors present on the device
                         host            - Host information
                         mechanical      - Mechanical sensors on and surrounding the device
                         memory          - Memory information present on the device
                         pcie-info       - Pcie information of the device
                         platform        - Platforms flashed on the device
                         thermal         - Thermal sensors present on the device
                       AIE Specific:
                         aie             - AIE metadata in xclbin
                         aiemem          - AIE memory tile information
                         aieshim         - AIE shim tile status
                       Alveo Specific:
                         debug-ip-status - Status of Debug IPs present in xclbin loaded on device
                         error           - Asyncronus Error present on the device
                         firewall        - Firewall status
                         mailbox         - Mailbox metrics of the device
                         qspi-status     - QSPI write protection status
  -f, --format       - Report output format. Valid values are:
                         JSON        - Latest JSON schema
                         JSON-2020.2 - JSON 2020.2 schema
  -o, --output       - Direct the output to the given file
  --help             - Help to use this sub-command


GLOBAL OPTIONS:
  --verbose          - Turn on verbosity
  --batch            - Enable batch mode (disables escape characters)
  --force            - When possible, force an operation

device specified result

dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov$ xbutil examine -d 04:00 --help
WARNING: Unexpected xocl version (2.14.0) was found. Expected 2.16.0, to match XRT tools.

COMMAND: examine

DESCRIPTION: This command will 'examine' the state of the system/device and will generate a report of interest
               in a text or JSON format.

USAGE: xbutil examine [--help] [-d arg] [-r arg] [-f arg] [-o arg]

OPTIONS:
  -d, --device       - The Bus:Device.Function (e.g., 0000:d8:00.0) device of interest
  -r, --report       - The type of report to be produced. Reports currently available are:
                         aie             - AIE metadata in xclbin
                         aiemem          - AIE memory tile information
                         aieshim         - AIE shim tile status
                         all             - All known reports are produced
                         debug-ip-status - Status of Debug IPs present in xclbin loaded on device
                         dynamic-regions - Information about the xclbin and the compute units
                         electrical      - Electrical and power sensors present on the device
                         error           - Asyncronus Error present on the device
                         firewall        - Firewall status
                         host            - Host information
                         mailbox         - Mailbox metrics of the device
                         mechanical      - Mechanical sensors on and surrounding the device
                         memory          - Memory information present on the device
                         pcie-info       - Pcie information of the device
                         platform        - Platforms flashed on the device
                         qspi-status     - QSPI write protection status
                         thermal         - Thermal sensors present on the device
  -f, --format       - Report output format. Valid values are:
                         JSON        - Latest JSON schema
                         JSON-2020.2 - JSON 2020.2 schema
  -o, --output       - Direct the output to the given file
  --help             - Help to use this sub-command


GLOBAL OPTIONS:
  --verbose          - Turn on verbosity
  --batch            - Enable batch mode (disables escape characters)
  --force            - When possible, force an operation

Documentation impact (if any)

None

Signed-off-by: Daniel Benusovich <dbenusov@xilinx.com>
Signed-off-by: Daniel Benusovich <dbenusov@xilinx.com>
…RT discussion

Signed-off-by: Daniel Benusovich <dbenusov@xilinx.com>
Signed-off-by: Daniel Benusovich <dbenusov@xilinx.com>
Signed-off-by: Daniel Benusovich <dbenusov@xilinx.com>
@dbenusov dbenusov requested a review from uday610 May 24, 2023 21:21
@gbuildx
Copy link
Collaborator

gbuildx commented May 24, 2023

Build failed :(

Signed-off-by: Daniel Benusovich <dbenusov@xilinx.com>
@gbuildx
Copy link
Collaborator

gbuildx commented May 24, 2023

Build failed :(

@dayeh-xilinx
Copy link

retest this please.

@dbenusov dbenusov marked this pull request as ready for review May 25, 2023 00:15
@gbuildx
Copy link
Collaborator

gbuildx commented May 25, 2023

Build failed :(

@dayeh-xilinx
Copy link

retest this please.

Copy link
Collaborator

@uday610 uday610 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@gbuildx
Copy link
Collaborator

gbuildx commented May 25, 2023

Build failed :(

@dayeh-xilinx
Copy link

retest this please.

@gbuildx
Copy link
Collaborator

gbuildx commented May 25, 2023

Build Passed!

@chvamshi-xilinx chvamshi-xilinx merged commit 1ac392d into Xilinx:master May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants