mpeer Posted December 25, 2012 Report Share Posted December 25, 2012 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 Quote Link to comment Share on other sites More sharing options...
petermonsson Posted December 26, 2012 Report Share Posted December 26, 2012 Hi Peer, I think that you will want to use an array of queues: monitor_trans exp_trans_port[][$]; (or monitor_trans exp_trans_port[$][]; I don't recall the correct order) exp_trans_port = new[num_trans_ports]; Best Regards Peter Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.