Dear Readers,
Let us start looking at more UVM code examples going forward
Let us print the customary "Hello World" example as the first step in learning UVM
Use the same things which we used in Verilog programming
Please refer to the steps-1,2.. and the highlighted messages(in Blue)
-Happy Reading
Hash
//Step-1Take any dummymodule
module dummy_helloworld;
//Step-2 Include the UVM Macros
//If we dont include the UVM Macros the tool could not recognise
//the uvm_report_info and throws out an error message as below
//As UVM is a class based library and including the libraries for printing
//uvm_report info would fix the issue
// Invalid argument. (errno = EINVAL)
// ** Error: F:/Hash/dummy_helloworld.sv(7): Failed to find 'uvm_report_info' in hierarchical name /uvm_report_info.
// Optimization failed
import uvm_pkg::*;
initial
begin
//Step-3 Print what you want
//Instead of our $display in Verilog we should use //uvm_report_info/warning/error/fatal
//As this is just a message use "info",to display the string we wanted
//The main difference is this uvm_report_info/warning/error/fatal is it should be minimum //of 2 fields and a max of 5 fields
//Step-4Lets print the strings "DUMMY_TEST" & "Hello World" on the log file
uvm_report_info("DUMMY_TEST","Hello_World");
end
endmodule
*********************************************************************************
QuestaSim vlog 10.0b Compiler 2011.05 May 5 2011
# -- Compiling module dummy_helloworld
# -- Importing package mtiUvm.uvm_pkg (uvm-1.0p1 Built-in)
# Top level modules:
# Loading sv_std.std
# Loading mtiUvm.uvm_pkg
# Loading work.dummy_helloworld(fast)
# Loading C:\questa_sim_10.0b\uvm-1.0p1\win32\uvm_dpi.dll
run
# ----------------------------------------------------------------
# UVM-1.0p1
# (C) 2007-2011 Mentor Graphics Corporation
# (C) 2007-2011 Cadence Design Systems, Inc.
# (C) 2006-2011 Synopsys, Inc.
# ----------------------------------------------------------------
# UVM_INFO @ 0: reporter [DUMMY_TEST] Hello_World
********************************************************************************
Let us start looking at more UVM code examples going forward
Let us print the customary "Hello World" example as the first step in learning UVM
Use the same things which we used in Verilog programming
Please refer to the steps-1,2.. and the highlighted messages(in Blue)
-Happy Reading
Hash
//Step-1Take any dummymodule
module dummy_helloworld;
//Step-2 Include the UVM Macros
//If we dont include the UVM Macros the tool could not recognise
//the uvm_report_info and throws out an error message as below
//As UVM is a class based library and including the libraries for printing
//uvm_report info would fix the issue
// Invalid argument. (errno = EINVAL)
// ** Error: F:/Hash/dummy_helloworld.sv(7): Failed to find 'uvm_report_info' in hierarchical name /uvm_report_info.
// Optimization failed
import uvm_pkg::*;
initial
begin
//Step-3 Print what you want
//Instead of our $display in Verilog we should use //uvm_report_info/warning/error/fatal
//As this is just a message use "info",to display the string we wanted
//The main difference is this uvm_report_info/warning/error/fatal is it should be minimum //of 2 fields and a max of 5 fields
//Step-4Lets print the strings "DUMMY_TEST" & "Hello World" on the log file
uvm_report_info("DUMMY_TEST","Hello_World");
end
endmodule
*********************************************************************************
QuestaSim vlog 10.0b Compiler 2011.05 May 5 2011
# -- Compiling module dummy_helloworld
# -- Importing package mtiUvm.uvm_pkg (uvm-1.0p1 Built-in)
# Top level modules:
# Loading sv_std.std
# Loading mtiUvm.uvm_pkg
# Loading work.dummy_helloworld(fast)
# Loading C:\questa_sim_10.0b\uvm-1.0p1\win32\uvm_dpi.dll
run
# ----------------------------------------------------------------
# UVM-1.0p1
# (C) 2007-2011 Mentor Graphics Corporation
# (C) 2007-2011 Cadence Design Systems, Inc.
# (C) 2006-2011 Synopsys, Inc.
# ----------------------------------------------------------------
# UVM_INFO @ 0: reporter [DUMMY_TEST] Hello_World
********************************************************************************
No comments:
Post a Comment