Hi,
I started to run the uvm examples that are part of the general uvm example released by Cadence and Mentor.
for the first example:
simple/hello_world.sv
I don’t understand the lines below with “<=======”.
mytop = new("top"); // what's the purpose of this line of code ? <================
// Isn't "top mytop" already declared/constructed by the "mytop" object? <=====
Thanks,
David
module hello_world;
import uvm_pkg::*;
`include “uvm_macros.svh”
include "packet.sv"
include “producer.sv”
include "consumer.sv"
include “top.sv”
top mytop; // I believe this is to instantiate the top as “mytop”.
initial begin
…
mytop = new(“top”); // what’s the purpose of this line of code ? <================
// Isn’t “top mytop” already declared/constructed by the “mytop” object? <=====
uvm_default_table_printer.knobs.type_width=20;
run_test();
end
endmodule