pyuvm.uvm_reporting.uvm_report_catcher

Report catcher/demoter utility.

Module Contents

Classes

uvm_report_action_e

Mirror UVM catcher action enum values used by this utility.

uvm_report_message

Report payload passed to uvm_report_catcher.catch().

uvm_report_catcher

Severity rewrite utility.

API

class pyuvm.uvm_reporting.uvm_report_catcher.uvm_report_action_e

Bases: str, enum.Enum

Mirror UVM catcher action enum values used by this utility.

Initialization

Initialize self. See help(type(self)) for accurate signature.

THROW

‘THROW’

class pyuvm.uvm_reporting.uvm_report_catcher.uvm_report_message

Report payload passed to uvm_report_catcher.catch().

report_id: str

None

message: str

None

severity: Any

None

class pyuvm.uvm_reporting.uvm_report_catcher.uvm_report_catcher(name: str = 'uvm_report_catcher')

Severity rewrite utility.

The API mirrors the SV methods:

  • add_change_sev(id, msg, sev)

  • remove_change_sev(id, msg="")

  • catch(report)

Initialization

catch(report: pyuvm.uvm_reporting.uvm_report_catcher.uvm_report_message) pyuvm.uvm_reporting.uvm_report_catcher.uvm_report_action_e

Apply severity rewrite rules to a report in-place.

Returns THROW to mirror SV behavior: let report continue after mutation.

add_change_sev(report_id: str, msg: str, sev: Any) None

Change severity for reports with matching ID and message regex.

remove_change_sev(report_id: str, msg: str = '') None

Remove a severity change entry.

If msg == "", remove all rules for the report ID.

clear() None

Remove all severity rewrite rules.

catch_fields(report_id: str, message: str, severity: Any) tuple[pyuvm.uvm_reporting.uvm_report_catcher.uvm_report_action_e, Any]

Convenience wrapper for call sites that pass raw fields.

Returns:

  • action (always THROW)

  • possibly rewritten severity