Jump to content

Package in SystemVerilog


Recommended Posts

Hi All,

 

I have to access the associative array declared in top module from one of the TB files. All TB files are part of the package which is imported in the top module.

When i am trying to access the the array using the path top.array_name, I am getting cross module reference error.

 

Kindly let me know how to resolve it.

 

Regards,

Bhim

Link to comment
Share on other sites

SystemVerilog packages are designed to be independent units with no dependencies except for other imported packages. This forces an explicit package compilation order, and also means that packages cannot hierarchically reference anything outside the package that has not been imported from another package.

 

This means your testbench in the package needs some clearly defined boundary to access the top module. You may want to see my DVCon paper: The Missing kink:Testbench to Dut connection

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...