// Demote the message from an ERROR to a WARNING . // You can demote specific messages by replacing "Encountered invalid value of" // with a sub-string from other error messages. You need to check the proper // message level. Only one message level can be demoted from the current message level. // First demoted message is an ERROR message if the Monitor sees X/Z on any pin. // Second demoted message is an WARNING message for the case when the connected bits for a bus are // more than expected (for example, connected 1024 bits for data bus, while configuration is 64). vip_port_monitor_master.log.modify(,,,,vmm_log::ERROR_SEV, "/Encountered invalid value of/",, vmm_log::WARNING_SEV, vmm_log::CONTINUE); vip_port_monitor_master.log.modify(,,,,vmm_log::WARNING_SEV, "/greater than expected width/",, vmm_log::NORMAL_SEV, vmm_log::CONTINUE); // Set the Port Monitor so it only reports the message that is above WARNING. vip_port_monitor_master.log.set_verbosity(vmm_log::WARNING_SEV); // Demote log messages on the slave Port Monitor. vip_port_monitor_slave.log.modify(,,,,vmm_log::ERROR_SEV, "/Encountered invalid value of/",, vmm_log::WARNING_SEV, vmm_log::CONTINUE); vip_port_monitor_slave.log.modify(,,,,vmm_log::WARNING_SEV, "/greater than expected width/",, vmm_log::NORMAL_SEV, vmm_log::CONTINUE); // Set the Monitor to only report messages that are above the WARNING. vip_port_monitor_slave.log.set_verbosity(vmm_log::WARNING_SEV); // Report if the simulation has encountered any number of error/fatal messages. // The string "/.*/" is used in the this.log.get_message_count for the "name" // and "instance" parameters. As a result, the log checks for all log instances. // The "recursive" parameter of 1 checks the hierarchical log data recursively. virtual task report() ; begin string str; `vmm_note(this.log, "report() of axi_basic_env is being called"); super.report(); if (this.log.get_message_count(vmm_log::ERROR_SEV,"/.*/", "/.*/", 1) || this.log.get_message_count(vmm_log::FATAL_SEV,"/.*/", "/.*/", 1) ) str = $psprintf("%s VmtTestEpilog: Failed/n",str); else str = $psprintf("%s VmtTestEpilog: Passed/n",str); `vmm_note (this.log, str); end endtask : report