RegisterLogin  
Update Profile
   
You are here: Tips & Tricks  
Minimize 
SVUG Tips & Tricks

Share your SystemVerilog Tips and Tricks!

To add new SystemVerilog Tips and Tricks, you will first need to login. Then, simply click on the "upload" button and fill out the submission form. You can also email it to us and we'll post your Tips and Tricks for you.

You do not need to login to view, vote or comment on posted Tips and Tricks. You only have to login to submit them.

Your SystemVerilog Tips and Tricks submission will be displayed following moderator approval.

Be careful with wild inequalities
Author : Tom Symons
Date : Thu 12/06/2007 @ 04:16

Wild inequalities are a useful new feature, but they can sting if you are not careful.

 


read article
RATING:   COMMENTS (1)
Converting Strings to Enums
Author : JL Gray
Date : Tue 11/06/2007 @ 06:52

Every once and awhile, I want to convert a string to an enumeration in SystemVerilog. Casting from strings to enums is not supported in SystemVerilog, but luckily, it is possible to implement a function to do the appropriate conversion using built in methods designed for iterating over the enum values.


read article
RATING:   COMMENTS (0) DOWNLOAD
Use the storage characteristics of a clocking block to simplify BFM logic
Author : Kelly Larson
Date : Wed 09/05/2007 @ 11:09

By making use of the storage within a clocking block, the main control loop of a BFM can be simplified to allow back-to-back transactions, without having to resort to other mechanisms to "peek" at future transactions.


read article
RATING:   COMMENTS (0) DOWNLOAD
Extend specific bus transaction classes from common generic transaction class
Author : Kelly Larson
Date : Wed 09/05/2007 @ 11:06

In today’s SOC designs it’s very common to have more than one type of bus co-existing in the same system. If the various busses are similar enough, it can very useful to have a common top-level generic bus transaction class which is shared between all of the specific busses.


read article
RATING:   COMMENTS (0) DOWNLOAD
when doing verify...
Author : Zoud
Date : Tue 09/04/2007 @ 11:01

when doing verify, :


read article
RATING:   COMMENTS (0)
Showing the contents of a Queue in specific format
Author : Manmohan Singh
Date : Sat 08/25/2007 @ 01:12

Sometimes when the Queues are very big it become very difficult to see their entire content. Similar kind of a problem I faced when I need to look at a Queue of size bit [31:00] data[$]. The contents it was showing as a continuous stream of data like 111122223333444455556666777788889999aaaabbbbccccddddeeee. In this scenario its difficult to figure out the boundaries of each location.


read article
RATING:   COMMENTS (10)
Random Stability for Debug
Author : Tom Symons
Date : Wed 08/22/2007 @ 07:09

Consider the case where you have a failing sim that you are trying to debug.  Let’s say you wish to display a memory structure or other component that requires a class object be constructed in order to utilize its handy display routines.  But when you re-run the sim with this new display routine call, your sim surprisingly stops failing or fails in a different way.   What do you do ?


read article
RATING:   COMMENTS (0)
Using Interface
Author : Vivek Avachat
Date : Tue 08/21/2007 @ 11:36

Using interface modules in System Verilog results into seamless port mapping of various submodules to be integrated at all abstraction levels in integration.


read article
RATING:   COMMENTS (2)
Interface default values
Author : Stefan Sandtrom
Date : Tue 08/21/2007 @ 03:44
When simulating some subpart of a design, or an incomplete design, there are sometimes unused interface ports. The signals in these interface ports may have to be set to some default values for the design to work as expected. It may be a tedious task to set all signals in these ports to proper values. Especially if there are many ports, and/or many control signals in the ports.
read article
RATING:   COMMENTS (0)
For comparing 2 signal strengths...
Author : Divya
Date : Thu 08/16/2007 @ 11:57

 

1. For comparing 2 signal strengths we can use $swrite and %v. For ex:

string str_dp, str_dm ;

$swrite(str_dp,"%v",dp);

$swrite(str_dm,"%v"dm);


read article
RATING:   COMMENTS (1)
< BACK  1 of 2  NEXT >
  

Top 10 Tips & Tricks Minimize
  

 Copyright 2008 by SystemVerilog User Group Contact Us    Privacy Statement