I am trying to create a driver with two stage pipeline using the example given on uvm_transaction entry of uvm on-line reference as shown below.
task do_item(); forever begin mbus_item req; lock.get(); seq_item_port.get(req); // Completes the sequencer-driver handshake accept_tr(req); // request bus, wait for grant, etc. begin_tr(req); // execute address phase // allows next transaction to begin address phase lock.put(); // execute data phase // (may trigger custom "data_phase" event here) end_tr(req); end endtask: do_item
when I compiled my version using irun, it complained about
ncvlog: *E,ILLHIN (driver.sv,233|13): illegal location for a hierarchical name (in a package).
Could anyone please tell me what is the right way to lock the sequencer in the driver.
thanks,