Skip to content

Error in report functions  #23

Description

@ritugoel

While running this program report function like uvm_info, uvm_error are not compiling. Compilation error are listed beneath the code.

import esdl;
import uvm;
import std.stdio;
class TestBench: RootEntity
{uvm_root_entity!(test_root) tb;}
class test_root:uvm_root
{ mixin uvm_component_utils;}
class my_catcher_info: uvm_report_catcher
{ override action_e do_catch()
{import std.stdio;
if(get_name() != get_id()) return THROW;
if(get_severity() != UVM_INFO) return THROW;
writeln("Info Catcher Caught a message...\n");
uvm_info("INFO CATCHER", "From my_catcher_info catch()" ,UVM_MEDIUM);
return THROW;}}
class my_catcher_warning: uvm_report_catcher
{override action_e do_catch()
{ import std.stdio;
if(get_name() != get_id()) return THROW;
if(get_severity() != UVM_WARNING) return THROW;
writeln("Warning Catcher Caught a message...\n");
uvm_warning("WARNING CATCHER","From my_catcher_warning catch()");
return THROW;}}
class my_catcher_error : uvm_report_catcher
{ override action_e do_catch()
{import std.stdio;
if(get_name() != get_id()) return THROW;
if(get_severity() != UVM_ERROR) return THROW;
writeln("Error Catcher Caught a message...\n");
uvm_error( "ERROR CATCHER ","From my_catcher_error catch() ");
return THROW; }}
class my_catcher_fatal: uvm_report_catcher
{ override action_e do_catch()
{import std.stdio;
if(get_name() != get_id()) return THROW;
if(get_severity() != UVM_FATAL) return THROW;
writeln("Fatal Catcher Caught a Fatal message...\n");
uvm_info("FATAL CATCHER", "From my_catcher_fatal catch()", UVM_INFO );
return THROW;}}
class test: uvm_test
{ mixin uvm_component_utils;
this(string name, uvm_component parent = null)
{ super(name, parent);}
override void run()
{
my_catcher_info ctchr1 = new my_catcher_info;
my_catcher_warning ctchr2 = new my_catcher_warning;
my_catcher_error ctchr3 = new my_catcher_error;
my_catcher_fatal ctchr4 = new my_catcher_fatal;
import std.stdio;
writeln("UVM TEST - Same catcher type - different IDs\n");
writeln("adding a catcher of type my_catcher_info with id of Catcher1\n");
uvm_report_cb.add(null,ctchr1);
writeln("adding a catcher of type my_catcher_warning with id of Catcher2\n");
uvm_report_cb.add(null,ctchr2);
writeln("adding a catcher of type my_catcher_error with id of Catcher3\n");
uvm_report_cb.add(null,ctchr3);
writeln("adding a catcher of type my_catcher_fatal with id of Catcher4\n");
uvm_report_cb.add(null,ctchr4);
uvm_info("Catcher1", "This Info message is for Catcher1", UVM_MEDIUM);
uvm_warning("Catcher2", "This Warning message is for Catcher2");
uvm_error ("Catcher3", "This Error message is for Catcher3");
//`uvm_fatal ("Catcher4", "This fatal message is for Catcher4");
uvm_info("XYZ", "This second message is for No One", UVM_MEDIUM);
writeln("UVM TEST EXPECT 2 UVM_ERROR\n");
uvm_top.stop_request(); }
override void report()
{import std.stdio;
writeln("** UVM TEST PASSED **\n");}}
void main(string[] argv)
{ TestBench tb = new TestBench;
tb.multiCore(0,0);
tb.elaborate("test", argv);
tb.simulate();
}

/home/vlang/local/vlang-1.0.0-alpha1/dmd2/linux/bin64/../../../vlang-uvm/src/uvm/base/uvm_message_defines.d(107): Error: undefined identifier 'uvm_report_enabled'
test.d(68): Error: template instance uvm.base.uvm_report_catcher.uvm_report_catcher.uvm_report_mixin!().uvm_info!("test.d", 68) error instantiating
/home/vlang/local/vlang-1.0.0-alpha1/dmd2/linux/bin64/../../../vlang-uvm/src/uvm/base/uvm_message_defines.d(124): Error: undefined identifier 'uvm_report_enabled'
test.d(86): Error: template instance uvm.base.uvm_report_catcher.uvm_report_catcher.uvm_report_mixin!().uvm_warning!("test.d", 86) error instantiating
/home/vlang/local/vlang-1.0.0-alpha1/dmd2/linux/bin64/../../../vlang-uvm/src/uvm/base/uvm_message_defines.d(140): Error: undefined identifier 'uvm_report_enabled'
test.d(106): Error: template instance uvm.base.uvm_report_catcher.uvm_report_catcher.uvm_report_mixin!().uvm_error!("test.d", 106) error instantiating
/home/vlang/local/vlang-1.0.0-alpha1/dmd2/linux/bin64/../../../vlang-uvm/src/uvm/base/uvm_message_defines.d(107): Error: undefined identifier 'uvm_report_enabled'
test.d(128): Error: template instance uvm.base.uvm_report_catcher.uvm_report_catcher.uvm_report_mixin!().uvm_info!("test.d", 128) error instantiating

Thanks & regards,
Ritu

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions