How to define Packages using UVM
When we need to group our VE (Verification Environment) files for easier compilation we need to package them as because
- Our compile strategy is project specific
- Below example demonstrate how we can create our own package and place all the files
package tx_pkg;
import uvm_pkg ::*;
`include "uvm_macros.svh"
`include "tx_item.svh"
`include "tx_sequence.svh"
`include "tx_sequencer.svh"
`include "tx_driver.svh"
`include "tx_monitor.svh"
`include "tx_agent.svh"
`include "tx_env.svh"
`include "tx_test.svh"
endpackage : tx_pkg
*** Here uvm_pkg and uvm_macros.svh are the predefined UVM Package and macro libraries
*** As our VE (Verification Environment) are built on these macros we need to import before importing our own files.
Comments
Post a Comment