Home Tips Don't Be SYSsy

Search

Don't Be SYSsy PDF Print E-mail
User Rating: / 0
PoorBest 
Thursday, 24 December 2009 15:26

Anyone who’s ever worked with me knows that I have several weaknesses. One of them is extra sensitivity to things that reside under sys (global.sys) in Specman/e. If this is Chinese to you then you’re probably a SystemVerilog guy: "sys" is the top most e struct (class) and the one struct people should strive NOT to use. The only thing that should be placed there is your own top unit, preferably customized to your project needs.

 

So the reason why people would want to use sys to place methods or other fields in the first place is because it’s accessible from everywhere, which is extremely convenient. But methodology-wise it would not be the smartest thing to do. Let me tell you why:

1. If you were the only verifier in your project then I would let you slip away. But since this is not the situation in most of the cases - you might get contentions on struct member names.

2. Placing code under sys encourages the use of full e paths rather than pointers and ports - code integration becomes a big mess this way, trust me.

3. Additional instances of your env is impossible because you can’t instantiate sys - no reuse.

4. You won’t be able to use your environment in a larger context because it’s not tightly encapsulated - no scalability.

5. There’s no logical distinction between the various elements, everything under the same struct - very hard to maintain

With all that being said - sometimes we need a speedy action and using sys could be a quick and dirty solution - that’s ok. But as a general guideline, unless you have a really good reason, don’t be syssy, create your own top level struct/unit, and use self-contained components.

 

 
More articles :

» Cadence, Synopsys, Mentor - This Is Our Wish List

As the EDA industry seems to be making moves towards a Unified Verification Methodology (OVM + VMM) we thought this would be a great opportunity to share a couple of things that have been on our wish-list for quite a while.

» How To Validate Type-Casting In OVM-e

Before type-casting an e variable ("as_a"), we often want to check the validity of the operation (this is quite similar in concept to $cast in SystenVerilog). The reason is simple, in case the casting operation failed we would end up with a fatal...

» Future Trends In HR

The industry is going through some tough times, no doubt about it. We’ve seen layoffs worldwide, projects being cancelled or put off for better times. How is this going to affect the way companies manage their human resources? Joining us today for...

» Packing In OVM-e

This example shows how to pack a struct into a list of Double Words (32 bit) keeping the original order. This time we got less talking, and more code:

» Another Step Forward For VMM

While the move from 1.0 to 1.1 and its later flavors did not involve a major paradigm shift, VMM1.2 (beta) introduces several fundamentally new concepts that you should be aware of. Some of the new concepts are the natural result of an evolving...

Add comment


Security code
Refresh

Copyright © 2017 Think Verification - Tips & Insights on ASIC Verification. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.