What to put in a package

While I embark on UVM verification, I would like to know what to organize my code in package?
Are there any general guidelines as to what to put in a package?

Thanks,

In reply to verif_learner:

You are putting data of General interest in a package. And you should put all definions of an agent put into a package.

In reply to chr_sue:

Thanks. I would assume the number of packages would be based on the distinct functionality that is composed in the packages?

In reply to verif_learner:

I will use packages that reflect the hierarchy of my test environment. This allows ease of compilation as you compile from the bottom up and will only need to import one user package at the top level:

  • Agent package: agent parameters & enums, configuration object, driver, monitor and agent
  • Environment package: environment parameters, configuration object, environment. Imports agent package(s) as required
  • Test package: test defines, test sequences. Imports environment package(s) as needed. Imports agent package(s) to access agent sequences (if defined).

The top level will only need to import the test package.

In reply to verif_learner:

You also can use packages such as

  • parameters and types package
  • variables and nets package
  • properties and checkers package
  • tasks and functions package

packages shares data and data is referenced within multiple modules, interfaces, components, sequences, programs, checkers etc.