All,
I have been attempting to compile my SPB testbench, but have came across a compilation error which I believe is caused by the testbench package which comprises of my `include macros. The package is shown below:
package spb_pkg;
import uvm_pkg::*;
`include "uvm_macros.svh"
`include "spb_data_item.sv"
`include "spb_agent_config.sv"
`include "spb_env_config.sv"
`include "spb_seq_lib.sv"
`include "spb_sequencer.sv"
`include "spb_driver.sv"
`include "spb_monitor.sv"
`include "reg2spb_adapter.sv"
`include "spb_agent.sv"
`include "spb_environment.sv"
//`include "spb_coverage.sv"
//`include "spb_scoreboard.sv"
`include "spb_test_base.sv"
endpackage : spb_pkg
I use this package in my top level module as shown below:
`include "spb_if.sv"
`include "spb_pkg.sv"
//------------------------------------------------------------------------------------------------------
//Start Of Module
//------------------------------------------------------------------------------------------------------
module spb_top;
//Import packages and include uvm macros
import uvm_pkg::*;
import spb_pkg::*;
`include "uvm_macros.svh"
The error that I receive is regarding my spb environment component, so for completion the beginning of the environment code is shown below:
//------------------------------------------------------------------------------------------------------
//Start Of Class
//------------------------------------------------------------------------------------------------------
class spb_environment extends uvm_env;
//------------------------------------------------------------------------------------------------------
//Class Data Members
//------------------------------------------------------------------------------------------------------
spb_agent spb_ag; //Handle to the SPB agent
spb_env_config spb_env_cfg; //Handle to the environment configuration
//spb_reg_coverage spb_reg_fc_collector; //Handle to SPB functional coverage subsciber
//spb_scoreboard spb_sb; //Handle to SPB scoreboard
reg2spb_adapter reg2spb; //Handle to the adapter
uvm_reg_predictor #(spb_seq_item) spb2reg_predictor; //Handle to the predictor
//------------------------------------------------------------------------------------------------------
//Automate frequently used methods, e.g get_full_name(), copy(), compare() etc.
//Fields set here can be adapted higher in the environment hierarchy
//------------------------------------------------------------------------------------------------------
`uvm_component_utils (spb_environment)
//------------------------------------------------------------------------------------------------------
//Standard constructor for environment
//------------------------------------------------------------------------------------------------------
function new (string name = "spb_environment", uvm_component parent);
super.new(name, parent);
endfunction
The error that I receive is as follows:
class spb_environment extends uvm_env;
|
ncvlog: *E,NPITEM (..../vip/spb_uvc/sv/spb_environment.sv. 10|4): Not a valid package item: 'module/udp instance' [SystemVerilog]/
(`include file : ....../vip/spb_uvc/sve/spb_top.sv line 10, `include file: .../vip/spb_uvc/sv/spb_pkg.sv line 23, file : ../vip/spb_uvc/sve/spb_top.sv line 1)
I guess that this error is caused by the ordering of my `include macros, however, I cannot understand why I am getting such an error and how I would remove this error. Any suggestions would be much appreciate.
Regards,
Owen