Jump to content

How to replicate the code in class?


Recommended Posts

Hi All,

I am trying to keep my testbench scale able as we do in RTL files using genvars.

I want to have queues of a transaction class inside my scoreboard class. e.g.

monitor_trans exp_trans_port1[$];

monitor_trans exp_trans_port2[$];

monitor_trans exp_trans_port3[$];

monitor_trans exp_trans_port4[$];

....

I want to scale them in such a way that if you modify the parameters then such instantiations may increase or decrease.

To achieve this I cannot use "for loop" here (It gives compilation error).

I tried using `define portname(name) monitor_trans name`` [$] ==> This also did not work.

Please let me know if you have some idea on this?

Let me know if more clarification required.

Regards

Peer Mohammed

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...