<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Welcome to Puneet's World</title>
	<atom:link href="http://puneetworld.com/feed" rel="self" type="application/rss+xml" />
	<link>http://puneetworld.com</link>
	<description>Puneet's Home Page</description>
	<pubDate>Wed, 15 Oct 2008 12:29:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Usefull vimdiff commands to view diff and merge</title>
		<link>http://puneetworld.com/archives/48</link>
		<comments>http://puneetworld.com/archives/48#comments</comments>
		<pubDate>Wed, 15 Oct 2008 12:20:55 +0000</pubDate>
		<dc:creator>er.punit</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://puneetworld.com/archives/48</guid>
		<description><![CDATA[Diffing the files and merging them is one of the very common task we do everyday. Following are few very useful commands to view the diff using vim and merge them using the vimdiff commands instead of copying and pasting from one file to another. 
To diff two files using vim : 
vimdiff  file1 [...]]]></description>
			<content:encoded><![CDATA[<p>Diffing the files and merging them is one of the very common task we do everyday. Following are few very useful commands to view the diff using vim and merge them using the vimdiff commands instead of copying and pasting from one file to another. </p>
<p>To diff two files using vim : </p>
<p>vimdiff  file1 file2<br />or <br />vim -d file1 file2</p>
<p>Ofcourse you can use gvim also but I don't prefer using GVIM. </p>
<p>gvimdiff file1 file2 </p>
<p>Commands : </p>
<p>[c : Jump to previous diff<br />]c : Jump to the next diff</p>
<p>do or :diffget : Diff obtain (get the changes to the current buffer/file from the other buffer)<br />dp or :diffput : Diff Put (Put the changes from the current buffer/file to the other buffer)</p>
<p>As this being one of very command task I do, I have mapped them to single keys for the easy access.<br /> 
<p>nmap &lt;F7&gt; [czz <br />nmap &lt;F8&gt; ]czz<br />nmap &lt;F2&gt; do<br />nmap &lt;F3&gt; dp</p>
<p>The zz in the end of the command [c will center at the point of the diff so that we can view the diff clearly.</p>
<p>~Enjoy Vim</p>
]]></content:encoded>
			<wfw:commentRss>http://puneetworld.com/archives/48/feed</wfw:commentRss>
		</item>
		<item>
		<title>Changing the seed for a class and generting different patterent for randc</title>
		<link>http://puneetworld.com/archives/45</link>
		<comments>http://puneetworld.com/archives/45#comments</comments>
		<pubDate>Tue, 09 Sep 2008 06:56:03 +0000</pubDate>
		<dc:creator>er.punit</dc:creator>
		
		<category><![CDATA[System Verilog]]></category>

		<guid isPermaLink="false">http://puneetworld.com/archives/45</guid>
		<description><![CDATA[Here is the example. How you can change the seed for a class and generate different pattern with randc.If you comment the line "obj.srandom(seed)" it will generate the same pattern again after the cycle. Try compiling it again with commenting above line. 
class randctest;    randc bit [1:0] randbit;    task [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the example. How you can change the seed for a class and generate different pattern with randc.<br />If you comment the line "obj.srandom(seed)" it will generate the same pattern again after the cycle. <br />Try compiling it again with commenting above line. </p>
<p>class randctest;<br />    randc bit [1:0] randbit;<br />    task print;<br />        $display("Rand C = %d", randbit);<br />    endtask<br />endclass</p>
<p>program main;</p>
<p>    randctest obj;</p>
<p>    initial begin<br />        obj = new();<br />        for (int i=0; i&lt;12; i++) begin<br />            if (i % 4 == 0) begin<br />                obj.srandom(236+i);<br />                $display("==============");<br />            end<br />            if (obj.randomize()) begin<br />                obj.print();<br />            end<br />            else begin<br />                $display("Randomization failed \n");<br />            end<br />        end<br />    end<br />endprogram : main</p>
<p>Output :<br />==============<br />Rand C = 0<br />Rand C = 1<br />Rand C = 2<br />Rand C = 3<br />==============<br />Rand C = 2<br />Rand C = 1<br />Rand C = 3<br />Rand C = 0<br />==============<br />Rand C = 1<br />Rand C = 0<br />Rand C = 2<br />Rand C = 3</p>
]]></content:encoded>
			<wfw:commentRss>http://puneetworld.com/archives/45/feed</wfw:commentRss>
		</item>
		<item>
		<title>Smart Person Vs Wise Person</title>
		<link>http://puneetworld.com/archives/39</link>
		<comments>http://puneetworld.com/archives/39#comments</comments>
		<pubDate>Fri, 05 Sep 2008 11:52:21 +0000</pubDate>
		<dc:creator>er.punit</dc:creator>
		
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://puneetworld.com/archives/39</guid>
		<description><![CDATA[A good thought : 
The difference between a smart person and a wise person is that a wiseperson knows how not to get into situations that a smart person knowshow to get out of.
Reference Page : 
http://simeons.wordpress.com/2008/09/04/smart-entrepreneurs-vs-wise-entrepreneurs/
Page has few more thoughts out of which the last one i don't agree : 

Be different, not best
Do [...]]]></description>
			<content:encoded><![CDATA[<p>A good thought : </p>
<p>The difference between a smart person and a wise person is that a wise<br />person knows how not to get into situations that a smart person knows<br />how to get out of.</p>
<p>Reference Page : </p>
<p>http://simeons.wordpress.com/2008/09/04/smart-entrepreneurs-vs-wise-entrepreneurs/</p>
<p>Page has few more thoughts out of which the last one i don't agree : 
<ul>
<li>Be different, not best</li>
<li>Do less, not more</li>
<li>Go around a wall, not through it</li>
<li>It is better to figure out how not to have to solve a problem as opposed to having to solve the problem.</li>
</ul>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://puneetworld.com/archives/39/feed</wfw:commentRss>
		</item>
		<item>
		<title>Sourcing a Shell script into perl</title>
		<link>http://puneetworld.com/archives/37</link>
		<comments>http://puneetworld.com/archives/37#comments</comments>
		<pubDate>Thu, 21 Aug 2008 13:37:28 +0000</pubDate>
		<dc:creator>er.punit</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://puneetworld.com/archives/37</guid>
		<description><![CDATA[A lot of times we require to source the shell variables or shell script into the perl environment. One way to do this is you add very variable into the perl script something like :
$ENV{"SOME_VAR"} = "SOME_VAL";
The other best way to do this task is parse the shell file and source all the environment variables [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of times we require to source the shell variables or shell script into the perl environment. One way to do this is you add very variable into the perl script something like :</p>
<p>$ENV{"SOME_VAR"} = "SOME_VAL";</p>
<p>The other best way to do this task is parse the shell file and source all the environment variables in to perl script environment. This way we don't need to modify your perl script every time the shell script is modified. <img src='http://puneetworld.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>my ($envar, $enval);<br />open IN, ". ./3rdParty.env; env |"<br />  or die "Could not run shell: $!\n";<br />while ( &lt;IN&gt; ) {<br />  print  $_;<br />  chomp;<br />  ($envar,$enval) = split /=/,$_,2;<br />  $ENV{$envar} = $enval;<br />}<br />close IN;</p>
<p>This is very useful if the shell script is changed very frequently by the users.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://puneetworld.com/archives/37/feed</wfw:commentRss>
		</item>
		<item>
		<title>Ways to add library path in perl</title>
		<link>http://puneetworld.com/archives/35</link>
		<comments>http://puneetworld.com/archives/35#comments</comments>
		<pubDate>Thu, 21 Aug 2008 11:34:05 +0000</pubDate>
		<dc:creator>er.punit</dc:creator>
		
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://puneetworld.com/archives/35</guid>
		<description><![CDATA[Run a perl script using libraries in nonstandard locations.======================================
Use perl -V to see the include paths @INC array I will be something like :     /usr/lib/perl5/5.8.0/i386-linux-thread-multi    /usr/lib/perl5/5.8.0    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi    /usr/lib/perl5/site_perl/5.8.0    /usr/lib/perl5/site_perl    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi    /usr/lib/perl5/vendor_perl/5.8.0   [...]]]></description>
			<content:encoded><![CDATA[<p><b>R</b><b>un a perl script using libraries in nonstandard locations.<br />======================================</p>
<p></b>Use perl -V to see the include paths @INC array <br />I will be something like :<br />     /usr/lib/perl5/5.8.0/i386-linux-thread-multi<br />    /usr/lib/perl5/5.8.0<br />    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi<br />    /usr/lib/perl5/site_perl/5.8.0<br />    /usr/lib/perl5/site_perl<br />    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi<br />    /usr/lib/perl5/vendor_perl/5.8.0<br />    /usr/lib/perl5/vendor_perl</p>
<p><b><br />1. Using the module lib<br />===============</b><br />The standard module lib can be used to specify an explicit path to include. It must be stated at the <br />top of the script:<br />#!/usr/bin/perl<br />#<br />use lib "/opt/special/plib";<br />use strict;<br />use warnings;<br /><b><br />2. Using the switch -I at the command line<br />============================</b></p>
<p>The switch I can be used to specify additional library locations when invoking the interpreter.<br />perl -I /opt/special/plib script.pl</p>
<p><b>3. Using the switch -I in the first line of the script<br />=================================<br /></b>The same I switch can be added to the interpreter specification.<br />#!/usr/bin/perl -I /opt/special/plib<br />#<br />use strict;<br />use warnings;<br />..</p>
<p>This works when invoking the script via the shell (which will run the interpreter with full <br />options and arguments as specified in the first line) and also when invoking the interpreter <br />directly: It apparently scans the first line for options.</p>
<p><b>4. Manipulating @INC directly<br />====================<br /></b>The array @INC can be manipulated directly using array operations :</p>
<p>#!/usr/bin/perl<br />#<br />BEGIN {<br />     unshift(@INC, "/opt/special/plib");<br />}<br />use strict;<br />use warnings;</p>
<p><b>5. Using the environment variable PERL5LIB<br />==============================<br /></b>The environment variable PERL5LIB can be used to specify additional include directories whe<br />running a perl script.<br />&gt; export PERL5LIB=/opt/special/plib</p>
<p><b>6. Changing @INC at compile time<br />=======================<br /></b>        <br />When running Configure to compile the perl interpreter itself, there are several possibilities to add <br />additional library path elements:<br />        · Using the variable vendorprefix<br />        · Using the variable otherlibdirs<br />Both must be specified when calling Configure as a define, eg<br />    &gt; sh Configure -Dotherlibdirs=/opt/special/plib<br />The variable otherlibdirs is preferred, as it can hold mutliple values separated by a colon just like <br />the familiar PATH environment variable.<br />Details about compiling perl can be found on the CPAN network : <br /><a href="http://search.cpan.org/%7Enwclark/perl5.8.3/INSTALL">http://search.cpan.org/~nwclark/perl5.8.3/INSTALL</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://puneetworld.com/archives/35/feed</wfw:commentRss>
		</item>
		<item>
		<title>Changing Case in VIM</title>
		<link>http://puneetworld.com/archives/33</link>
		<comments>http://puneetworld.com/archives/33#comments</comments>
		<pubDate>Thu, 21 Aug 2008 09:32:10 +0000</pubDate>
		<dc:creator>er.punit</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://puneetworld.com/archives/33</guid>
		<description><![CDATA[Sometimes we need to change the case of the letters in vim. Here is how you can do it with vim. Search and replace it with "\U&#38;" or "\L&#38;" or upper and lower letters. 
changing to CAPITAL LETTERS : 
:%s/^.*$/\U&#38;/g
Changing to lower letters :
:%s/^.*$/\L&#38;/g
Enjoy Power of VIM

]]></description>
			<content:encoded><![CDATA[<p>Sometimes we need to change the case of the letters in vim. Here is how you can do it with vim. Search and replace it with "\U&amp;" or "\L&amp;" or upper and lower letters. </p>
<p>changing to CAPITAL LETTERS : </p>
<p>:%s/^.*$/\U&amp;/g</p>
<p>Changing to lower letters :</p>
<p>:%s/^.*$/\L&amp;/g</p>
<p>Enjoy Power of VIM</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://puneetworld.com/archives/33/feed</wfw:commentRss>
		</item>
		<item>
		<title>VMM with Questa and NCSIM</title>
		<link>http://puneetworld.com/archives/32</link>
		<comments>http://puneetworld.com/archives/32#comments</comments>
		<pubDate>Sat, 09 Aug 2008 05:52:28 +0000</pubDate>
		<dc:creator>er.punit</dc:creator>
		
		<category><![CDATA[Verification]]></category>

		<guid isPermaLink="false">http://puneetworld.com/archives/32</guid>
		<description><![CDATA[Its great to hear that  Mentor has release a customized version of VMM that runs on Questa, Modelsim. I hope it will complie on NCsim as well. In the release we have a PDF which describes how the VMM is not compliant with ths System verilog LRM.  Thats seems to be true to [...]]]></description>
			<content:encoded><![CDATA[<p>Its great to hear that  Mentor has release a customized version of VMM that runs on Questa, Modelsim. I hope it will complie on NCsim as well. In the release we have a PDF which describes how the VMM is not compliant with ths System verilog LRM.  Thats seems to be true to me, because we also faced some similar issues with vcs when we were porting the environment which was written for VCS to modelsim.  We also complied VMM with modelsim with some ugly fixes just to meet the deadlines.</p>
<p>There are a lot of different things we found which LRM says should not be supported in SV but VCS supports. I will sortly add few examples on this. There is also a reaction from the synopsis on this and one of the synopsis author says "I’d venture to say that despite all the posturing, Mentor’s support of<br />
VMM demonstrates the solidity and broad industry acceptance of VMM."</p>
<p>For the users of these methodologies its good that the different vendors support different methodologies. I hope synopis also follow the same in future. Then the life of verificaton engineers like us who needs to port the environment to different simulators will be easier. </p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://puneetworld.com/archives/32/feed</wfw:commentRss>
		</item>
		<item>
		<title>What I did in last one year</title>
		<link>http://puneetworld.com/archives/31</link>
		<comments>http://puneetworld.com/archives/31#comments</comments>
		<pubDate>Wed, 06 Aug 2008 19:03:36 +0000</pubDate>
		<dc:creator>er.punit</dc:creator>
		
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://puneetworld.com/archives/31</guid>
		<description><![CDATA[From last few days I am thinking what I did in my last one year. I have almost stopped reading. Earlier at least I used to try. But from last more than one year I just stopped it. I used to try out new things, learn new things thats also stopped now. I used to [...]]]></description>
			<content:encoded><![CDATA[<p>From last few days I am thinking what I did in my last one year. I have almost stopped reading. Earlier at least I used to try. But from last more than one year I just stopped it. I used to try out new things, learn new things thats also stopped now. I used to go to office on weekends work late hours in office that's also almost stopped now. Now I go only when someone call me for work.  </p>
<p>Actually I worked on implementing a new idea. Which dint worked out. I learned a lot in the last one year but there was not use full results. I will write down my my learning/experiences later on. Its too late for that now.  </p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://puneetworld.com/archives/31/feed</wfw:commentRss>
		</item>
		<item>
		<title>Code Coverage</title>
		<link>http://puneetworld.com/archives/25</link>
		<comments>http://puneetworld.com/archives/25#comments</comments>
		<pubDate>Tue, 13 Mar 2007 08:08:47 +0000</pubDate>
		<dc:creator>er.punit</dc:creator>
		
		<category><![CDATA[Verification]]></category>

		<guid isPermaLink="false">http://puneetworld.com/archives/25</guid>
		<description><![CDATA[Code coverage and function coverage tells the verification engineer if the test plan goals have been met or not.
Thare are following types of code coverage :
1. Line Coverage
2. Toggle Coverage
3. FSM Coverage
4. Combinational coverage
1. Line Coverage :
Line coverage is answer the the simple question whether this line is covered or not. It is recommended that [...]]]></description>
			<content:encoded><![CDATA[<p>Code coverage and function coverage tells the verification engineer if the test plan goals have been met or not.</p>
<p>Thare are following types of code coverage :</p>
<blockquote><p>1. Line Coverage</p>
<p>2. Toggle Coverage</p>
<p>3. FSM Coverage</p>
<p>4. Combinational coverage</p></blockquote>
<p><u><strong>1. Line Coverage</strong></u> :</p>
<p>Line coverage is answer the the simple question whether this line is covered or not. It is recommended that the line coverage for        all modules in a design receive 100% coverage. If a line of logic is not executed        during simulation, the design has not been fully exercised. Line coverage is        useful for determining holes in the test suite.</p>
<p><u><strong>2. Toggle Coverage</strong> :</u></p>
<p>Toggle Coverage is answer to the question "Did this bit of register or wire changed from 0 to 1 and 1 to 0 during simulation".  A bit is covered if it changes from 0 to 1 and 1 to 0 during simulation.</p>
<p>For a design to pass full coverage, it is recommended that the toggle coverage        for all modules in a design received 100% coverage. If a bit is never changes        value, it is usually an indication that a mode is not being exercised in the        design or a datapath has a stuck-at issue.</p>
<p><u><strong>3.  Combinational Coverage:</strong></u></p>
<p class="pg">Combinational logic coverage answers the question, "What values did an        expression (or subexpression) evaluate to (or not evaluate to) during the        course of the simulation?"</p>
<p class="pg">This type of coverage is extremely useful in determining logical combinations        of signals that were not tried during simulation, exposing potential holes in        verification.</p>
<p class="pg">example :</p>
<p class="pg">assign c = a I b;</p>
<p class="pg">The expression "a | b" can result in two values, 0 and 1, but can do so in        four combinations:</p>
<p class="pg">
<ol>
<li>a = 0, b = 0, c = 0</li>
<li>a = 0, b = 1, c = 1</li>
<li>a = 1, b = 0, c = 1</li>
<li>a = 1, b = 1, c = 1</li>
</ol>
<p class="pg">Noticing the values assigned to a and b during simulation, shows that        combinations (2) and (4) were hit during execution while combinations        (1) and (3) were not (2 out of 4 - 50%).</p>
<p class="pg">it is recommended that the combinational        logic coverage for all modules be 80% or higher. If the expression coverage for        an expression is not 100%, it is recommended that the verification engineer        closely examine these missed cases to determine if more testing is required.        Sometimes certain combinations of signals are unachievable due to design        constraints, keeping the expression coverage from ever reaching a value of        100% but still can be considered fully covered.</p>
<p class="pg"><u><strong>4.  Finite State Machine (FSM) Coverage:</strong></u></p>
<p class="pg">Finite state machine (FSM) coverage answers the question, "Did I reach all of the states and traverse all possible paths through a given state machine?"</p>
<p class="pg">There are two types of coverage detail for FSMs that Covered can handle:</p>
<ol>
<li>State coverage - answers the question "Were all states of an FSM hit during simulation?"</li>
<li>State transition coverage - answers the question "Did the FSM transition between all states (that are achievable) in simulation?"</li>
</ol>
<p class="pg">It is recommended that the FSM coverage for all finite state machines in the design to receive 100% coverage for the state coverage and 100% for all achievable state transitions. Since Covered will not determine which state transitions are achievable, it is up to the verification engineer to examine the executed state transitions to determine if 100% of possible transitions occurred.</p>
<p class="pg">
<p class="pg">
]]></content:encoded>
			<wfw:commentRss>http://puneetworld.com/archives/25/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to create a dump file in verilog</title>
		<link>http://puneetworld.com/archives/26</link>
		<comments>http://puneetworld.com/archives/26#comments</comments>
		<pubDate>Tue, 13 Mar 2007 07:40:44 +0000</pubDate>
		<dc:creator>er.punit</dc:creator>
		
		<category><![CDATA[Verification]]></category>

		<guid isPermaLink="false">http://puneetworld.com/archives/26</guid>
		<description><![CDATA[In Verilog, the way that you create the VCD dumpfile is by using two types of        Verilog system calls (1) $dumpfile and (2) $dumpvars. The following example        shows how to create and generate a dumpfile called "test.vcd" that will dump  [...]]]></description>
			<content:encoded><![CDATA[<p>In Verilog, the way that you create the VCD dumpfile is by using two types of        Verilog system calls (1) $dumpfile and (2) $dumpvars. The following example        shows how to create and generate a dumpfile called "test.vcd" that will dump        the submodule called "foo".</p>
<p>initial<br />
begin<br />
$dumpfile( "test.vcd" );<br />
$dumpvars( 1, test.foo );<br />
end</p>
<p>foo_mod foo();</p>
<p>endmodule</p>
<p>module foo_mod;</p>
<p>...</p>
<p>endmodule</p>
<p><em><u><strong>$dumpfile : </strong></u></em></p>
<p>The $dumpfile system call takes in one parameter that is a string of the name        of the dumpfile to create, in this case the dumpfile we want to create is called        "test.foo". The purpose of this function to create the file (open it for writing)        and outputs some initialization information to the file.</p>
<p class="margin"><u><strong>$dumpvars:</strong></u></p>
<p class="pg">The $dumpvars system call takes in two parameters. The first is the number of        levels of hierarchy that you want to dump. In the example, we want to only dump        the module instance called "foo" which is why the dump level was set to 1. To        dump foo and the level of submodules just beneath it, you would set the dump        level to 2 and so on. To dump a module and all submodules beneath it, set the        dump level value to 0 (this means the level specified and all levels below it).        The second parameter is a Verilog hierarchical reference to the top-level        module instance that you want to dump.</p>
<p class="pg">The $dumpfile system call may only be called once within a Verilog design.        Typically, it is called in the top-most level of the design (or testbench as        it is commonly referred to as); however, the language allows you to call it        from anywhere in your design as long as it precedes any calls to $dumpvars.</p>
<p class="pg">The $dumpvars system call may be called as many times as necessary to dump the        Verilog that you need. For example, if you want to get coverage results for        several modules scattered around the design, you may make several $dumpvars        calls to dump exactly those modules that you want to see coverage for.</p>
<p class="margin">
<p class="pg">
]]></content:encoded>
			<wfw:commentRss>http://puneetworld.com/archives/26/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
