<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-967177542865624465</id><updated>2011-11-28T03:32:16.618-08:00</updated><category term='Assertion'/><category term='Best'/><category term='Mentor Graphics'/><category term='fine grain process control'/><category term='Shorthand Macros'/><category term='String'/><category term='callback'/><category term='Tips'/><category term='Tutorial'/><category term='Gotcha'/><category term='Interview'/><category term='SNUG'/><category term='Paper'/><category term='Pattern'/><category term='SVA'/><category term='Verilab'/><category term='Coverage'/><category term='LRM'/><category term='Questions'/><category term='System Verilog'/><category term='timing diagram'/><category term='OOP'/><category term='Macro'/><category term='Reference'/><category term='Tools'/><category term='Sutherland'/><category term='Presentation'/><category term='article'/><category term='Enum'/><category term='VMM'/><category term='Tricks'/><category term='Written by Subash'/><category term='Scheduling Semantics'/><title type='text'>The Ultimate Hitchhiker's Guide to Verification</title><subtitle type='html'>Dumping ground of useful links/articles/tips/tricks on System Verilog/VMM/OVM as and when I stumble upon them and some of my views on it :)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>48</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-9188021726244214665</id><published>2011-11-28T03:31:00.001-08:00</published><updated>2011-11-28T03:32:16.632-08:00</updated><title type='text'>Slides from DVCon UK 2011</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://www.testandverification.com/downloads/DVConference2011/"&gt;http://www.testandverification.com/downloads/DVConference2011/&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-9188021726244214665?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/9188021726244214665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/11/slides-from-dvcon-uk-2011.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/9188021726244214665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/9188021726244214665'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/11/slides-from-dvcon-uk-2011.html' title='Slides from DVCon UK 2011'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-7192375478678630953</id><published>2011-11-25T02:30:00.001-08:00</published><updated>2011-11-25T02:37:09.906-08:00</updated><title type='text'>Pointer to UPF standard online</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&amp;nbsp;UPF 1.0 standard&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;h3 class="r"&gt;&lt;a class="l" href="http://www.google.co.in/url?sa=t&amp;amp;rct=j&amp;amp;q=upf%202.0&amp;amp;source=web&amp;amp;cd=7&amp;amp;ved=0CEwQFjAG&amp;amp;url=http%3A%2F%2Fwww.accellera.org%2Fapps%2Fgroup_public%2Fdownload.php%2F887%2Fupf.v1.0.pdf&amp;amp;ei=f27PTub0OcPhiAKB4bTaCw&amp;amp;usg=AFQjCNGT4T6PulY98NNhjJsgKlPbv9LLSw&amp;amp;sig2=Vdcsz56w3FGNOsjZ7bOeAw&amp;amp;cad=rja"&gt;Unified Power Format (&lt;em&gt;UPF&lt;/em&gt;) Standard&lt;/a&gt;&lt;/h3&gt;&lt;/li&gt;&lt;/ul&gt;UPF 2.0 standard via scribd. Can be viewed online.&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://www.scribd.com/doc/59271855/1801-2009-v-2-0"&gt;http://www.scribd.com/doc/59271855/1801-2009-v-2-0&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-7192375478678630953?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/7192375478678630953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/11/pointer-to-upf-standard-online.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7192375478678630953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7192375478678630953'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/11/pointer-to-upf-standard-online.html' title='Pointer to UPF standard online'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-3032848861123344323</id><published>2011-11-17T01:44:00.001-08:00</published><updated>2011-11-17T01:46:55.595-08:00</updated><title type='text'>A nice blog on Power Aware Verification/UPF</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today I came across a nice blog on UPF/Low Power. Sharing it&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://blogs.synopsys.com/magicbluesmoke/" target="_blank"&gt;Magic Blue Scope &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-3032848861123344323?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/3032848861123344323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/11/nice-blog-on-power-aware.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/3032848861123344323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/3032848861123344323'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/11/nice-blog-on-power-aware.html' title='A nice blog on Power Aware Verification/UPF'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-5509914472677597691</id><published>2011-09-19T04:13:00.000-07:00</published><updated>2011-09-19T04:14:58.796-07:00</updated><title type='text'>Mentor Graphics NOIDA is hiring.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Please mail me your resume at subash.nayak@gmail.com if you want to apply to any of the below jobs.&lt;br /&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-W-tTaozh7PI/TncjqRSLOtI/AAAAAAAAOtk/0FC_w-GVx-8/s1600/image001.jpg" imageanchor="1"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-W-tTaozh7PI/TncjqRSLOtI/AAAAAAAAOtk/0FC_w-GVx-8/s1600/image001.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-5509914472677597691?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/5509914472677597691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/09/mentor-graphics-noida-is-hiring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5509914472677597691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5509914472677597691'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/09/mentor-graphics-noida-is-hiring.html' title='Mentor Graphics NOIDA is hiring.'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-W-tTaozh7PI/TncjqRSLOtI/AAAAAAAAOtk/0FC_w-GVx-8/s72-c/image001.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-6618559395467013870</id><published>2011-09-14T05:01:00.000-07:00</published><updated>2011-09-14T05:01:29.406-07:00</updated><title type='text'>One small update</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi all,&lt;br /&gt;&lt;br /&gt;To begin with let me thank all for visiting my blog. I have got many feedback on how people (few whom I know personally, and many I don't know) have used my blog for learning SV and preparing for job interviews. It feel good knowing that I have contributed something positively (a very little, I know :)) to the society via my blog.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;There is a small news to share with you all. Recently I have joined Mentor Graphics NOIDA as LMTS, where I am involved in tool development effort. So it is hardcore C++ coding/debug for me, and very little SystemVerilog/Verification. So from now on I am planning to blog on C/C++/SW development mostly, little less SV.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;-Subash&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-6618559395467013870?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/6618559395467013870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/09/one-small-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6618559395467013870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6618559395467013870'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/09/one-small-update.html' title='One small update'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-2603887788768270278</id><published>2011-06-22T07:19:00.001-07:00</published><updated>2011-06-22T07:19:59.860-07:00</updated><title type='text'>Wavedrom : Web based Waveform editor</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://code.google.com/p/wavedrom/"&gt;http://code.google.com/p/wavedrom/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-2603887788768270278?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/2603887788768270278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/06/wavedrom-web-based-waveform-editor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/2603887788768270278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/2603887788768270278'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/06/wavedrom-web-based-waveform-editor.html' title='Wavedrom : Web based Waveform editor'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-2147279178241896387</id><published>2011-05-17T23:01:00.000-07:00</published><updated>2011-05-17T23:01:46.726-07:00</updated><title type='text'>Few nice articles on UVM</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://www.low-powerdesign.com/article_Cadence-UVM_082310.html"&gt;A Practical Guide to Adopting the Universal Verification Methodology—Part 1&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.low-powerdesign.com/article_Cadence-UVM_083010.html"&gt;A Practical Guide to Adopting the Universal Verification Methodology—Part 2&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.low-powerdesign.com/article_Cadence-UVM_101010.html"&gt;A Practical Guide to Adopting the Universal Verification Methodology—Part 3&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.low-powerdesign.com/article_Cadence-UVM_101810.html"&gt;A Practical Guide to Adopting the Universal Verification Methodology—Part 4&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-2147279178241896387?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/2147279178241896387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/05/few-nice-articles-on-uvm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/2147279178241896387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/2147279178241896387'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/05/few-nice-articles-on-uvm.html' title='Few nice articles on UVM'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-6519332759382293071</id><published>2011-05-10T22:20:00.000-07:00</published><updated>2011-05-10T22:20:16.695-07:00</updated><title type='text'>Easier UVM for Functional Verification by Mainstream Users :: From Doulos</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://www.doulos.com/knowhow/sysverilog/uvm/easier_uvm_paper/"&gt;http://www.doulos.com/knowhow/sysverilog/uvm/easier_uvm_paper/&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-6519332759382293071?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/6519332759382293071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/05/easier-uvm-for-functional-verification.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6519332759382293071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6519332759382293071'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/05/easier-uvm-for-functional-verification.html' title='Easier UVM for Functional Verification by Mainstream Users :: From Doulos'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-1905866087795201267</id><published>2011-05-04T01:03:00.000-07:00</published><updated>2011-05-04T01:03:46.031-07:00</updated><title type='text'>How Do I Get Environment Variable into a String in SystemVerilog</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;             &lt;br /&gt;&lt;div class="articleTitle"&gt;From Synopsys Solvnet, Needs to have Solvnet id, seems to be specific to VCS&lt;/div&gt;&lt;div class="articleTitle"&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;&lt;a href="https://solvnet.synopsys.com/retrieve/032548.html?charid=techupdate&amp;amp;tuid=413"&gt;https://solvnet.synopsys.com/retrieve/032548.html?charid=techupdate&amp;amp;tuid=413 &lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="articleTitle"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="articleTitle"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="articleTitle"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-1905866087795201267?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/1905866087795201267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/05/how-do-i-get-environment-variable-into.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/1905866087795201267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/1905866087795201267'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2011/05/how-do-i-get-environment-variable-into.html' title='How Do I Get Environment Variable into a String in SystemVerilog'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-6982668756659785211</id><published>2010-12-02T21:11:00.000-08:00</published><updated>2010-12-02T21:11:46.679-08:00</updated><title type='text'>Some interesting article on Verification</title><content type='html'>These are some nice article on verification, that I stumbled upon. Hope it will be useful for the reader&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.testbench.in/SystemVerilog_2009_enhancements.html"&gt;What is new in SV 2009&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.testbench.in/colorfull_messages_from_systemverilog.html"&gt;&lt;span class="question"&gt;PASS and FAIL Messages with Colors...!&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-6982668756659785211?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/6982668756659785211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/12/some-interesting-article-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6982668756659785211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6982668756659785211'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/12/some-interesting-article-on.html' title='Some interesting article on Verification'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-6670299937567632504</id><published>2010-11-26T03:25:00.000-08:00</published><updated>2010-11-27T20:42:56.822-08:00</updated><title type='text'>Doing "cvs add" recursively</title><content type='html'>Those who are still stuck with the age-old CVS due to some unfortunate reason (in the age of Perforce ...), they must have encountered situations when they want to add multiple files/folders recursively. This is one command I found via google search which will help in such situation&lt;br /&gt;.&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;  find . -type d -print | grep -v CVS | xargs cvs add&lt;br /&gt;  find . -type f -print | grep -v CVS | xargs cvs add&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-6670299937567632504?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/6670299937567632504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/11/doing-cvs-add-recursively.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6670299937567632504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6670299937567632504'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/11/doing-cvs-add-recursively.html' title='Doing &quot;cvs add&quot; recursively'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-7519380178445333061</id><published>2010-07-19T12:05:00.000-07:00</published><updated>2010-07-19T12:05:56.765-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Assertion'/><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Writing SystemVerilog assertion for checking "setup/hold time violation" type of conditions</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;a href="http://zone.ni.com/images/reference/en-XX/help/371599D-01/setup_hold_req.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="152" src="http://zone.ni.com/images/reference/en-XX/help/371599D-01/setup_hold_req.gif" width="200" /&gt;&lt;/a&gt;Recently, I gave couple of internal lectures on basic and advanced features of SystemVerilog assertion at the organization that I am working at. After that, quite a few colleague of mine have started asking questions on SVA. Amongst all, the most interesting assertion question is how to write assertion for checking "setup/hold time violation" type of scenarion. To understand these scenario, let's start with a very common example, which can be extended for many similar case.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Problem statement:&lt;/b&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;blockquote&gt;Write assertion for checking that the signal "data" is stable for tSetup time before positive edge of clock, and should be stable for tHold time after positive edge of clock. Here tSetup/tHold will be of static delay like 1ns, 30ps or so on. There are no extra inherent assumptions added with it (like clock period, its relationship with tSetup/tHold, or how fast the signal data can toggle.&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;This is a standard problem, with not so easy solution of writing assertion for it&lt;br /&gt;&lt;br /&gt;In Verilog there is a way of checking it, which unfortunately is not an assertion, and hence can't be used with formal tools like Jasper. (via &lt;a href="http://www.edaboard.co.uk/requesting-help-on-writing-sv-assertions-t442372.html"&gt;http://www.edaboard.co.uk/requesting-help-on-writing-sv-assertions-t442372.html&lt;/a&gt;&lt;a href="http://www.edaboard.co.uk/requesting-help-on-writing-sv-assertions-t442372.html"&gt;http://www.edaboard.co.uk/requesting-help-on-writing-sv-assertions-t442372.html&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:sv"&gt;module timing_checks (input clk, en); &lt;br /&gt;  specify &lt;br /&gt;    specparam clk_high_time = 5; &lt;br /&gt;    specparam clk_low_time = 5; &lt;br /&gt;    $setup(en, negedge clk, clk_high_time * 4 / 5); &lt;br /&gt;    $hold(negedge clk, en, clk_low_time * 4 / 5); &lt;br /&gt;  endspecify &lt;br /&gt;endmodule &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now let's proceed with assumption that we want to write an assertion for checking the same, we are not very much happy with $setup/$hold of Verilog. Here is the solution&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:sv"&gt;module timing_checks_in_sv (input clk, data, ...); &lt;br /&gt;  ...&lt;br /&gt;  event ev_data_delayed_toggled;&lt;br /&gt;  &lt;br /&gt;  always @(data)&lt;br /&gt;  begin&lt;br /&gt;    fork&lt;br /&gt;    begin&lt;br /&gt;      # tSetup;&lt;br /&gt;      -&amp;gt; ev_data_delayed_toggled;&lt;br /&gt;    end&lt;br /&gt;    join_none&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  property setup_hold_time_checker;&lt;br /&gt;    time curr_time;&lt;br /&gt;    @(posedge clk) (1, curr_time = $time) |-&amp;gt;&lt;br /&gt;    @(ev_data_delayed_toggled) (($time - curr_time) &amp;gt; (tSetup + tHold));&lt;br /&gt;  endproperty : setup_hold_time_checker&lt;br /&gt;&lt;br /&gt;  ASSERT_SETUP_HOLD: assert property setup_hold_time_checker;&lt;br /&gt;endmodule &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the always block, we are triggering an event called ev_data_delayed_toggled, after tSetup time every time data toggles. Now the "setup/hold time" problem statement can be written as after posedge of clock, ev_data_delayed_toggled shouldn't get triggered within tSetup+tHold time. Now the problem statement has come to a form SVA timing check, which is specified in via the property.&lt;br /&gt;&lt;br /&gt;There are many such not so intuitive, interesting use-case scenarios for SVA. Interested readers can have a look at the below link for some more interesting scenarios.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.verilab.com/files/sva_gate_paper_dvcon2006.pdf"&gt;http://www.verilab.com/files/sva_gate_paper_dvcon2006.pdf &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-7519380178445333061?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/7519380178445333061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/07/writing-systemverilog-assertion-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7519380178445333061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7519380178445333061'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/07/writing-systemverilog-assertion-for.html' title='Writing SystemVerilog assertion for checking &quot;setup/hold time violation&quot; type of conditions'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-480961192520778030</id><published>2010-07-18T03:33:00.000-07:00</published><updated>2010-07-19T08:20:55.515-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='fine grain process control'/><title type='text'>System Verilog Fine Grain Process Control - They are actually used in standard methodologies</title><content type='html'>Thanks to 2 articles in one Japanese blog, and google translate, I got to know that fine grain process control are use sparingly (mostly for process kill) in OVM/VMM. I am just pasting the link of these article in the hope that interested reader shall go through them, do some more research and get himself enlightened with the usage of fine grain process control of systemverilog.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=auto&amp;amp;tl=en&amp;amp;u=http://blogs.yahoo.co.jp/verification_engineer/59054470.html&amp;amp;prev=_t&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhjOSZ0EoNcjjN0ZvudlDkX1QuY1Wg"&gt;http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=auto&amp;amp;tl=en&amp;amp;u=http://blogs.yahoo.co.jp/verification_engineer/59054470.html&amp;amp;prev=_t&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhjOSZ0EoNcjjN0ZvudlDkX1QuY1Wg &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=auto&amp;amp;tl=en&amp;amp;u=http://blogs.yahoo.co.jp/verification_engineer/59140597.html&amp;amp;prev=_t&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhiVWUuHJqX6cjrKz5eHYaK3f_L8pg"&gt;http://translate.googleusercontent.com/translate_c?hl=en&amp;amp;ie=UTF-8&amp;amp;sl=auto&amp;amp;tl=en&amp;amp;u=http://blogs.yahoo.co.jp/verification_engineer/59140597.html&amp;amp;prev=_t&amp;amp;rurl=translate.google.com&amp;amp;twu=1&amp;amp;usg=ALkJrhiVWUuHJqX6cjrKz5eHYaK3f_L8pg&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-480961192520778030?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/480961192520778030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/07/system-verilog-fine-grain-process.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/480961192520778030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/480961192520778030'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/07/system-verilog-fine-grain-process.html' title='System Verilog Fine Grain Process Control - They are actually used in standard methodologies'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-6167849460314381250</id><published>2010-07-09T11:09:00.000-07:00</published><updated>2010-07-19T08:21:22.435-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='fine grain process control'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Advanced SystemVerilog Process Control – Beyond fork-join_X</title><content type='html'>&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Abstract— All the Hardware Verification Languages (HVL) have an inherent requirement to have process control capabilities like creation, control and destruction of process. Although Verilog language has incorporated such capabilities like named blocks and fork-join statements, but SystemVerilog has further extended these properties of verilog with introduction of fork-join_X, disable fork and fine grain process control. ―Fine grain process control is the least understood and least used capability amongst all the SystemVerilog process control capabilities. The main reason behind the same is due to the fact that SV LRM[1] has very brief and concise description (about two pages) of fine grain process control. This paper aims in de-mystifying the above constructs and shows the use of fine grain process control for much more flexible processes creation, their control as well as destruction capabilities. It discusses how per-instance-based process control and decoupling of ―how and when can be done using SV fine grain process control&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Index Terms—Fine grain process control, Inbuilt process class of SystemVerilog, Per-instance based process control, Decoupling of how and when of processes.&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;I. INTRODUCTION&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;Process control capabilities like creation, control and destruction of processes are inherent requirements of any Hardware Verification Language. Verilog has named block, fork-join construct for controlling process creation, control and destruction. Below example will show some of the capabilities of verilog process control.&lt;b&gt; &lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;always @(posedge req) begin &lt;br /&gt;  fork &lt;br /&gt;  begin : Label1 &lt;br /&gt;    wait(a); &lt;br /&gt;    disable Label2; &lt;br /&gt;  end &lt;br /&gt;  begin : Label2 &lt;br /&gt;    wait(b); &lt;br /&gt;  end &lt;br /&gt;  join &lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_YoLjCsSgrqg/So7RmoZR-gI/AAAAAAAAKYc/VisQ8hbxlkI/s1600/moz-screenshot-2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="235" src="http://2.bp.blogspot.com/_YoLjCsSgrqg/So7RmoZR-gI/AAAAAAAAKYc/VisQ8hbxlkI/s320/moz-screenshot-2.png" width="320" /&gt;&lt;/a&gt;In the above mentioned code snippet, we are creating two threads named “Label1” and “Label2” at every posedge of req. In the thread “Label1”, as soon as signal “a” becomes HIGH, it kills the thread “Label2”.&lt;br /&gt;&lt;br /&gt;But, there are few limitations in Verilog’s process creation, control as well as destruction. The main limitation of verilog’s fork-join statement is that there is very less flexibility in terms of when it should get out of fork loop. In addition, disabling of named block is not a good way of killing a process.&lt;br /&gt;&lt;br /&gt;SystemVerilog solved the 1st limitation of verilog’s process control capabilities by adding new constructs like join_any, join_none, disable fork and wait fork. These constructs are widely used for controlling process creation/control/destruction.&lt;br /&gt;&lt;br /&gt;However these constructs have further few limitations for finer control of process. Using the above constructs, we cannot suspend/resume/kill only a specific single process. SystemVerilog has a feature called “Fine grain process control” using which we can have much finer control on creation/control/destruction of process.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;II. FINE GRAIN PROCESS CONTROL&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Fine grain process control is meant for having finer control on processes compared to the control one can get using fork/join_x constructs. This is done using SystemVerilog’s inbuilt class called ’process’. Let’s look at the various feature of the above class and how to use them for finer control of processes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A. Handle Creation and status check&lt;/b&gt;&lt;br /&gt;To control any process/thread, we need to get the handle of the above thread using calling “process::self()” method of process class. Below code snippet will show how to do the same.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;task abc(…); &lt;br /&gt;  process P; &lt;br /&gt;  process::state Pstate; &lt;br /&gt;  … &lt;br /&gt;  fork &lt;br /&gt;  begin &lt;br /&gt;    P = process::self(); &lt;br /&gt;    … &lt;br /&gt;    Pstate = P.status(); &lt;br /&gt;  end &lt;br /&gt;  join_none &lt;br /&gt;endtask : abc&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;A process can be created for each always, initial block, and begin…end statement inside fork…join_X and dynamic processes. In addition, we can check the status of any process by calling status() method. A process can be in either of these 5 states (FINISHED, RUNNING, WAITING, SUSPENDED, KIL). “process::state” is a enumerated value and its content can be displayed using .name() method.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;B. Process Suspension, Resumption, Await and Kill&lt;/b&gt;&lt;br /&gt;Any process can be suspended or resumed by calling suspend() and resume() task of process class. Similarly, the process can be terminated by calling kill() method. The await() method blocks till the process is terminated. SystemVerilog code snippet given in section “USE-CASE: FINER CONTROL OF PROCESS”.&lt;br /&gt;&lt;br /&gt;There can be few race conditions when a process is waiting for some event/variable change and we suspend the process. The question is on what condition the process shall resume its execution. These are simple rules to know when the process shall get unblocked from the waiting event[2]&lt;br /&gt;&lt;ol&gt;&lt;li&gt;If the process is waiting for a delay like (#100 or #20ns) while going to suspend state, it will not count the time spent while in suspend state as the delay.&lt;/li&gt;&lt;li&gt;If the process is waiting for an event (@(SV_event)) while going for suspend state, and the event has occurred when the process is at suspend state, then the process will be unblocked, and will start executing from the next while after resuming.&lt;/li&gt;&lt;li&gt;If the process is waiting for variable change (@(SV_variable) or wait(SV_variable)) : Check for change of the variable is not performed when the process is suspended and hence any variable change happened during the time when the process is in suspended state shall not unblock the process if it is waiting for variable change and is put to suspend state&lt;/li&gt;&lt;/ol&gt;&amp;nbsp; &lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&amp;nbsp;III. USE-CASE: PER-INSTANCE BASED FINER CONTROL OF PROCESSES.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Consider a scenario where we have created some N numbers of thread/process in one task. From another task, we want to suspend/resume/kill selected few tasks depending upon some other external conditions. Fine grain process control is extremely well suited for these kinds of tasks. Let see an example code snippet to understand how it can be done.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;class fine_grain_process_ctrl_example;&lt;br /&gt; &lt;br /&gt;  // Data members&lt;br /&gt;  process p[20];        &lt;br /&gt;  …&lt;br /&gt;&lt;br /&gt;  task spawn_thread;&lt;br /&gt;    for(int i=0; i&amp;lt;20; i++)&lt;br /&gt;    begin&lt;br /&gt;      fork&lt;br /&gt;      begin&lt;br /&gt;        p[i] = process::self();&lt;br /&gt;        run_thread();&lt;br /&gt;      end&lt;br /&gt;      join_none&lt;br /&gt;    end       &lt;br /&gt;  endtask: spawn_thread&lt;br /&gt; &lt;br /&gt;  task control_thread;&lt;br /&gt;    …&lt;br /&gt;    // condition met for suspending p[i]&lt;br /&gt;    p[i].suspend();&lt;br /&gt;    …&lt;br /&gt;    // condition met for resuming p[j]&lt;br /&gt;    p[j].resume();&lt;br /&gt;    …&lt;br /&gt;    // condition met for killing p[k]&lt;br /&gt;    p[k].kill();&lt;br /&gt;    …&lt;br /&gt;    // Wait for completion of p[l]&lt;br /&gt;    p[l].await();&lt;br /&gt;  endtask: control_thread&lt;br /&gt;endclass: fine_grain_process_ctrl_example&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the above code snippet, we have a class called fine_grain_process_ctrl, which has an array of process handles. In the task spawan_thread, where we are creating 20 parallel threads (by calling some external task run_thread()), we are also storing the handle of the process into the process array. Now in the task control_thread, we are controlling the suspension/resumption/termination of the above threads (which can be done in per-instance basis) depending upon some condition).&lt;br /&gt;&lt;br /&gt;There is another advantage of the above way of doing the process control. Here effectively, we are de-coupling what to do in the thread, and how to handle thread. This decoupling is very useful for code-reuse. The details of the above aspect are described in more detail in next section.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;IV. USE-CASE: DECOUPLING HOW AND WHEN&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_YoLjCsSgrqg/TDdkFtVOoEI/AAAAAAAAMSE/zEKzSk2CjIg/s1600/How_n_When.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://3.bp.blogspot.com/_YoLjCsSgrqg/TDdkFtVOoEI/AAAAAAAAMSE/zEKzSk2CjIg/s320/How_n_When.PNG" width="320" /&gt;&lt;/a&gt;Consider a case where you have already written a transactor which sends packets according to your requirements. Now you need to change your code to make it work in the low-power-world where you need to stop sending packets whenever the system enters low-power state and resume sending packet once you are out of it. You have coded “HOW” to send your packet, and now you need to incorporate “WHEN” to send it, which itself can be far more complex that the simple “HOW”.&lt;br /&gt;&lt;br /&gt;You can directly go and modify the transactor code to incorporate “WHEN” aspect of the packet transmission. There are quite a few reasons why you would rather not touch the code and do the same in another way.&lt;br /&gt;&lt;br /&gt;Fine grain process control can be very nicely used in such scenario. You can have a handle of the process of sending packet. Now using this handle, we can stop/resume execution of the process (thereby stopping/resuming sending of packet) by calling suspend/resume method. We can have another piece of code where we can code the logic which will have the logic that shall control “WHEN” to send the packet.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCES&lt;/b&gt;&lt;br /&gt;[1]  "IEEE Standard For SystemVerilog - Unified Hardware Design, Specification and Verification Language," IEEE Computer Society, IEEE, New York, NY, IEEE Std 1800-2009&lt;br /&gt;[2] Article on “Fine Grain Process Control” at Synopsys Solvenet&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="https://solvnet.synopsys.com/retrieve/025656.html"&gt;https://solvnet.synopsys.com/retrieve/025656.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://solvnet.synopsys.com/retrieve/025657.html"&gt;https://solvnet.synopsys.com/retrieve/025657.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://solvnet.synopsys.com/retrieve/025658.html"&gt;https://solvnet.synopsys.com/retrieve/025658.html&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-6167849460314381250?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/6167849460314381250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/07/advanced-systemverilog-process-control.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6167849460314381250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6167849460314381250'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/07/advanced-systemverilog-process-control.html' title='Advanced SystemVerilog Process Control – Beyond fork-join_X'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YoLjCsSgrqg/So7RmoZR-gI/AAAAAAAAKYc/VisQ8hbxlkI/s72-c/moz-screenshot-2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-7472232504970868962</id><published>2010-04-03T12:07:00.000-07:00</published><updated>2010-07-19T08:21:46.439-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='fine grain process control'/><title type='text'>System Verilog Fine Grain Process Control - Beyond SV LRM - Part I</title><content type='html'>There is exactly 1 and 1/2 page long section on "Fine grain process control" is SV LRM (along with not so easy to follow example). No wonder I have not seen much people using this nice feature of System Verilog. Fortunately Synopsys&amp;nbsp; SolvNet has 3 nice article on it. I am listing them for reference. Hope it shall be useful to the reader. (NOTE : accessing these articles requires solvnet login, which I was told, is not so easy to obtain unless your organization has a vcs license, the truthfulness of&amp;nbsp; which I have not yet verified)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 468px;"&gt;&lt;col style="width: 48pt;" width="64"&gt;&lt;/col&gt;  &lt;col style="width: 303pt;" width="404"&gt;&lt;/col&gt;  &lt;tbody&gt;&lt;tr height="20" style="height: 15pt;"&gt;   &lt;td class="xl66" height="20" style="height: 15pt; width: 48pt;" width="64"&gt;SN&lt;/td&gt;   &lt;td style="width: 303pt;" width="404"&gt;Article Title&lt;/td&gt;  &lt;/tr&gt;&lt;tr height="20" style="height: 15pt;"&gt;   &lt;td class="xl66" height="20" style="height: 15pt;"&gt;1&lt;/td&gt;   &lt;td class="xl65"&gt;&lt;a href="http://solvnet.synopsys.com/myretrieve.jsp?id=025656" target="_parent"&gt;Fine Grain Process Control: Handle Creation &amp;amp; Status   Check&lt;/a&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr height="20" style="height: 15pt;"&gt;   &lt;td class="xl66" height="20" style="height: 15pt;"&gt;2&lt;/td&gt;   &lt;td&gt;&lt;a href="http://solvnet.synopsys.com/myretrieve.jsp?id=025657" target="_parent"&gt;&lt;span style="color: black; text-decoration: none;"&gt;Fine Grain   Process Control: Process Await &amp;amp; Kill&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr height="20" style="height: 15pt;"&gt;   &lt;td class="xl66" height="20" style="height: 15pt;"&gt;3&lt;/td&gt;   &lt;td&gt;&lt;a href="http://solvnet.synopsys.com/myretrieve.jsp?id=025658" target="_parent"&gt;&lt;span style="color: black; text-decoration: none;"&gt;Fine Grain   Process Control: Process Suspend &amp;amp; Resume&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-7472232504970868962?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/7472232504970868962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/04/system-verilog-fine-grain-process.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7472232504970868962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7472232504970868962'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/04/system-verilog-fine-grain-process.html' title='System Verilog Fine Grain Process Control - Beyond SV LRM - Part I'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-9125790135679683680</id><published>2010-03-29T07:17:00.000-07:00</published><updated>2010-03-29T07:21:15.124-07:00</updated><title type='text'>Have you ever heard of a programming language called "Whitespace"?</title><content type='html'>The question of the day is "Have you ever heard of a programming language called &lt;b&gt;Whitespace&lt;/b&gt;?". If the answer is no then please refer to &lt;a href="http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29"&gt;wikipedia article&lt;/a&gt; on in. Quoting directly from wikipedia for the lazy ones who would rather like to stay at this page rather than visit the wikipedia site&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;Whitespace&lt;/b&gt; is an &lt;a href="http://en.wikipedia.org/wiki/Esoteric_programming_language" title="Esoteric programming language"&gt;esoteric programming language&lt;/a&gt; developed by &lt;a class="new" href="http://en.wikipedia.org/w/index.php?title=Edwin_Brady&amp;amp;action=edit&amp;amp;redlink=1" title="Edwin Brady (page does not exist)"&gt;Edwin Brady&lt;/a&gt; and &lt;a class="new" href="http://en.wikipedia.org/w/index.php?title=Chris_Morris_%28computer_scientist%29&amp;amp;action=edit&amp;amp;redlink=1" title="Chris Morris (computer scientist) (page does not exist)"&gt;Chris Morris&lt;/a&gt; at the &lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/University_of_Durham" title="University of Durham"&gt;University of Durham&lt;/a&gt; (also developers of the &lt;a href="http://en.wikipedia.org/wiki/Kaya_%28programming_language%29" title="Kaya (programming language)"&gt;Kaya&lt;/a&gt; programming language). It was released on 1 April 2003 (&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/April_Fool%27s_Day" title="April Fool's Day"&gt;April Fool's Day&lt;/a&gt;). Its name is a reference to &lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Whitespace_%28computer_science%29" title="Whitespace (computer science)"&gt;whitespace characters&lt;/a&gt;. Unlike most programming languages, which ignore or assign little meaning to most whitespace characters, the Whitespace interpreter ignores any non-whitespace characters. Only &lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Space_character" title="Space character"&gt;spaces&lt;/a&gt;, &lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Tab_character" title="Tab character"&gt;tabs&lt;/a&gt; and &lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Linefeed" title="Linefeed"&gt;linefeeds&lt;/a&gt; have meaning.&lt;sup class="reference" id="cite_ref-whitespace_0-0"&gt;&lt;a href="http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29#cite_note-whitespace-0"&gt;[1]&lt;/a&gt;&lt;/sup&gt; An interesting consequence of this property is that a Whitespace program can easily be contained within the whitespace characters of a program written in another language, making the text a &lt;a href="http://en.wikipedia.org/wiki/Polyglot_%28computing%29" title="Polyglot (computing)"&gt;polyglot&lt;/a&gt;.&lt;sup class="Template-Fact" style="white-space: nowrap;" title="This claim needs references to reliable sources from February 2010"&gt;[&lt;i&gt;&lt;a href="http://en.wikipedia.org/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"&gt;citation needed&lt;/a&gt;&lt;/i&gt;]&lt;/sup&gt;&lt;/blockquote&gt;&lt;br /&gt;Next question that shall be naturally occurring to you, why am I posting a link of some arbit/useless language in a blog which is devoted to verification. To answer this, I shall begin by asking you to find out the error in this code. Assume x, y, z to be simple logic variable.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;`define SWAP(__a, __b) \&lt;br /&gt;    __a = __a ^ __b;   \&lt;br /&gt;    __b = __a ^ __b;   \ &lt;br /&gt;    __a = __a ^ __b; &lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;`SWAP(x,y)&lt;br /&gt;`SWAP(y,z)&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Couldn't find any issue with it. Let me show the above example with white space character as [space].&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;`define SWAP(__a, __b) \&lt;br /&gt;    __a = __a ^ __b;   \&lt;br /&gt;    __b = __a ^ __b;   \&lt;span style="color: red;"&gt;[space]&lt;/span&gt;&lt;br /&gt;    __a = __a ^ __b; &lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;`SWAP(x,y)&lt;br /&gt;`SWAP(y,z)&lt;br /&gt;...&lt;/pre&gt;&lt;br /&gt;Now the issue is the extra white space character after \ of the SWAP macro definition. VCS doesn't like it and give some weird error which doesn't even tell that the error is due to the white-space after the \. I checked SV LRM and as per my understanding of reading the relevant section, it seems to be a valid system verilog code.&lt;br /&gt;&lt;br /&gt;It took me half a day of banging my head in front of my monitor to find out that the issue is this extra whitespace after \ in the macro.&lt;br /&gt;&lt;br /&gt;I feel Synopsys folks should do one of the following to make sure that no one else waste his precious time in debugging such hard-to-debug not-so-obvious issue.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Ignore whitespce after \ in multi-line macro definition OR&lt;/li&gt;&lt;li&gt; In case when a whitespace is encountered after \ in a multi-line macro, give error specifying that a whitespace character is encountered after \&lt;/li&gt;&lt;/ol&gt;Anyone from Synopsys listening ???&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-9125790135679683680?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/9125790135679683680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/03/have-you-ever-heard-of-programming.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/9125790135679683680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/9125790135679683680'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/03/have-you-ever-heard-of-programming.html' title='Have you ever heard of a programming language called &quot;Whitespace&quot;?'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-8380489874426631098</id><published>2010-03-10T09:03:00.000-08:00</published><updated>2010-07-19T08:23:18.823-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pattern'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>What is Factory Pattern - v2.0</title><content type='html'>&lt;a href="http://www.codeproject.com/KB/architecture/FactoryPattern/FactoryPattern.gif" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" src="http://www.codeproject.com/KB/architecture/FactoryPattern/FactoryPattern.gif" style="cursor: pointer; float: right; height: 428px; margin: 0pt 0pt 10px 10px; width: 383px;" /&gt;&lt;/a&gt; This post is a extended version of my original post on factory pattern which can be found at &lt;a href="http://learn-systemverilog.blogspot.com/2009/08/what-is-factory-pattern.html"&gt;http://learn-systemverilog.blogspot.com/2009/08/what-is-factory-pattern.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you are working in System Verilog/VMM environment, it is high likely that you will be bombarded with word/expression from OOP world like "Factory Pattern", "Facade Pattern", "Observer Pattern" and so on. There is a finite possibility that you will seat down and start thinking what does those word mean and why they were used too frequently. Let me try to explain the idea/concept behind such word in the simplest way possible.&lt;br /&gt;&lt;br /&gt;In SW engineering, a design pattern (or simply pattern) means a general repeatable solution to a commonly occurring problem. Most of these patterns have similarity to something or other in human society and hence they are known by that name.&lt;br /&gt;&lt;br /&gt;Factory pattern as the name suggest, is aimed at solving the issue of creation of object. (Factory pattern is not the only pattern to deal with creation of objects, there are a bunch of more patterns for handling different kind of cases, and collectively they are known a creational patterns)&lt;br /&gt;&lt;br /&gt;Let me give an example of case where we might need to use creational pattern and how to do so it in SV. Suppose you want to create a "Toy Factory" class which needs to create multiple types of toys (say toy aeroplane, toy tank, toy bus) depending upon the string input to it.&lt;br /&gt;&lt;br /&gt;To create these different types of toys we need to have class defined for them. And there will be common method and data interface for these classes, hence it make sense to put all the common data member/task/functions in a class called toy class and then extend it.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;class TOY;&lt;br /&gt;    // Common data memeber&lt;br /&gt;    string toy_name;&lt;br /&gt;&lt;br /&gt;    // Common methods&lt;br /&gt;    virtual function string get_type();&lt;br /&gt;endclass : TOY&lt;br /&gt;&lt;br /&gt;class TOY_Tank extends TOY;&lt;br /&gt;    function new();&lt;br /&gt;        this.toy_name = "Toy Tank";&lt;br /&gt;    endfunction : new&lt;br /&gt;&lt;br /&gt;    string function string get_type();&lt;br /&gt;        return this.toy_name;&lt;br /&gt;    endfunction : get_type&lt;br /&gt;endclass : TOY_Tank&lt;br /&gt;&lt;br /&gt;class TOY_Bus extends TOY;&lt;br /&gt;    function new();&lt;br /&gt;        this.toy_name = "Toy Bus";&lt;br /&gt;    endfunction : new&lt;br /&gt;&lt;br /&gt;    string function string get_type();&lt;br /&gt;        return this.toy_name;&lt;br /&gt;    endfunction : get_type&lt;br /&gt;endclass : TOY_Bus&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we are done with the bothering about the objects to be created. The next problem that we need to solve is to write the toy factory class itself. For simplicity, let's consider the case where we will want to pass 1 to get an instance of tank class and 2 for getting an instance of bus class from the factory. Now the factory class will look like this.&lt;br /&gt;&lt;pre class="brush: sv;"&gt;class TOY_factory;&lt;br /&gt;    Toy my_toy&lt;br /&gt;&lt;br /&gt;    // Common methods&lt;br /&gt;    function toy get_toy(string str);&lt;br /&gt;        if(str == "Toy Tank") this.my_toy = new TOY_Tank();&lt;br /&gt;        if(str == "Toy Bus")  this.my_toy = new TOY_Bus();&lt;br /&gt;        return this.my_toy;&lt;br /&gt;    endfunction : get_toy&lt;br /&gt;endclass : TOY_factory&lt;/pre&gt;&lt;br /&gt;Note that we are using virtual function for bringing polymorphism in action and save us from having an individual instance of the toy type in the factory class.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Reference&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sourcemaking.com/design_patterns/factory_method"&gt;Factory Method Design Pattern&lt;/a&gt; from sourcemaking.com&lt;/li&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Factory_method_pattern"&gt;Factory Method Pattern&lt;/a&gt; from wikipedia&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.allappforum.com/java_design_patterns/factory_pattern.htm"&gt;Factory Pattern&lt;/a&gt; from JAVA design pattern&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Note&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.trusster.com/"&gt;Mike Mintz&lt;/a&gt; has added the following word of caution/note for this in the thread &lt;a href="http://verificationguild.com/modules.php?name=Forums&amp;amp;file=viewtopic&amp;amp;t=3763"&gt;http://verificationguild.com/modules.php?name=Forums&amp;amp;file=viewtopic&amp;amp;t=3763&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="postbody"&gt;The above link is very good. I would just like to add a word of caution. The factory pattern should be rather rare in your architecture. While the choice of where to put the "new" for a class is very important, most of the time (for big components) the answer is in the testbench. That's where all the drivers,generators,monitors, etc should be built. &lt;br /&gt;&lt;br /&gt;Also the factory pattern is usually implemented as a function, not a class. When it's a class, you can get sloppy with the necessary parameters and you code is harder to follow. &lt;br /&gt;&lt;br /&gt;I understand pretty well the warping of these cautions caused by the three letter methodologies and their misguided quest for generic components, so your usage may have to follow their guidelines. Just remember that (1) in the real world factory patterns are rare, and (2) you do not always have to do it the way the methodology says. &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-8380489874426631098?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/8380489874426631098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/03/what-is-factory-pattern-v20.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/8380489874426631098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/8380489874426631098'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/03/what-is-factory-pattern-v20.html' title='What is Factory Pattern - v2.0'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-5323732209440296701</id><published>2010-03-07T10:07:00.000-08:00</published><updated>2010-03-08T05:27:04.633-08:00</updated><title type='text'>SystemVerilog-201x listening campaign - Brad are you still listening !!!</title><content type='html'>It seems recently the big guys in System Verilog (like &lt;a href="http://bradpierce.wordpress.com/"&gt;Brad Pierce&lt;/a&gt;, just to give an idea of how big these guyz are) have decided to listen to people for possible improvement in System Verilog. The interested guy can check this page [&lt;a href="http://bradpierce.wordpress.com/2009/12/14/systemverilog-201x-listening-campaign/"&gt;http://bradpierce.wordpress.com/2009/12/14/systemverilog-201x-listening-campaign/&lt;/a&gt;] and give his/her "most likely" valuable comment and feel good about being a part of improving System Verilog to next level !!! (These kind of feel good are the only kind of feel good one can feel in these era of sub-prime induced recession, and similar economic artifacts) I have few idea/suggestion on improvement in SV to make it much more powerful/user friendly. I am listing them in the hope that someone might listen them and add them.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The keyword “singleton” for defining a class as singleton object. It shall get rid of the need of some weird way of getting singleton class in SV&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;singleton class  ABC;&lt;br /&gt;…&lt;br /&gt;endclass&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt; Unified verification methodology should be defined as a part of SV. There are way too many methodology now a days (like OVM, AVM, VMM and so on …). There should be one such standard methodology. It shall make life far easier for so many engineer.&lt;/li&gt;&lt;li&gt;&amp;nbsp;SV macros are a very powerful tool for reducing the amount of coding effort. SV improved quite a bit on verilog macro, but still there is a quite a bit scope for improvement. `` is a very rudimentary operator. It can’t be used for adding prefix to the input of the macro. See the hack that we need to do for adding prefix at &lt;a href="http://learn-systemverilog.blogspot.com/2009/09/system-verilog-define-macros-why-and.html" rel="nofollow"&gt;http://learn-systemverilog.blogspot.com/2009/09/system-verilog-define-macros-why-and.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;`define PREFIX(__prefix, __name) __prefix“__name&lt;br /&gt;`define COV2(__name) `PREFIX(cp_,__name) : coverpoint __name {bins b = {1}; }&lt;br /&gt;// should be something like&lt;br /&gt;`define COV2(__name) cp_[[__name]] : coverpoint __name {bins b = {1}; }&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt; There is scope for adding macro programming ability to SV. It should have the ability of generating code during macro processing phase.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;`for(int i=0; i&amp;lt;12; i++) begin \&lt;br /&gt;bind module_1 module_2 bind_mod_[[i]] (.*); \&lt;br /&gt;end&amp;nbsp;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt; Ability to get signal by passing the hierarchical reference to the signal like wire a = get_signal(top.dut.abc.xyz);&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Option of crossing two cross coverage.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;A : coverpoint ...&lt;br /&gt;B : coverpoint ...&lt;br /&gt;C : coverpoint ...&lt;br /&gt;D : coverpoint ...&lt;br /&gt;&lt;br /&gt;X : cross A, B;&lt;br /&gt;Y : cross C, D;&lt;br /&gt;&lt;br /&gt;// Z : cross X, Y; &amp;lt;----- SV doesn't allows it. It should&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-5323732209440296701?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/5323732209440296701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/03/systemverilog-201x-listening-campaign.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5323732209440296701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5323732209440296701'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/03/systemverilog-201x-listening-campaign.html' title='SystemVerilog-201x listening campaign - Brad are you still listening !!!'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-64417893946666933</id><published>2010-03-06T22:32:00.000-08:00</published><updated>2010-03-06T23:41:05.210-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='timing diagram'/><title type='text'>Free Timing Diagram Drawing tools</title><content type='html'>Many a times we need to generate/draw timing diagrams for multitude purposes. While browsing web for the same I came across these free/easy-to-use timing diagram drawing utilities.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.pcserviceselectronics.co.uk/fonts/index.php"&gt;Timing Diagram Font&lt;/a&gt;&amp;nbsp; -- Timing diagram can be generated in MS Word using this&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.timing-diagrams.com/dokuwiki/doku.php"&gt;Timing Analyzer&lt;/a&gt; -- A tool for doing the same &lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.timing-diagrams.com/dokuwiki/doku.php?id=app_notes:verilog"&gt;Timing Diagram from verilog&lt;/a&gt; - using the above tool and small snippet of verilog code, one can generate timing waveform from the design itself. One problem I see with it is that the code snippet doesn't use verilog macro for achieving the same.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;a href="http://www.edaboard.com/ftopic48568.html"&gt;Handy Timer&lt;/a&gt; - A simple and handy timing diagram editor &lt;/li&gt;&lt;li&gt;&lt;a href="http://sourceforge.net/projects/timingeditor/files/"&gt;Timing Editor&lt;/a&gt; - Another free waveform editor&lt;/li&gt;&lt;li&gt;&lt;a href="http://drawtiming.sourceforge.net/index.html"&gt;Draw Timing&lt;/a&gt; - Command line based waveform drawing SW which take a script as its input&lt;/li&gt;&lt;ol&gt;&lt;/ol&gt;&lt;/ol&gt;Please let me know if you know some better/free timing diagram drawing tools that doesn't cost $$$.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-64417893946666933?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/64417893946666933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/03/free-timing-diagram-drawing-tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/64417893946666933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/64417893946666933'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2010/03/free-timing-diagram-drawing-tools.html' title='Free Timing Diagram Drawing tools'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-6637106209539284334</id><published>2009-11-28T04:54:00.000-08:00</published><updated>2009-11-28T04:54:42.938-08:00</updated><title type='text'>Deep vs Shallow Copy in SystemVerilog</title><content type='html'>This is another interesting aspect of SV, which beginners usually get confused. This is an excellent blog post @ trusser on the same.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.trusster.com/verification/deep-versus-shallow-copy/"&gt;Deep versus Shallow Copy&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-6637106209539284334?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/6637106209539284334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/11/deep-vs-shallow-copy-in-systemverilog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6637106209539284334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6637106209539284334'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/11/deep-vs-shallow-copy-in-systemverilog.html' title='Deep vs Shallow Copy in SystemVerilog'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-385567557940302868</id><published>2009-11-22T10:24:00.000-08:00</published><updated>2009-11-28T04:49:48.920-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Some interesting ways to get a delayed version of signal in SV</title><content type='html'>In TB world, sometime you will need a signal which is N clock delayed version of another signal. You can do it by using 9 intermediate variables, or use these.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;// I want 10 clock delayed version of signal abc&lt;br /&gt;always @(posedge clk) begin&lt;br /&gt;    abc_10_clk_delayed_1 &lt;= $past(abc, 10); // This works in vcs&lt;br /&gt;    abc_10_clk_delayed_2 &lt;= repeat(10) @(posedge clk) abc;&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-385567557940302868?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/385567557940302868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/11/some-interesting-way-to-get-delayed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/385567557940302868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/385567557940302868'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/11/some-interesting-way-to-get-delayed.html' title='Some interesting ways to get a delayed version of signal in SV'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-4825495474328761928</id><published>2009-09-19T11:04:00.000-07:00</published><updated>2009-09-19T11:12:09.225-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Macro'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>System Verilog `define macros : Why and how to use them (and where not to use!!!)</title><content type='html'>I most confess, I have become a very big fan of SystemVerilog `define macro for the amount of effort I save because of using it. The big advantage of using this is that you can concisely describe your intention in a more readable (and less SystemVerilog syntax) using macro. Another advantage is you need to change only at one place if you find out that you need to change the expression you have used in 100 of places. The 3rd reason is that it is widely used in industry. Some example worth quoting are&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.verilab.com/files/dac2005_mal_sva_cov_paper_a4.pdf"&gt;Using SystemVerilog Assertions for Functional Coverage&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.eda.org/ovl/pages/pdfs/dvcon07_cerny.pdf"&gt;Using SystemVerilog Assertions for Creating Property-Based Checkers&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.sunburst-design.com/papers/CummingsSNUG2009SJ_SVA_Bind.pdf"&gt;SystemVerilog Assertions Design Tricks and SVA Bind Files&lt;/a&gt; &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.intelligentdv.com/documents/doxygen/vmm-1.0.0/vmm__data__macros_8sv.html"&gt;VMM and especially VMM data macro &lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;Next question : Where shall I get the required info on how to use SystemVerilog `define macro&lt;br /&gt;Ans : Web (thanks to the all powerful demi-god of internet ... Google)&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.google.co.in/#hl=en&amp;amp;safe=off&amp;amp;q=Systemverilog+Macro"&gt;http://www.google.co.in/#hl=en&amp;amp;safe=off&amp;amp;q=Systemverilog+Macro&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;System Verilog LRM 3.1a : Section : 25.2&lt;/li&gt;&lt;li&gt;Sandeep Vaniya's &lt;a href="http://sandeep-vaniya.blogspot.com/2008/04/advanced-use-of-define-macro-in.html"&gt;Advanced Use of define macro in SystemVerilog&lt;/a&gt; (not so advanced actually !!!)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;From reading these it might be apparent that define macro can be used for adding a postfix to the variable, but not prefix. I was thinking the same after reading the description (they don't have a single example of adding prefix to the variable via `define. Confused ?? Let me explain by giving a concrete example&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;// Example macro for a coverage class&lt;br /&gt;// Aim : want to get ABC_cp : coverpoint ABC {bins b = {1}; }&lt;br /&gt;// by calling `COV(ABC)&lt;br /&gt;`define COV(__name) __name``_cp : coverpoint __name {bins b = {1}; }&lt;br /&gt;&lt;br /&gt;// Next&lt;br /&gt;//     What to do if I want cp_ABC in place of ABC_cp as for the above example&lt;br /&gt;//     NOTE : I can't use cp_``__name as cp_ is not an input to the macro&lt;br /&gt;&lt;br /&gt;// Solution&lt;br /&gt;//     Use nested macros&lt;br /&gt;`define PREFIX(__prefix, __name) __prefix``__name&lt;br /&gt;`define COV2(__name) `PREFIX(cp_,__name) : coverpoint __name {bins b = {1}; }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;Nested macro is not a new thing in SV. They are being extensively used in VMM data macro class. But no example of nested macro and achieving of addition pre_fix to variable name in `define macro is bit puzzling to me. I tried the above in vcs and seems to work perfectly fine.&lt;br /&gt;&lt;br /&gt;Next, where not to use `define (SV other better alternatives to `define these cases)&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://csg.csail.mit.edu/6.375/papers/cummings-paramdesign-hdlcon02.pdf"&gt;New Verilog-2001 Techniques for Creating Parameterized Models (or Down With `define and Death of a defparam!)&lt;/a&gt;: Bit old but still usefull&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-4825495474328761928?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/4825495474328761928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/09/system-verilog-define-macros-why-and.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/4825495474328761928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/4825495474328761928'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/09/system-verilog-define-macros-why-and.html' title='System Verilog `define macros : Why and how to use them (and where not to use!!!)'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-5958577985081829651</id><published>2009-09-14T09:53:00.000-07:00</published><updated>2009-09-14T09:54:55.404-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Answers to SystemVerilog Interview Questions - 8</title><content type='html'>&lt;b&gt;13. What is the difference between mailbox and queue?&lt;/b&gt;&lt;br /&gt;Ans:- &lt;br /&gt;Mailbox are FIFO queue, which allows only atomic operations. They can be bounded/unbounded. A bounded mailbox can suspend the thread (while writing if full, while reading if empty) via get/put task. Thats why mailbox is well suited for communication between threads.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;24. What is the use of $cast?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;Typecasting in SV can be done either via static casting (&lt;size&gt;', &lt;type&gt;', &lt;signed unsigned=""&gt;') or dynamic casting via $cast task/function. $cast is very similar to dynamic_cast of C++. It checks whether the casting is possible or not in run-time and errors-out if casting is not possible.&lt;/signed&gt;&lt;/type&gt;&lt;/size&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;27. What is $unit?&lt;/b&gt;&lt;br /&gt;Ans:- &lt;br /&gt;Refer these 2 doc form more details&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.systemverilog.org/pdf/SystemVerilog_Overall_31A.pdf"&gt;http://www.systemverilog.org/pdf/SystemVerilog_Overall_31A.pdf&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;SV LRM 3.1a :: Section 18.3&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;b&gt;28 .What are bi-directional constraints?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;Constraints by-default in SystemVerilog are bi-directional. That implies that the constraint solver doesn't follow the sequence in which the constraints are specified. All the variables are looked simultaneously. Even the procedural looking constrains like if ... else ... and -&amp;gt; constrains, both if and else part are tried to solve concurrently. For example (a==0) -&amp;gt; (b==1) shall be solved as all the possible solution of (!(a==0) || (b==1)).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;29. What is solve...before constraint ?&lt;/b&gt;&lt;br /&gt;Ans:- &lt;br /&gt;In the case where the user want to specify the order in which the constraints solver shall solve the constraints, the user can specify the order via solve before construct. i.e.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;...&lt;br /&gt;constraint XYZ  {&lt;br /&gt;    a inside {[0:100]|;&lt;br /&gt;    b &amp;lt; 20;&lt;br /&gt;    a + b &amp;gt; 30;&lt;br /&gt;    solve a before b;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The solution of the constraint doesn't change with solve before construct. But the probability of choosing a particular solution change by it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;40. What is circular dependency and how to avoid this problem ?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;Over specifying the solving order might result in circular dependency, for which there is no solution, and the constraint solver might give error/warning or no constraining. Example&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;...&lt;br /&gt;int x, y, z;&lt;br /&gt;constraint XYZ  {&lt;br /&gt;    solve x before y;&lt;br /&gt;    solve y before z;&lt;br /&gt;    solve z before x;&lt;br /&gt;    ....&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-5958577985081829651?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/5958577985081829651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_14.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5958577985081829651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5958577985081829651'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_14.html' title='Answers to SystemVerilog Interview Questions - 8'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-4382228785909725701</id><published>2009-09-09T11:22:00.000-07:00</published><updated>2009-09-14T09:54:35.582-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Answers to SystemVerilog Interview Questions - 7</title><content type='html'>&lt;b&gt;4. What is the need of clocking blocks ?&lt;/b&gt;&lt;br /&gt;Ans:- &lt;br /&gt;Clocking block in SystemVerilog are used for specifying the clock signal, timing, and synchronization requirements of various blocks. It separates the timing related information from structural, functional and procedural element of the TB. There are quite a few links on clocking block in the internet. These are links to learn about SV clocking blocks.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.asicguru.com/system-verilog/tutorial/clocking-block/11/"&gt;AsicGuru :: To the point answer on the need of clocking block &lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://draft.blogger.com/goog_1252512183317"&gt;Testbench.in :: &lt;span id="goog_1252512183305"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://draft.blogger.com/goog_1252512183317"&gt;Clocking &lt;span id="goog_1252512183306"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://draft.blogger.com/goog_1252512183317"&gt;block &lt;/a&gt;&lt;a href="http://www.testbench.in/IF_04_CLOCKING_BLOCK.html"&gt;&amp;nbsp;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.project-veripage.com/clocking_block_1.php"&gt;ProjectVeripage :: Clocking block&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.doulos.com/knowhow/sysverilog/tutorial/clocking/"&gt;Doulos :: Clocking block&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.asic-world.com/systemverilog/clocking1.html"&gt;Asicworld :: Clocking block&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.sunburst-design.com/papers/CummingsSNUG2006Boston_SystemVerilog_Events.pdf"&gt;SystemVerilog Event Regions, Race Avoidance &amp;amp; Guidelines&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;5. What are the ways to avoid race condition between testbench and RTL using SystemVerilog?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;Short answer : -&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Program&amp;nbsp; block&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Clocking block &lt;/li&gt;&lt;li&gt;Enforcement of design signals being driven in non-blocking fashion from program block&lt;/li&gt;&lt;/ol&gt;Long answer :- &lt;br /&gt;Too long to describe here :). Please refer these doc/sections for more idea/info&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Section 16.4 of SV LRM&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.testbench.in/SV_24_PROGRAM_BLOCK.html"&gt;http://www.testbench.in/SV_24_PROGRAM_BLOCK.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.sunburst-design.com/papers/CummingsSNUG2006Boston_SystemVerilog_Events.pdf"&gt;http://www.sunburst-design.com/papers/CummingsSNUG2006Boston_SystemVerilog_Events.pdf&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.verificationguild.com/modules.php?name=Forums&amp;amp;file=viewtopic&amp;amp;t=1347&amp;amp;start=0"&gt;VG discussion of the necessity of program block.&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;b&gt;7. What are the types of coverages available in SV ? &lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;Using covergroup : variables, expression, and their cross&lt;br /&gt;Using cover keyword : properties&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. What is the use of the abstract class?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.testbench.in/CL_08_ABSTRACT_CLASSES.html"&gt;http://www.testbench.in/CL_08_ABSTRACT_CLASSES.html&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-4382228785909725701?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/4382228785909725701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_09.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/4382228785909725701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/4382228785909725701'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_09.html' title='Answers to SystemVerilog Interview Questions - 7'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-2616153199733249864</id><published>2009-09-05T00:02:00.000-07:00</published><updated>2009-09-05T11:34:08.016-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Answers to SystemVerilog Interview Questions - 6</title><content type='html'>&lt;b&gt;(30)Without using randomize method or rand,generate an array of unique values?&lt;/b&gt;&lt;br /&gt;Ans:- &lt;br /&gt;&lt;pre class="brush: sv;"&gt;...&lt;br /&gt;int UniqVal[10];&lt;br /&gt;foreach(UniqVal[i]) UniqVal[i] = i;&lt;br /&gt;UniqVal.shuffle();&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;(32)What is the difference between byte and bit [7:0]?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;byte is signed whereas bit [7:0] is unsigned.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;(33)What is the difference between program block and module?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;Program block is newly added in SystemVerilog. It serves these purposes&lt;br /&gt;&lt;ol&gt;&lt;li&gt;It separates testbench from DUT&lt;/li&gt;&lt;li&gt;It helps in ensuring that testbench doesn't have any race condition with DUT&lt;/li&gt;&lt;li&gt;It provides an entry point for execution of testbench&lt;/li&gt;&lt;li&gt;It provides syntactic context (via program ... endprogram) that specifies scheduling in the Reactive Region.&lt;/li&gt;&lt;/ol&gt;Having said this the major difference between module and program blocks are&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Program blocks can't have always block inside them, modules can have.&lt;/li&gt;&lt;li&gt;Program blocks can't contain UDP, modules, or other instance of program block inside them. Modules don't have any such restrictions.&lt;/li&gt;&lt;li&gt;Inside a program block, program variable can only be assigned using blocking assignment and non-program variables can only be assigned using non-blocking assignments. No such restrictions on module &lt;br /&gt;&lt;/li&gt;&lt;li&gt;Program blocks get executed in the re-active region of scheduling queue, module blocks get executed in the active region&lt;/li&gt;&lt;li&gt;A program can call a task or function in modules or other programs.     But a module can not call a task or function in a program.&lt;/li&gt;&lt;/ol&gt;More details:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.testbench.in/SV_24_PROGRAM_BLOCK.html"&gt;http://www.testbench.in/SV_24_PROGRAM_BLOCK.html&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.project-veripage.com/program_blocks_1.php"&gt;http://www.project-veripage.com/program_blocks_1.php&lt;/a&gt; and few more next/next !!!&lt;/li&gt;&lt;li&gt;Section 16, &lt;a href="http://www.eda.org/sv/SystemVerilog_3.1a.pdf"&gt;SystemVerilog LRM 3.1a&lt;/a&gt; ... It's worth the effort reading line-by-line (and between the lines if you can :) ).&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;b&gt; (37)What is the use of modports?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;Modports are part of Interface. Modports are used for specifing the direction of the signals with respect to various modules the interface connects to.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;...&lt;br /&gt;interface my_intf;&lt;br /&gt;    wire x, y, z;&lt;br /&gt;    modport master (input x, y, output z);&lt;br /&gt;    modport slave  (output x, y, input z);&lt;br /&gt;endinterface&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Please refer section 19.4 of SV LRM for more details&lt;br /&gt;&lt;br /&gt;&lt;b&gt;11. Explain about the virtual task and methods .&lt;/b&gt;&lt;br /&gt;Ans:- &lt;b&gt;&lt;/b&gt;&lt;br /&gt;See &lt;a href="http://www.testbench.in/CL_07_POLYMORPHISM.html"&gt;http://www.testbench.in/CL_07_POLYMORPHISM.html&lt;/a&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-2616153199733249864?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/2616153199733249864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_05.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/2616153199733249864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/2616153199733249864'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_05.html' title='Answers to SystemVerilog Interview Questions - 6'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-6139694806858098055</id><published>2009-09-02T09:44:00.000-07:00</published><updated>2009-09-02T11:25:00.398-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Answers to SystemVerilog Interview Questions - 5</title><content type='html'>&lt;b&gt; (9)What is inheritance and polymorphism?&lt;/b&gt;&lt;br /&gt;&amp;nbsp;Please refer these links for more details on inheritance/polymorphism.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.testbench.in/CL_00_INDEX.html"&gt;http://www.testbench.in/CL_00_INDEX.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/systemverilog-oop-links.html"&gt;SV OOP Links&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;(14)What data structure you used to build scoreboard?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;Queue&lt;br /&gt;&lt;br /&gt;&lt;b&gt; (16)How parallel case and full cases problems are avoided in SV ?&lt;/b&gt;&lt;br /&gt;&amp;nbsp;Ans:-&lt;br /&gt;See Page 34/35 of &lt;a href="http://www.systemverilog.org/pdf/SV_Symposium_2003.pdf"&gt;http://www.systemverilog.org/pdf/SV_Symposium_2003.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt; (22)What is the use of package?&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;Ans:-&lt;br /&gt;In Verilog declaration of data/task/function within modules are specific to the module only. They can't be shared between two modules. Agreed, we can achieve the same via cross module referencing or by including the files, both of which are known to be not a great solution.&lt;br /&gt;&lt;br /&gt;The package construct of SystemVerilog aims in solving the above issue. It allows having global data/task/function declaration which can be used across modules. It can contain module/class/function/task/constraints/covergroup and many more declarations (for complete list please refer section 18.2 of &lt;a href="http://www.eda.org/sv/SystemVerilog_3.1a.pdf"&gt;SV LRM 3.1a&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;The content inside the package can be accessed using either scope resolution operator (&lt;b&gt;::&lt;/b&gt;), or using import (with option of referencing particular or all content of the package). &lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;package ABC;&lt;br /&gt;    // Some typedef&lt;br /&gt;    typedef enum {RED, GREEN, YELLOW} Color;&lt;br /&gt;&lt;br /&gt;    // Some function&lt;br /&gt;    void function do_nothing()&lt;br /&gt;        ...&lt;br /&gt;    endfunction : do_nothing&lt;br /&gt;&lt;br /&gt;    // You can have many different declarations here&lt;br /&gt;endpackage : ABC&lt;br /&gt;&lt;br /&gt;// How to use them&lt;br /&gt;import ABC::Color;     // Just import Color&lt;br /&gt;import ABC::*;         // Import everything inside the package&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;(26)What is $root?&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;Ans:-&lt;br /&gt;$root refers to the top level instance in SystemVerilog&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;package ABC;&lt;br /&gt;$root.A;       // top level instance A&lt;br /&gt;$root.A.B.C;   // item C within instance B within top level instance A&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-6139694806858098055?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/6139694806858098055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6139694806858098055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6139694806858098055'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview.html' title='Answers to SystemVerilog Interview Questions - 5'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-8306531042794538944</id><published>2009-08-28T12:12:00.000-07:00</published><updated>2009-08-28T12:15:44.487-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Answers to SystemVerilog Interview Questions - 4</title><content type='html'>&lt;b&gt; (25)What is the difference between rand and randc?&lt;/b&gt;&lt;b&gt; &lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;Ans:-&lt;br /&gt;&lt;b&gt;rand&lt;/b&gt; - Random Variable, same value might come before all the the possible value have been returned. Analogous to throwing a dice.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;randc&lt;/b&gt; - Random Cyclic Variable, same value doesn't get returned until all possible value have been returned. Analogous to picking of card from a deck of card without replacing. Resource intensive, use sparingly/judiciously&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;b&gt;(24)How to call the task which is defined in parent object into derived class ?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;&lt;b&gt;super&lt;/b&gt;.task_name(); &lt;br /&gt;&lt;br /&gt;&lt;b&gt;(21)What is the difference between always_combo and always@(*)?&lt;/b&gt;&lt;br /&gt;&amp;nbsp;Ans:-&lt;br /&gt;&amp;nbsp;From SystemVerilog LRM 3.1a:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;always_comb get executed once at time 0, always @* waits till a change occurs on a signal in the inferred sensitivity list&lt;/li&gt;&lt;li&gt;Statement within always_comb can't have blocking timing, event control, or fork-join statement. No such restriction of always @*&lt;/li&gt;&lt;li&gt;Optionally EDA tool might perform additional checks to warn if the behavior within always_comb procedure doesn't represent combinatorial logic&lt;/li&gt;&lt;li&gt;Variables on the left-hand side of assignments within an always_comb procedure, including variables&lt;br /&gt;from the contents of a called function, shall not be written to by any other processes, whereas always @* permits multiple processes to write to the same variable. &lt;/li&gt;&lt;li&gt;always_comb is sensitive to changes within content of a function, whereas always @* is only sensitive to changes to the arguments to the function.&lt;/li&gt;&lt;/ol&gt;A small SystemVerilog code snippet to illustrate #5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;module dummy;&lt;br /&gt;    logic a, b, c, x, y;&lt;br /&gt;&lt;br /&gt;    // Example void function&lt;br /&gt;    function void my_xor;&lt;br /&gt;        input a;           // b and c are hidden input here&lt;br /&gt;        x = a ^ b ^ c;&lt;br /&gt;    endfunction : my_xor&lt;br /&gt;&lt;br /&gt;    function void my_or;&lt;br /&gt;        input a;           // b and c are hidden input here&lt;br /&gt;        y = a | b | c;&lt;br /&gt;    endfunction : my_xor&lt;br /&gt;    &lt;br /&gt;    always_comb            // equivalent to always(a,b,c)&lt;br /&gt;        my_xor(a);         // Hidden inputs are also added to sensitivity list&lt;br /&gt;&lt;br /&gt;    always @*              // equivalent to always(a)&lt;br /&gt;        my_or(a);          // b and c are not added to sensitivity list&lt;br /&gt;endmodule&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;(20)List the predefined randomization methods.&lt;/b&gt;&lt;br /&gt;&amp;nbsp; Ans:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;randomize&lt;/li&gt;&lt;li&gt;pre_randomize&lt;/li&gt;&lt;li&gt;post_randomize&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;(19)What is scope randomization ?&lt;/b&gt;&lt;br /&gt;&amp;nbsp; Ans:-&lt;br /&gt;&amp;nbsp; Scope randomization ins SystemVerilog allows assignment of unconstrained or constrained random value to the variable within current scope&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;module MyModule;      &lt;br /&gt;integer var, MIN;      &lt;br /&gt;&lt;br /&gt;initial begin          &lt;br /&gt;    MIN = 50;          &lt;br /&gt;    for ( int i = 0;i&amp;lt;10 ;i++) begin              &lt;br /&gt;        if( randomize(var) with { var &amp;lt; 100 ; var &amp;gt; MIN ;})  &lt;br /&gt;            $display(" Randomization sucsessfull : var = %0d Min = %0d",var,MIN);   &lt;br /&gt;        else                  &lt;br /&gt;            $display("Randomization failed");&lt;br /&gt;    end&lt;br /&gt;          &lt;br /&gt;    $finish;     &lt;br /&gt;end&lt;br /&gt;endmodule&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-8306531042794538944?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/8306531042794538944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_28.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/8306531042794538944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/8306531042794538944'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_28.html' title='Answers to SystemVerilog Interview Questions - 4'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-438536380209546219</id><published>2009-08-25T10:19:00.000-07:00</published><updated>2009-08-25T11:12:45.614-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Answers to SystemVerilog Interview Questions - 3</title><content type='html'>&lt;b&gt;(88)How to check weather a handles is holding object or not ?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;It is basically checking if the object is initialized or not. In SystemVerilog all uninitialized object handles have a special value of null, and therefore whether it is holding an object or not can be found out by comparing the object handle to null. So the code will look like:-&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;usb_packet My_usb_packet; &lt;br /&gt;...&lt;br /&gt;if(My_usb_packet == null) begin&lt;br /&gt;    // This loop will get exited if the handle is not holding any object&lt;br /&gt;    ....&lt;br /&gt;end else begin&lt;br /&gt;    // Hurray ... the handle is holding an object&lt;br /&gt;    ...&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;(87)What is the difference between initial block and final block?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;There are many difference between initial and final block. I am listing the few differences that is coming to mind now.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The most obvious one : Initial blocks get executed at the beginning of the simulation, final block at the end of simulation&lt;/li&gt;&lt;li&gt;Final block has to be executed in zero time, which implies it can't have any delay, wait, or non-blocking assignments. Initial block doesn't have any such restrictions of execution in zero time (and can have delay, wait and non-blocking statements)&lt;/li&gt;&lt;/ol&gt;Final block can be used to display statistical/genaral information regarding the status of the execution like this:-&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;final begin&lt;br /&gt;    $display("Simulation Passed");&lt;br /&gt;    $display("Final value of xyz = %h",xyz);&lt;br /&gt;    $display("Bye :: So long, and Thanks for all the fishes");&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;(69)What is the difference between bits and logic?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;bits is 2-valued (1/0) and logic is 4-valued (0/1/x/z)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;(65)What is tagged union ?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;An union is used to stored multiple different kind/size of data in the same storage location.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;typedef union{&lt;br /&gt;    bit [31:0]  a;&lt;br /&gt;    int         b;&lt;br /&gt;} data_u;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now here XYZ union can contain either bit [31:0] data or an int data. It can be written with a bit [31:0] data and read-back with a int data. There is no type-checking done.&lt;br /&gt;&lt;br /&gt;In the case where we want to enforce that the read-back data-type is same as the written data-type we can use tagged union which is declared using the qualifier &lt;b&gt;tagged&lt;/b&gt;. Whenever an union is defined as tagged, it stores the tag information along with the value (in expense of few extra bits). The tag and values can only be updated together using a statically type-checked tagged union expression. The data member value can be read with a type that is consistent with current tag value, making it impossible to write one type and read another type of value in tagged union. (the details of which can be found in section 3.10 and 7.15 of SV LRM 3.1a).&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;typedef union tagged{&lt;br /&gt;    bit [31:0]  a;&lt;br /&gt;    int         b;&lt;br /&gt;} data_tagged_u;&lt;br /&gt;&lt;br /&gt;// Tagged union expression&lt;br /&gt;data_tagged_u data1 = tagged a 32'h0;&lt;br /&gt;data_tagged_u data2 = tagged b 5;&lt;br /&gt;&lt;br /&gt;// Reading back the value&lt;br /&gt;int xyz = data2.b;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;(56)What is the need of alias in SV?&lt;/b&gt;&lt;br /&gt;Ans:-&lt;br /&gt;The Verilog has one-way assign statement is a unidirectional assignment and can contain delay and strength change. To have bidirectional short-circuit connection SystemVerilog has added &lt;b&gt;alias&lt;/b&gt; statement. An excellent usage example of alias can be found out at &lt;a href="http://www.systemverilog.org/pdf/SV_Symposium_2003.pdf"&gt;http://www.systemverilog.org/pdf/SV_Symposium_2003.pdf&lt;/a&gt;(Slide # 59)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-438536380209546219?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/438536380209546219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_25.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/438536380209546219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/438536380209546219'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_25.html' title='Answers to SystemVerilog Interview Questions - 3'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total><georss:featurename>Bengaluru, Karnataka, India</georss:featurename><georss:point>12.971606 77.594376</georss:point><georss:box>12.6370475 77.12745699999999 13.3061645 78.061295</georss:box></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-5852544522962815994</id><published>2009-08-24T04:16:00.001-07:00</published><updated>2009-08-24T11:16:49.888-07:00</updated><title type='text'>Few minor updates</title><content type='html'>Two small updates from my blog.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;My blog has started getting attentions from Verification community. Recently my blog got added to blogroll of VMM martial art blog (&lt;a href="http://www.vmmcentral.org/vmartialarts/"&gt;http://www.vmmcentral.org/vmartialarts/&lt;/a&gt;). Seems people are finding my blog worth reading/visiting. My blog is feeling blessed :)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;With almost 4-5 hrs of effort I could make &lt;a href="http://code.google.com/p/syntaxhighlighter/"&gt;syntaxhighlighter&lt;/a&gt; work (with small minor hiccups). It took way too much time as compared to what I hoped for, but the end result of it is worth it. A sample o/p from syntax highlighter.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;// Byte Pack&lt;br /&gt;function int unsigned atm_cell::byte_pack(ref logic [7:0] bytes[],&lt;br /&gt;                                          input int unsigned offset,&lt;br /&gt;                                          input int kind);&lt;br /&gt;   // Make sure there is enough room in the array&lt;br /&gt;   if(bytes.size() &amp;lt; this.byte_size())&lt;br /&gt;        bytes = new [this.byte_size()] (bytes);&lt;br /&gt;   // Pack the bytes&lt;br /&gt;   bytes[0] = {gfc, vpi[7:4]};&lt;br /&gt;   bytes[1] = {vpi[3:0], vci[15:12]};&lt;br /&gt;   bytes[2] = {vci[11:4]};&lt;br /&gt;   bytes[3] = {vci[3:0], pt, clp};&lt;br /&gt;   bytes[4] = {hec};&lt;br /&gt;   for (int i=0; i &amp;lt; 48; i++)&lt;br /&gt;     bytes[i+5]=payload[i];&lt;br /&gt;   byte_pack = 53;&lt;br /&gt;endfunction&lt;br /&gt;&lt;br /&gt;// Byte Unpack&lt;br /&gt;function int unsigned atm_cell::byte_unpack(const ref logic[7:0] bytes[],&lt;br /&gt;                                            input int unsigned offset,&lt;br /&gt;                                            input int len,&lt;br /&gt;                                            input int kind);&lt;br /&gt;   {gfc, vpi, vci, pt, clp, hec} = {bytes[0], bytes[1], bytes[2],&lt;br /&gt;                                     bytes[3], bytes[4]};&lt;br /&gt;   for (int i = 0; i != 48; ++i)&lt;br /&gt;     payload[i] = bytes[i+5];&lt;br /&gt;&lt;br /&gt;   return 53;&lt;br /&gt;endfunction&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-5852544522962815994?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/5852544522962815994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/test.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5852544522962815994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5852544522962815994'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/test.html' title='Few minor updates'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-6347097218819324790</id><published>2009-08-21T10:24:00.000-07:00</published><updated>2009-08-26T08:17:46.840-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>All about fork-join of System Verilog</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_YoLjCsSgrqg/So7R_bLoZeI/AAAAAAAAKYk/3Nlv1XN5rrI/s1600-h/moz-screenshot-2.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 235px;" src="http://2.bp.blogspot.com/_YoLjCsSgrqg/So7R_bLoZeI/AAAAAAAAKYk/3Nlv1XN5rrI/s320/moz-screenshot-2.png" alt="" id="BLOGGER_PHOTO_ID_5372462293058086370" border="0" /&gt;&lt;/a&gt;I have added histstat hit counter for my blog to have an idea about traffic/visitor/search engine trends. One interesting I am observing is that quite a few hit to my site is coming for fork/join interview questions in Google. Hence I thought, why not have a real useful post on fork/join{x} of SystemVerilog and its associated disable/wait command.&lt;br /&gt;&lt;br /&gt;Fork-join statement has come from Verilog. It is used for forking out parallel processes in test bench. SV substantially improved fork/join construct to have much more controllability in process creation, destruction, and waiting for end of the process.&lt;br /&gt;&lt;br /&gt;The basic syntax of fork join block looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sv;"&gt;fork&lt;br /&gt;   begin : First_thread&lt;br /&gt;       // Code for 1st thread&lt;br /&gt;   end&lt;br /&gt;   begin : Second_thread&lt;br /&gt;       // Code for 2nd thread&lt;br /&gt;   end&lt;br /&gt;   begin : Third thread&lt;br /&gt;       // Code for 3rd branch&lt;br /&gt;   end&lt;br /&gt;   ...&lt;br /&gt;join    // Can be join_any, join_none in SV&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There are 3 different kind of join keyword in SV, each specifying a different way of waiting for completion of the threads/process created by the fork.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(204, 102, 0);"&gt;join&lt;/span&gt; : waits for completion of all of the threads&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(204, 102, 0);"&gt;join_any&lt;/span&gt; : waits for the completion of the 1st thread, then comes out of fork loop, but lets the other process/thread execute as usual&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(204, 102, 0);"&gt;join_none&lt;/span&gt; : doesn't wait for completion of any thread, just starts then and immediately exits fork loop.  &lt;/li&gt;&lt;/ul&gt;Now, suppose you have exited the fork loop by &lt;span style="font-weight: bold;"&gt;join_none &lt;/span&gt;or &lt;span style="font-weight: bold;"&gt;join_any&lt;/span&gt; and after some steps, you want to wait till completion of all the threads spanned by the previous fork loop. SV has "&lt;span style="font-weight: bold;"&gt;wait fork&lt;/span&gt;" for the same.&lt;br /&gt;&lt;br /&gt;Now, suppose you have exited the fork loop by &lt;span style="font-weight: bold;"&gt;join_none &lt;/span&gt;or &lt;span style="font-weight: bold;"&gt;join_any&lt;/span&gt; and after some steps, you want to kill &lt;span style="font-weight: bold;"&gt;all&lt;/span&gt; the threads spanned by the previous fork loop. SV has "&lt;span style="font-weight: bold;"&gt;disable fork&lt;/span&gt;" for the same.&lt;br /&gt;&lt;br /&gt;Next interesting scenario: you have exited fork loop by &lt;span style="font-weight: bold;"&gt;join_none &lt;/span&gt;or &lt;span style="font-weight: bold;"&gt;join_any &lt;/span&gt;and after some steps, you want to kill just &lt;span style="font-weight: bold;"&gt;one&lt;/span&gt; thread (out of many). The solution, have named begin end block and call "&lt;span style="font-weight: bold;"&gt;disable &lt;block_name&gt;&lt;/block_name&gt;&lt;/span&gt;". (For example, in the last example if you want to kill only the 2nd thread after exiting the loop via join_any/join_none, then add "&lt;span style="font-weight: bold;"&gt;disable Second_thread&lt;/span&gt;;" at the point where you want to disable the second thread.&lt;br /&gt;&lt;br /&gt;I have created a image to pictorially depict fork/join in SV. Hope that will help understand this in a much better way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-6347097218819324790?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/6347097218819324790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/all-about-fork-join-of-system-verilog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6347097218819324790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6347097218819324790'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/all-about-fork-join-of-system-verilog.html' title='All about fork-join of System Verilog'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YoLjCsSgrqg/So7R_bLoZeI/AAAAAAAAKYk/3Nlv1XN5rrI/s72-c/moz-screenshot-2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-5907168681847741713</id><published>2009-08-20T09:48:00.001-07:00</published><updated>2009-08-20T10:44:04.881-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='VMM'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='Shorthand Macros'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>VMM shorthand macros</title><content type='html'>Those who have worked with VMM based verification environment must have encountered situation where you need to code the different essential functions of vmm_data class like copy, psdisplay, compare and so on. This task become very tedious/boring when the number of classes you need to code is substantial, each having lengthy list of data member. Not long back, to get rid of the monotonicity of the above task, I sat for a day and wrote a perl script to generate the complete vmm_data class with essential functions from a class template.&lt;br /&gt;&lt;br /&gt;Well, my one day effort is fixing the same is not worth the effort, as VMM has in-built short-hand-macros to solve it. It's especially useful when you don't have much non-standard data type (which are not supported by VMM shorthand macro)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="verilog"   style="font-weight: normal;font-family:monospace;font-size:12pt;"&gt;class sample_class extends vmm_data&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: normal; color: rgb(0, 0, 139); font-style: italic;font-family:Courier New;font-size:12pt;"  &gt;// Simple scalar types&lt;/span&gt;&lt;br /&gt;rand bit &lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;[&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;7&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;:&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;0&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;]&lt;/span&gt; da&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;rand bit &lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;[&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;8&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;:&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;0&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;]&lt;/span&gt; db &lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;[&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;10&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;]&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;rand bit       dc &lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;[&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;]&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;rand bit       dd &lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;[&lt;/span&gt;int&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;]&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;rand bit       de &lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;[&lt;/span&gt;string&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;]&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;‘vmm_data_member_begin&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;sample_class&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;br /&gt;‘vmm_data_member_scalar&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;da&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;,&lt;/span&gt; DO_ALL&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;         &lt;br /&gt;‘vmm_data_member_scalar_array&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;db&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;,&lt;/span&gt; DO_ALL&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;   &lt;br /&gt;‘vmm_data_member_scalar_da&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;dc&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;,&lt;/span&gt; DO_ALL&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;      &lt;br /&gt;‘vmm_data_member_scalar_aa_scalar&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;dd&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;,&lt;/span&gt; DO_ALL&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;br /&gt;‘vmm_data_member_scalar_aa_string&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;de&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;,&lt;/span&gt; DO_ALL&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;br /&gt;‘vmm_data_member_end&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;sample_class&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;endclass &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;:&lt;/span&gt; sample_class&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Some salient features of VMM shorthand macros are :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;They can be used for {scalar, string, enums, vmm_data, handles} x {normal, array, dynamic array, associative array (scalar, and string type)} combination (Total  25 types)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;These shorthands are valid for classes derived from vmm_data, vmm_env, vmm_subenv, vmm_xactor, and vmm_scenario&lt;/li&gt;&lt;li&gt;The function which will get implemented depends upon what class your class is being instantiated from.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;For unlucky data member which doesn't fall into these 25 category, you can specify the same using `vmm_data_member_user_defined macro&lt;/li&gt;&lt;/ol&gt;What I have presented here is a very high level overview of the feature and in no way complete. For interested user please refer these links for complete details:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.vmmcentral.org/onlinedoc/wwhelp/wwhimpl/js/html/wwhelp.htm#href=02_shorthands.3.1.html"&gt;http://www.vmmcentral.org/onlinedoc/wwhelp/wwhimpl/js/html/wwhelp.htm#href=02_shorthands.3.1.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.vmmcentral.org/onlinedoc/wwhelp/wwhimpl/js/html/wwhelp.htm#href=UG_AppendixA.7.97.html"&gt;http://www.vmmcentral.org/onlinedoc/wwhelp/wwhimpl/js/html/wwhelp.htm#href=UG_AppendixA.7.97.html&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-5907168681847741713?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/5907168681847741713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/vmm-shorthand-macros.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5907168681847741713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5907168681847741713'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/vmm-shorthand-macros.html' title='VMM shorthand macros'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-6388536003636071842</id><published>2009-08-18T08:50:00.000-07:00</published><updated>2009-08-18T09:24:25.540-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Explain the difference between data types logic and reg and wire</title><content type='html'>Ans:-&lt;br /&gt;To answer this I am not assuming the reader knows the answer for the difference between wire and reg.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;u&gt;Wire:-&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Wires are used for connecting different elements&lt;/li&gt;&lt;li&gt;They can be treated as a physical wire&lt;/li&gt;&lt;li&gt;They can be read or assigned&lt;/li&gt;&lt;li&gt;No values get stored in them&lt;/li&gt;&lt;li&gt;They need to be driven by either continuous assign statement or from a port of a module&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;&lt;u&gt;Reg:-&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Contrary to their name, regs doesn't necessarily corresponds to physical registers&lt;/li&gt;&lt;li&gt;They represents data storage elements in Verilog/SystemVerilog&lt;/li&gt;&lt;li&gt;They retain their value till next value is assigned to them (not through assign statement)&lt;/li&gt;&lt;li&gt;They can be synthesized to FF, latch or combinational circuit (They might not be synthesizable !!!)&lt;/li&gt;&lt;/ol&gt;Wires and Regs are present from Verilog timeframe. SystemVerilog added a new data type called logic to them. So the next question is what is this logic data type and how it is different from our good old wire/reg.&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-weight: bold;"&gt;Logic:-&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;As we have seen, reg data type is bit mis-leading in Verilog. SystemVerilog's logic data type addition is to remove the above confusion. The idea behind having a new data type called logic which at least doesn't give an impression that it is hardware synthesizable&lt;/li&gt;&lt;li&gt;Logic data type doesn't permit multiple driver. It has a last assignment wins behavior in case of multiple assignment (which implies it has no hardware equivalence). Reg/Wire data type give X if multiple driver try to drive them with different value. Logic data type simply assign the last assignment value.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The next difference between reg/wire and logic is that logic can be both driven by assign block, output of a port and inside a procedural block like this&lt;pre class="verilog"   style="font-weight: normal;font-family:monospace;font-size:12pt;"&gt;logic a&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;assign&lt;/span&gt; a &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;=&lt;/span&gt; b &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;^&lt;/span&gt; c&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;                   &lt;span style="font-weight: normal; color: rgb(0, 0, 139); font-style: italic;font-family:Courier New;font-size:12pt;"  &gt;// wire style &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;always&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;c &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;or&lt;/span&gt; d&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt; a &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;=&lt;/span&gt; c &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;+&lt;/span&gt; d&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;          &lt;span style="font-weight: normal; color: rgb(0, 0, 139); font-style: italic;font-family:Courier New;font-size:12pt;"  &gt;// reg style&lt;/span&gt;&lt;br /&gt;MyModule &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;module&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;.out&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;a&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;,&lt;/span&gt; .in&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;xyz&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(0, 0, 139); font-style: italic;font-family:Courier New;font-size:12pt;"  &gt;// wire style&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Reference:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.eda.org/sv-ec/hm/att-0319/01-Logic_20021209.PDF"&gt;Cliff's article on the same&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://verificationguild.com/modules.php?name=Forums&amp;amp;file=viewtopic&amp;amp;p=5764"&gt;Discussion on the same at Verification Guild&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-6388536003636071842?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/6388536003636071842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/explain-difference-between-data-types.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6388536003636071842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/6388536003636071842'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/explain-difference-between-data-types.html' title='Explain the difference between data types logic and reg and wire'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-5093939637847821623</id><published>2009-08-15T11:51:00.001-07:00</published><updated>2009-08-15T12:03:08.512-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><title type='text'>SystemVerilog OOP links</title><content type='html'>Here are some nice OOP links on SystemVerilog OOP which can be used as a good starting point/reference.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Object Oriented Programming for Hardware Verification&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;br /&gt;&lt;param name="movie" value="http://www.youtube.com/v/GwQMnpUsj8I&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;br /&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;br /&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;br /&gt;&lt;embed src="http://www.youtube.com/v/qvYS4cfth1c&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.verilab.com/files/SVUG2008_fall_principles_and_patterns.pdf"&gt; Improve Your SystemVerilog OOP Skills by Learning Principles and Patterns&lt;/a&gt;&lt;/li&gt;&lt;li&gt;SystemVerilog OOP OVM Feature Summary&lt;br /&gt;&lt;br /&gt;&lt;div style="width: 425px; text-align: left;" id="__ss_822949"&gt;&lt;a style="margin: 12px 0pt 3px; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; display: block; text-decoration: underline;" href="http://www.slideshare.net/akhailtash/ovm-features-summary-presentation" title="SystemVerilog OOP Ovm Features Summary"&gt;SystemVerilog OOP Ovm Features Summary&lt;/a&gt;&lt;object style="margin: 0px;" height="355" width="425"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=ovm-features-summary-external-1228514223150940-8&amp;amp;rel=0&amp;amp;stripped_title=ovm-features-summary-presentation"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=ovm-features-summary-external-1228514223150940-8&amp;amp;rel=0&amp;amp;stripped_title=ovm-features-summary-presentation" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="355" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;"&gt;View more &lt;a style="text-decoration: underline;" href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a style="text-decoration: underline;" href="http://www.slideshare.net/akhailtash"&gt;Amal Khailtash&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.einfochips.com/download/Enhancing%20System%20Verilog.pdf"&gt;Enhancing SystemVerilog with AOP Concepts&lt;/a&gt; (On how to mimic AOP features in OOP, good for guyz coming from e background)&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.testbench.in/CL_01_INTRODUCTION.html"&gt;Testbench.in OOP Tutorial&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-5093939637847821623?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/5093939637847821623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/systemverilog-oop-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5093939637847821623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5093939637847821623'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/systemverilog-oop-links.html' title='SystemVerilog OOP links'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-7237005850964745711</id><published>2009-08-13T10:40:00.000-07:00</published><updated>2009-08-14T08:47:44.006-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Answers to SystemVerilog Interview Questions - 2</title><content type='html'>&lt;span style="font-weight: bold;"&gt;(86) What is the use of "extern"?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;(66)What is "scope resolution operator"?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ans:-&lt;br /&gt;extern keyword allows out-of-body method declaration in classes. Scope resolution operator ( :: ) links method declaration to class declaration.&lt;br /&gt;&lt;pre class="verilog"   style="font-weight: normal;font-family:monospace;font-size:12pt;"&gt;class XYZ&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal; color: rgb(0, 0, 139); font-style: italic;font-family:Courier New;font-size:12pt;"  &gt;// SayHello() will be declared outside the body &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal; color: rgb(0, 0, 139); font-style: italic;font-family:Courier New;font-size:12pt;"  &gt;// of the class&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 102, 0);"&gt;extern&lt;/span&gt; void &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;task&lt;/span&gt; SayHello&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;endclass &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;:&lt;/span&gt; XYZ&lt;br /&gt;&lt;br /&gt;void &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;task&lt;/span&gt; XYZ &lt;span style="font-weight: bold; color: rgb(255, 102, 102);font-family:Courier New;font-size:12pt;"  &gt;::&lt;/span&gt; SayHello&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;$Message&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(255, 0, 255);font-family:Courier New;font-size:12pt;"  &gt;"Hello !!!&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;\n&lt;/span&gt;"&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;endtask&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;:&lt;/span&gt; SayHello&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.synopsys.com/news/pubs/compiler/images/artlead_socveri-fig2.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 450px; height: 308px;" src="http://www.synopsys.com/news/pubs/compiler/images/artlead_socveri-fig2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(76) What is layered architecture ?&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;Ans:-&lt;br /&gt;In SystemVerilog based constrained random verification environment, the test environment is divided into multiple layered as shown in the figure. It allows verification component re-use across verification projects.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;(71)What is the difference between $rose and posedge?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ans:-&lt;br /&gt;posedge return an event, whereas $rose returns a Boolean value. Therefore they are not interchangeable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;(64)What is "this"?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ans:-&lt;br /&gt;"this" pointer refers to current instance.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;(38)Write a clock generator without using always block.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ans:-&lt;br /&gt;&lt;div style="display: block;" id="results" contenteditable="true"&gt;&lt;pre class="verilog"   style="font-weight: normal;font-family:monospace;font-size:12pt;"&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;initial&lt;/span&gt; &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;begin&lt;/span&gt;&lt;br /&gt;   clk &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;&lt;=&lt;/span&gt; '&lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;0&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;forever&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;#&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;CYCLE&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;/&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;2&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt; clk &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;=&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;~&lt;/span&gt;clk&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;end&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-family:Georgia,serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;(35)How to implement always block logic in program block ?&lt;/span&gt;&lt;br /&gt;Ans:-&lt;br /&gt;&lt;br /&gt;Use of forever begin end. If it is a complex always block statement like always (@ posedge clk or negedge reset_)&lt;br /&gt;&lt;br /&gt;&lt;div style="display: block;" id="results" contenteditable="true"&gt;&lt;pre class="verilog"   style="font-weight: normal;font-family:monospace;font-size:12pt;"&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;always&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;@&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;posedge&lt;/span&gt; clk &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;or&lt;/span&gt; &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;negedge&lt;/span&gt; reset_&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt; &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;begin&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;if&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;!&lt;/span&gt;reset_&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt; &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;begin&lt;/span&gt;&lt;br /&gt;       data &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;&lt;=&lt;/span&gt; '&lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;0&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;end&lt;/span&gt; &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;else&lt;/span&gt; &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;begin&lt;/span&gt;&lt;br /&gt;       data &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;&lt;=&lt;/span&gt; data_next&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;end&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: normal; color: rgb(0, 0, 139); font-style: italic;font-family:Courier New;font-size:12pt;"  &gt;// Using forever : slightly complex but doable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;forever&lt;/span&gt; &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;begin&lt;/span&gt;&lt;br /&gt;   fork&lt;br /&gt;   &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;begin&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;:&lt;/span&gt; reset_logic&lt;br /&gt;       &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;@&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;negedge&lt;/span&gt; reset_&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;       data &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;&lt;=&lt;/span&gt; '&lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;0&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;end&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;:&lt;/span&gt; reset_logic&lt;br /&gt;   &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;begin&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;:&lt;/span&gt; clk_logic&lt;br /&gt;       &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;@&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;posedge&lt;/span&gt; clk&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;if&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;!&lt;/span&gt;reset_&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;    data &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;&lt;=&lt;/span&gt; '&lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;0&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;else&lt;/span&gt;           data &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;&lt;=&lt;/span&gt; data_next&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;end&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;:&lt;/span&gt; clk_logic&lt;br /&gt;   join_any&lt;br /&gt;   &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;disable&lt;/span&gt; fork&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-7237005850964745711?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/7237005850964745711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7237005850964745711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7237005850964745711'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_13.html' title='Answers to SystemVerilog Interview Questions - 2'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-8834332698255965128</id><published>2009-08-12T10:37:00.000-07:00</published><updated>2010-07-09T11:17:07.690-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Answers to SystemVerilog Interview Questions - I</title><content type='html'>Posting answers to few System Verilog Questions (Please refer &lt;a href="http://learn-systemverilog.blogspot.com/2009/08/system-verilog-interview-questions.html"&gt;System Verilog Interview Questions&lt;/a&gt; for questions)&lt;br /&gt;&lt;br /&gt;10&amp;gt; &lt;span style="font-weight: bold;"&gt;What is the need of virtual interface ?&lt;/span&gt;&lt;br /&gt;Ans:-&lt;br /&gt;An interface encapsulate a group of inter-related wires, along with their directions (via modports) and synchronization details (via clocking block). The major usage of interface is to simplify the connection between modules.&lt;br /&gt;&lt;br /&gt;But Interface can't be instantiated inside program block, class (or similar non-module entity in SystemVerilog). But they needed to be driven from verification environment like class. To solve this issue virtual interface concept was introduced in SV.&lt;br /&gt;&lt;br /&gt;Virtual interface is a data type (that implies it can be instantiated in a class) which hold reference to an interface (that implies the class can drive the interface using the virtual interface). It provides a mechanism for separating abstract models and test programs from the actual signals that make up the design. Another big advantage of virtual interface is that class can dynamically connect to different physical interfaces in run time.&lt;br /&gt;&lt;br /&gt;For more details please refer the following links&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.testbench.in/IF_00_INDEX.html"&gt;Testbench.in Interface tutorial&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.asic-world.com/systemverilog/interface.html"&gt;Asicworld.com Interface tutorial&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;18&amp;gt; &lt;span style="font-weight: bold;"&gt;What is difference between $random() and $urandom()&lt;br /&gt;&lt;/span&gt;Ans:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;$random system function returns a 32-bit signed random number each time it is called&lt;/li&gt;&lt;li&gt;$urandom system function returns a 32-bit unsigned random number each time it is called. (newly added in SV, not present in verilog)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;47&amp;gt; &lt;span style="font-weight: bold;"&gt;How to randomize dynamic arrays of an object&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;Ans:-&lt;br /&gt;&lt;br /&gt;&lt;pre class="verilog" style="font-family: monospace; font-size: 12pt; font-weight: normal;"&gt;class ABC&lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: darkblue; font-family: Courier New; font-size: 12pt; font-style: italic; font-weight: normal;"&gt;// Dynamic array&lt;/span&gt;&lt;br /&gt;rand bit &lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0055; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;7&lt;/span&gt;&lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;:&lt;/span&gt;&lt;span style="color: #ff0055; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;0&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;]&lt;/span&gt; data &lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;[&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;]&lt;/span&gt;&lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: darkblue; font-family: Courier New; font-size: 12pt; font-style: italic; font-weight: normal;"&gt;// Constraints&lt;/span&gt;&lt;br /&gt;constraint cc &lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: darkblue; font-family: Courier New; font-size: 12pt; font-style: italic; font-weight: normal;"&gt;// Constraining size&lt;/span&gt;&lt;br /&gt;data.&lt;span style="color: #000099; font-weight: bold;"&gt;size&lt;/span&gt; inside &lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;{&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0055; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;1&lt;/span&gt;&lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;:&lt;/span&gt;&lt;span style="color: #ff0055; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;10&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;]&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;}&lt;/span&gt;&lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: darkblue; font-family: Courier New; font-size: 12pt; font-style: italic; font-weight: normal;"&gt;// Constraining individual entry&lt;/span&gt;&lt;br /&gt;data&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0055; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;0&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;]&lt;/span&gt; &lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #ff0055; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;5&lt;/span&gt;&lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: darkblue; font-family: Courier New; font-size: 12pt; font-style: italic; font-weight: normal;"&gt;// All elements&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #000099; font-weight: bold;"&gt;foreach&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;(&lt;/span&gt;data&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;[&lt;/span&gt;i&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;]&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: brown; font-family: Courier New; font-size: 12pt; font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;(&lt;/span&gt;i &lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #ff0055; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;0&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;)&lt;/span&gt;&lt;br /&gt;data&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;[&lt;/span&gt;i&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;]&lt;/span&gt; &lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;&amp;gt;&lt;/span&gt; data&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;[&lt;/span&gt;i&lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;-&lt;/span&gt;&lt;span style="color: #ff0055; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;1&lt;/span&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;]&lt;/span&gt;&lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #9f79ee; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;}&lt;/span&gt;&lt;br /&gt;endclass &lt;span style="color: #5d478b; font-family: Courier New; font-size: 12pt; font-weight: normal;"&gt;:&lt;/span&gt; ABC&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-8834332698255965128?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/8834332698255965128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/8834332698255965128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/8834332698255965128'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview.html' title='Answers to SystemVerilog Interview Questions - I'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-3008530758536856464</id><published>2009-08-11T07:56:00.000-07:00</published><updated>2009-08-11T08:25:20.138-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Scheduling Semantics'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>Event Region, Scheduling Semantics in System Verilog</title><content type='html'>Let me start the post by asking one commonly asked interview question in verilog/system-verilog, that is what is the output of the following block&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="display: block;" id="results" contenteditable="true"&gt;&lt;pre class="verilog"   style="font-weight: normal;font-family:monospace;font-size:12pt;"&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;always&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;@&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;posedge&lt;/span&gt; clk&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt; &lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;begin&lt;/span&gt;&lt;br /&gt;   a &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;=&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;0&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;   a &lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;&lt;=&lt;/span&gt; &lt;span style="font-weight: normal; color: rgb(255, 0, 85);font-family:Courier New;font-size:12pt;"  &gt;1&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="font-weight: normal; color: rgb(153, 50, 204);font-family:Courier New;font-size:12pt;"  &gt;$display&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;(&lt;/span&gt;s&lt;span style="font-weight: normal; color: rgb(159, 121, 238);font-family:Courier New;font-size:12pt;"  &gt;)&lt;/span&gt;&lt;span style="font-weight: normal; color: rgb(93, 71, 139);font-family:Courier New;font-size:12pt;"  &gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42); font-weight: bold;font-family:Courier New;font-size:12pt;"  &gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;To begin with let me be clear that this is not the correct way to code in verilog/SV. One shouldn't mix blocking and non-blocking assignment in the same begin-end block. But this question is asked to check the knowledge of scheduling semantics of verilog/SV.&lt;br /&gt;&lt;br /&gt;&lt;span class="postbody"&gt; Verilog scheduling semantics basically imply a four-level deep queue for the current simulation time:-&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="postbody"&gt;Active Events (blocking assignment, RHS of NBA, continuous assignment, $display, ...)&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="postbody"&gt;Inactive Events (#0 blocking assignment)&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="postbody"&gt;Non-Blocking Assign Updates (LHS of NBA)&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="postbody"&gt;Monitor Events ($monitor, $strobe).&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;Which implies, a=0 will be get printed in this example.&lt;br /&gt;&lt;br /&gt;System Verilog has added few more level queue for simulation, the details of which can be found in these 2 excellent link on scheduling semantics of SV.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.eda.org/sv-ec/SV_3.1_Web/SV31-Scheduling-presentation-dvcon03.pdf"&gt;SystemVerilog 3.1 scheduling semantics&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.sunburst-design.com/papers/CummingsSNUG2006Boston_SystemVerilog_Events.pdf"&gt;SystemVerilog Event Regions, Race Avoidance &amp;amp; Guidelines&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-3008530758536856464?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/3008530758536856464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/event-region-scheduling-semantics-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/3008530758536856464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/3008530758536856464'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/event-region-scheduling-semantics-in.html' title='Event Region, Scheduling Semantics in System Verilog'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-8078656807593657449</id><published>2009-08-10T09:33:00.000-07:00</published><updated>2009-08-10T09:47:26.371-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Assertion'/><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Coverage'/><category scheme='http://www.blogger.com/atom/ns#' term='Mentor Graphics'/><title type='text'>The Hitchhiker series on Verification - From Mentor Graphics</title><content type='html'>It seems I am not the 1st one to have the Hichhiker series on SV-VMM. Back from 2007 time frame Mentor has a series of talk on System Verilog/AVM which is named as "The Hitchhiker Guide to XYZ". The good thing about these talks is that you don't need to register for watching these videos (almost all of the rest multimedia needs a registration for watching them). These are the links for your viewing and Learning:-&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.mentor.com/player/2007/hitchhikers/"&gt;The Hitchhiker's Guide to Verification&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.mentor.com/player/2007/tba_and_coverage/"&gt;The Hitchhiker's Guide to Testbench Automation and Coverage&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.mentor.com/player/2007/stimulus_generation/"&gt;The Hitchhiker's Guide to Stimulus Generation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.mentor.com/player/2007/systemverilog_assertions/"&gt;The Hitchhiker's Guide to SystemVerilog Assertions&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-8078656807593657449?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/8078656807593657449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/hitchhiker-series-on-verification-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/8078656807593657449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/8078656807593657449'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/hitchhiker-series-on-verification-from.html' title='The Hitchhiker series on Verification - From Mentor Graphics'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-9171376783410314883</id><published>2009-08-08T07:28:00.000-07:00</published><updated>2009-08-08T08:19:17.069-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Pattern'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>What is Factory Pattern</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.codeproject.com/KB/architecture/FactoryPattern/FactoryPattern.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 383px; height: 428px;" src="http://www.codeproject.com/KB/architecture/FactoryPattern/FactoryPattern.gif" alt="" border="0" /&gt;&lt;/a&gt;If you are working in System Verilog/VMM environment, it is high likely that you will be bombarded with word/expression from OOP world like "Factory Pattern", "Facade Pattern", "Observer Pattern" and so on. There is a finite possibility that you will seat down and start thinking what does those word mean and why they were used too frequently. Let me try to explain the idea/concept behind such word in the simplest way possible.&lt;br /&gt;&lt;br /&gt;In SW engineering, a design pattern (or simply pattern) means a general repeatable solution to a commonly occurring problem. Most of these patterns have similarity to something or other in human society and hence they are known by that name.&lt;br /&gt;&lt;br /&gt;Factory pattern as the name suggest, is aimed at solving the issue of creation of object. (Factory pattern is not the only pattern to deal with creation of objects, there are a bunch of more patterns for handling different kind of cases, and collectively they are known a creational patterns)&lt;br /&gt;&lt;br /&gt;Let me give an example of case where we might need to use creational pattern and how to do so it in SV. Suppose you want to create a "Toy Factory" class which needs to create multiple types of toys (say toy aeroplane, toy tank, toy bus) depending upon the string input to it.&lt;br /&gt;&lt;br /&gt;To create these different types of toys we need to have class defined for them. And there will be common method and data interface for these classes, hence it make sense to put all the common data member/task/functions in a class called toy class and then extend it.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;class TOY;&lt;br /&gt;// Common data memeber&lt;br /&gt;string type;&lt;br /&gt;&lt;br /&gt;// Common methods&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; virtual&lt;/span&gt; function string get_type();&lt;br /&gt;endclass : TOY&lt;br /&gt;&lt;br /&gt;class TOY_Tank extends TOY;&lt;br /&gt;function new();&lt;br /&gt;   this.string = "Toy Tank";&lt;br /&gt;endfunction : new&lt;br /&gt;&lt;br /&gt;string function string get_type();&lt;br /&gt;   return this.string;&lt;br /&gt;endfunction : get_type&lt;br /&gt;endclass : TOY_Tank&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;class TOY_Bus extends TOY;&lt;br /&gt;function new();&lt;br /&gt;   this.string = "Toy Bus";&lt;br /&gt;endfunction : new&lt;br /&gt;&lt;br /&gt;string function string get_type();&lt;br /&gt;   return this.string;&lt;br /&gt;endfunction : get_type&lt;br /&gt;endclass : TOY_Bus&lt;/pre&gt;&lt;br /&gt;Now we are done with the bothering about the objects to be created. The next problem that we need to solve is to write the toy factory class itself. For simplicity, let's consider the case where we will want to pass 1 to get an instance of tank class and 2 for getting an instance of bus class from the factory. Now the factory class will look like this.&lt;br /&gt;&lt;pre&gt;class TOY_factory;&lt;br /&gt;Toy my_toy&lt;br /&gt;&lt;br /&gt;// Common methods&lt;br /&gt;function toy get_toy(int type);&lt;br /&gt;  if(type == 1) this.my_toy = new TOY_Tank();&lt;br /&gt;  if(type == 2) this.my_toy = new TOY_Bus();&lt;br /&gt;  return this.my_toy;&lt;br /&gt;endfunction : get_toy&lt;br /&gt;endclass : TOY_factory&lt;/pre&gt;&lt;br /&gt;Note that we are using virtual function for bringing polymorphism in action and save us from having an individual instance of the toy type in the factory class.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Reference&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sourcemaking.com/design_patterns/factory_method"&gt;Factory Method Design Pattern&lt;/a&gt; from sourcemaking.com&lt;/li&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Factory_method_pattern"&gt;Factory Method Pattern&lt;/a&gt; from wikipedia&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.allappforum.com/java_design_patterns/factory_pattern.htm"&gt;Factory Pattern&lt;/a&gt; from JAVA design pattern&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-9171376783410314883?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/9171376783410314883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/what-is-factory-pattern.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/9171376783410314883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/9171376783410314883'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/what-is-factory-pattern.html' title='What is Factory Pattern'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-7376598323981365975</id><published>2009-08-07T09:57:00.000-07:00</published><updated>2010-07-09T11:34:35.041-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview'/><category scheme='http://www.blogger.com/atom/ns#' term='Questions'/><title type='text'>System Verilog Interview Questions</title><content type='html'>System Verilog Interview questions from &lt;a href="http://www.edaboard.com/ftopic315416.html"&gt;http://www.edaboard.com/ftopic315416.html&lt;/a&gt;. I don't know answers to all of the questions, but will try to find out their answer from internet (thanks to the all powerful Google) and post the answers in this blog (one by one most likely). If you know answers to any of these then you are well come to share the same by commenting to this post.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/what-is-this-system-verilog-callback.html"&gt;What is callback ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/what-is-factory-pattern.html"&gt;What is factory pattern ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/explain-difference-between-data-types.html"&gt;Explain the difference between data types logic and reg and wire&amp;nbsp;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_09.html"&gt;What is the need of clocking blocks ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_09.html"&gt;What are the ways to avoid race condition between testbench and RTL using SystemVerilog?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/event-region-scheduling-semantics-in.html"&gt;Explain Event regions in SV&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_09.html"&gt;What are the types of coverages available in SV ?&amp;nbsp;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/systemverilog-oop-links.html"&gt;What is OOPS?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview.html"&gt;What is inheritance and polymorphism?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview.html"&gt;What is the need of virtual interfaces ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_05.html"&gt;Explain about the virtual task and methods .&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_09.html"&gt;What is the use of the abstract class?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_14.html"&gt;What is the difference between mailbox and queue?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview.html"&gt;What data structure you used to build scoreboard&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://asic-interview.blogspot.com/2010/04/systemverilog-interview-questions.html"&gt;What are the advantages of linkedlist over the queue ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview.html"&gt;How parallel case and full cases problems are avoided in SV&amp;nbsp;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;What is the difference between pure function and cordinary function ?&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview.html"&gt;What is the difference between $random and $urandom?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_28.html"&gt;What is scope randomization&amp;nbsp;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_28.html"&gt;List the predefined randomization methods.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_28.html"&gt;What is the dfference between always_combo and always@(*)?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview.html"&gt;What is the use of packagess?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_14.html"&gt;What is the use of $cast?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_28.html"&gt;How to call the task which is defined in parent object into derived class ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_28.html"&gt;What is the difference between rand and randc?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview.html"&gt;What is $root?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_14.html"&gt;What is $unit?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_14.html"&gt;What are bi-directional constraints?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_14.html"&gt;What is solve...before constraint ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_05.html"&gt;Without using randomize method or rand,generate an array of unique values?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://asic-interview.blogspot.com/2010/04/systemverilog-interview-questions-7.html"&gt;Explain about pass by ref and pass by value?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_05.html"&gt;What is the difference between bit[7:0] sig_1; and byte sig_2;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_05.html"&gt;What is the difference between program block and module ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_25.html"&gt;What is final block ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_13.html"&gt;How to implement always block logic in program block ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/all-about-fork-join-of-system-verilog.html"&gt;What is the difference between fork/joins, fork/join_none fork/join_any ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_05.html"&gt;What is the use of modports ?&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_13.html"&gt;Write a clock generator without using always block.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;What is forward referencing and how to avoid this problem?&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview_14.html"&gt;What is circular dependency and how to avoid this problem ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://asic-interview.blogspot.com/2010/04/systemverilog-interview-question-9.html"&gt;What is cross coverage ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://asic-interview.blogspot.com/2010/04/systemverilog-interview-questions-7.html"&gt;&amp;nbsp;Describe the difference between Code Coverage and Functional Coverage Which is more important and Why we need them&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/all-about-fork-join-of-system-verilog.html"&gt;How to kill a process in fork/join?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://asic-interview.blogspot.com/2010/04/systemverilog-interview-questions-7.html"&gt;Difference between Associative array and Dynamic array ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Difference b/w Procedural and Concurrent Assertions?&lt;/li&gt;&lt;li&gt;&lt;a href="http://asic-interview.blogspot.com/2010/04/systemverilog-interview-questions-7.html"&gt;What are the advantages of SystemVerilog DPI?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview.html"&gt;How to randomize dynamic arrays of objects?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;What is randsequence and what is its use?&lt;/li&gt;&lt;li&gt;&lt;a href="http://asic-interview.blogspot.com/2010/04/systemverilog-interview-questions-7.html"&gt;What is bin?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Why always block is not allowed in program block?&lt;/li&gt;&lt;li&gt;Which is best to use to model transaction? Struct or class ?&lt;/li&gt;&lt;li&gt;How SV is more random stable then Verilog?&lt;/li&gt;&lt;li&gt;Difference between assert and expect statements?&lt;/li&gt;&lt;li&gt;How to add a new processs with out disturbing the random number generator state ?&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_25.html"&gt;What is the need of alias in SV?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;What is the need to implement explicitly a copy() method inside a transaction , when we can simple assign one object to other ?&lt;/li&gt;&lt;li&gt;How different is the implementation of a struct and union in SV.&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_13.html"&gt;What is "this"?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_25.html"&gt;What is tagged union ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_13.html"&gt;What is "scope resolution operator"?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;What is the difference between Verilog Parameterized Macros and SystemVerilog Parameterized Macros?&lt;/li&gt;&lt;li&gt;What is the difference between&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre class="brush: sv;"&gt;logic data_1;&lt;br /&gt;var logic data_2;&lt;br /&gt;wire logic data_3j;&lt;br /&gt;bit data_4;&lt;br /&gt;var bit data_5;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_25.html"&gt;What is the difference between bits and logic?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Write a Statemechine in SV styles.&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_13.html"&gt;What is the difference between $rose and posedge?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;What is advantage of program block over clockcblock w.r.t race condition?&lt;/li&gt;&lt;li&gt;How to avoid the race condition between programblock ?&lt;/li&gt;&lt;li&gt;What is the difference between assumes and assert?&lt;/li&gt;&lt;li&gt;What is coverage driven verification?&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_13.html"&gt;What is layered architecture ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;What are the simulation phases in your verification environment?&lt;/li&gt;&lt;li&gt;How to pick a element which is in queue from random index?&lt;/li&gt;&lt;li&gt;What data structure is used to store data in your environment and why ?&lt;/li&gt;&lt;li&gt;What is casting? Explain about the various types of casting available in SV.&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/09/answers-to-systemverilog-interview.html"&gt;How to import all the items declared inside a package ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Explain how the timescale unit and precision are taken when a module does not have any timescalerdeclaration in RTL?&lt;/li&gt;&lt;li&gt;What is streaming operator and what is its use?&lt;/li&gt;&lt;li&gt;&lt;a href="http://asic-interview.blogspot.com/2010/04/systemverilog-interview-questions-7.html"&gt;What are void functions ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;How to make sure that a function argument passed has ref is not changed by the function?&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_13.html"&gt;What is the use of "extern"?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_25.html"&gt;What is the difference between initial block and final block?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/answers-to-systemverilog-interview_25.html"&gt;How to check weather a handles is holding object or not ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://learn-systemverilog.blogspot.com/2009/08/all-about-fork-join-of-system-verilog.html"&gt;How to disable multiple threads which are spawned by fork...join&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-7376598323981365975?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/7376598323981365975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/system-verilog-interview-questions.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7376598323981365975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7376598323981365975'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/system-verilog-interview-questions.html' title='System Verilog Interview Questions'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-5852186557754861136</id><published>2009-08-05T11:14:00.000-07:00</published><updated>2009-08-06T07:28:08.102-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='callback'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><category scheme='http://www.blogger.com/atom/ns#' term='Written by Subash'/><title type='text'>What is this "System Verilog Callback"</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Callback-notitle.svg/370px-Callback-notitle.svg.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 370px; height: 138px;" src="http://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Callback-notitle.svg/370px-Callback-notitle.svg.png" alt="" border="0" /&gt;&lt;/a&gt;Callback is one of the major confusing point for a System Verilog learner. Many people have asked the same question in many forums, but the answer doesn't seems to satisfy fully the quest of the person who has raised the querry. I too had the same issue, but I learned it slowly in a hard way. I am presenting here a way in which if I had an answer, I would have learned faster.&lt;br /&gt;&lt;br /&gt;We can pass data member to any function. Now consider a case where you are passing a function (say func1) as a data member to another function (say func2) and you get what is called &lt;span style="font-weight: bold;"&gt;callback&lt;/span&gt;. The reason why it is called callback is that the function func2 now can call anywhere in its code function func1.&lt;br /&gt;&lt;br /&gt;From wikipedia&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;In &lt;a href="http://en.wikipedia.org/wiki/Computer_programming" title="Computer programming"&gt;computer programming&lt;/a&gt;, a &lt;b&gt;callback&lt;/b&gt; is &lt;a href="http://en.wikipedia.org/wiki/Executable_code" title="Executable code" class="mw-redirect"&gt;executable code&lt;/a&gt; that is passed as an &lt;a href="http://en.wikipedia.org/wiki/Argument_%28computer_science%29" title="Argument (computer science)" class="mw-redirect"&gt;argument&lt;/a&gt; to other code. It allows a lower-level &lt;a href="http://en.wikipedia.org/wiki/Abstraction_layer" title="Abstraction layer"&gt;software layer&lt;/a&gt; to call a &lt;a href="http://en.wikipedia.org/wiki/Subroutine" title="Subroutine"&gt;subroutine&lt;/a&gt; (or function) defined in a higher-level layer.&lt;/blockquote&gt;&lt;br /&gt;Note that SV doesn't give a straight-forward way of passing a function as argument for another function. But we can get the same result (almost we can say!) by using OOP. The idea is to describe all the functions (both func1 type and func2 type) in a base class (don't implement the funct2 kind of function and make them virtual for polymorphism), and then extend the class to a derived class where you implement the func2 type of function.&lt;br /&gt;&lt;br /&gt;Example:-&lt;br /&gt;&lt;pre&gt;class abc_transactor;&lt;br /&gt;virtual task pre_send(); endtask&lt;br /&gt;virtual task post_send(); endtask&lt;br /&gt;&lt;br /&gt;task xyz();&lt;br /&gt;  // Some code here&lt;br /&gt;  this.pre_send();&lt;br /&gt;  // Some more code here&lt;br /&gt;  this.post_send();&lt;br /&gt;  // And some more code here&lt;br /&gt;endtask : xyz&lt;br /&gt;endclass : abc_transactor&lt;br /&gt;&lt;br /&gt;class my_abc_transactor extend abc_transactor;&lt;br /&gt;virtual task pre_send();&lt;br /&gt;  ...     // This function is implemented here&lt;br /&gt;endtask&lt;br /&gt;&lt;br /&gt;virtual task post_send();&lt;br /&gt;  ...     // This function is implemented here&lt;br /&gt;endtask&lt;br /&gt;&lt;br /&gt;endclass : my_abc_transactor&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now let me explain how it is going to work. The base class abc_transactor has 3 tasks, 2 of which are declared virtual and are not implemented. But they are being called from another task xyz() which is fully implemented. The unimplemented virtual task are called callback class.&lt;br /&gt;&lt;br /&gt;The child class, which extends from the base class, implements the previous unimplemented tasks. It inherits the xyz() task from the base class and hence doesn't need to change it. By this we can inject executable code to a function without modifying it.&lt;br /&gt;&lt;br /&gt;Now the next question is why is done. There are many reasons for it.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The biggest advantage is that you can modify the behavior of task xyz() without modifying it in the base or child class. It is a big advantage as no one wants to fiddle with known good functioning code.&lt;/li&gt;&lt;li&gt;Consider a case where you are writing a base class which is going to be used by multiple test environment, and for each test environment a known part of the code, or a known function/task is going to change. The natural choice is to implement those change-in-every-case functions/tasks as callback method and let the user extend your base class with specifying only that part of the code which need to be changed in his case.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Simple callback using the above approach does have some known limitations, which can be solved using design patterns (from OOP land), the details of which can be found at Janik's article of vmm_callback.&lt;br /&gt;&lt;br /&gt;Reference:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.edaboard.com/ftopic245431.html"&gt;What is a callback in System Verilog&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Callback_%28computer_science%29"&gt;Wikipedia article on callback&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.vmmcentral.org/vmartialarts/?p=17"&gt;Janik's article on vmm_callback&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-5852186557754861136?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/5852186557754861136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/what-is-this-system-verilog-callback.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5852186557754861136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5852186557754861136'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/what-is-this-system-verilog-callback.html' title='What is this &quot;System Verilog Callback&quot;'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-1476520231128089114</id><published>2009-08-02T07:48:00.000-07:00</published><updated>2009-08-02T07:55:51.884-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='Sutherland'/><title type='text'>System Verilog Gotchas - by Stuart Sutherland</title><content type='html'>In one of my last post I have added one of the System Verilog Gotcha paper. There are 2 more System Verilog Gotcha presentations (this time by Stuart Sutherland).&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.sutherland-hdl.com/papers/2006-SNUG-Boston_standard_gotchas_presentation.pdf"&gt;System Verilog Gotchas&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.sutherland-hdl.com/papers/2007-SNUG-SanJose_gotcha_again_presentation.pdf"&gt;More System Verilog Gotchas&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The compete presentation/papers of Stuart on System Verilog, Verification, Verilog can be viewed at &lt;a href="http://www.sutherland-hdl.com/papers-by-sutherland.php"&gt;http://www.sutherland-hdl.com/papers-by-sutherland.php&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-1476520231128089114?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/1476520231128089114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/system-verilog-gotchas-by-stuart.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/1476520231128089114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/1476520231128089114'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/system-verilog-gotchas-by-stuart.html' title='System Verilog Gotchas - by Stuart Sutherland'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-7053971175311130952</id><published>2009-08-01T10:02:00.000-07:00</published><updated>2009-08-01T10:14:00.299-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='LRM'/><category scheme='http://www.blogger.com/atom/ns#' term='Reference'/><title type='text'>System Verilog LRM</title><content type='html'>System Verilog LRM, as the name suggest, is the definite reference manual for SV. Unlike other standard reference manual, which are too academic or boring to read, this one is a easy to use, easy to read and has large number of examples. The link of which can be easily got by a simple google search.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vhdl.org/sv/SystemVerilog_3.1a.pdf"&gt;&lt;cite&gt;http://www.vhdl.org/sv/&lt;b&gt;SystemVerilog&lt;/b&gt;_3.1a.pdf&lt;/cite&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There is another reference manual or standard for SV (IEEE 1800) which is pretty much same as the LRM, and you have to pay for downloading it (assuming your organization don't pay $$$ to IEEE for free access to its huge papers and standards)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-7053971175311130952?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/7053971175311130952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/system-verilog-lrm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7053971175311130952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/7053971175311130952'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/08/system-verilog-lrm.html' title='System Verilog LRM'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-4404782764102474786</id><published>2009-07-31T03:56:00.001-07:00</published><updated>2009-07-31T04:15:09.219-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Best'/><title type='text'>Best sites to Learn System Verilog</title><content type='html'>There are large numbers of sites which have materials of system verilog, reading which you can learn it. But, there are few really good site, where system verilog has been described in a real nice way, and you have a smooth ride while learning SV. I personally learned from them quite a bit of system verilog from these sites.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://testbench.in/index.html"&gt;Testbench.in&lt;/a&gt; : System Verilog and VMM tutorial with a lots of example&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.asicguru.com/system-verilog/1/"&gt;Asicguru.com&lt;/a&gt; : Another nice SV tutorial site&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.doulos.com/knowhow/sysverilog/tutorial/"&gt;Doulos SV Tutorial&lt;/a&gt; : Not that much extensive, but still good&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.project-veripage.com/sv_front.php"&gt;Another decent tutorial&lt;/a&gt; from Project-Veripage&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.asic-world.com/systemverilog/tutorial.html"&gt;SV Tutorial&lt;/a&gt; from ASIC-World. It is not yet complete, but once it is complete, then it will be another great site to learn SV.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Amongst all 4, testbench.in is the best. It's a 10/10 site, you visit it, start learning and will fall in love with it. I feel proud of the fact that the creator of the site &lt;a href="http://blog.testbench.in/"&gt;Gopi Krishna&lt;/a&gt; is from India. Way to go Gopi.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-4404782764102474786?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/4404782764102474786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/best-sites-to-learn-system-verilog.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/4404782764102474786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/4404782764102474786'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/best-sites-to-learn-system-verilog.html' title='Best sites to Learn System Verilog'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-3012005374163843223</id><published>2009-07-30T08:07:00.000-07:00</published><updated>2009-07-30T08:08:44.003-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='SNUG'/><category scheme='http://www.blogger.com/atom/ns#' term='Gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='Paper'/><title type='text'>System Verilog Gotcha by Shalom Bresticker</title><content type='html'>&lt;a title="View Return of the SystemVerilog Gotchas.bresticker on Scribd" href="http://www.scribd.com/doc/14210222/Return-of-the-SystemVerilog-Gotchasbresticker" style="margin: 12px auto 6px; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; display: block; text-decoration: underline;"&gt;Return of the SystemVerilog Gotchas.bresticker&lt;/a&gt; &lt;object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="doc_73040741327709" name="doc_73040741327709" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="500" width="450"&gt;  &lt;param name="movie" value="http://d.scribd.com/ScribdViewer.swf?document_id=14210222&amp;amp;access_key=key-1fh6szy4vh3la63iz8bg&amp;amp;page=1&amp;amp;version=1&amp;amp;viewMode=list"&gt;   &lt;param name="quality" value="high"&gt;   &lt;param name="play" value="true"&gt;  &lt;param name="loop" value="true"&gt;   &lt;param name="scale" value="showall"&gt;  &lt;param name="wmode" value="opaque"&gt;   &lt;param name="devicefont" value="false"&gt;  &lt;param name="bgcolor" value="#ffffff"&gt;   &lt;param name="menu" value="true"&gt;  &lt;param name="allowFullScreen" value="true"&gt;   &lt;param name="allowScriptAccess" value="always"&gt;   &lt;param name="salign" value=""&gt;            &lt;param name="mode" value="list"&gt;       &lt;embed src="http://d.scribd.com/ScribdViewer.swf?document_id=14210222&amp;amp;access_key=key-1fh6szy4vh3la63iz8bg&amp;amp;page=1&amp;amp;version=1&amp;amp;viewMode=list" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_73040741327709_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" mode="list" align="middle" height="500" width="450"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-3012005374163843223?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/3012005374163843223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/system-verilog-gotcha-by-shalom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/3012005374163843223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/3012005374163843223'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/system-verilog-gotcha-by-shalom.html' title='System Verilog Gotcha by Shalom Bresticker'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-4391839625893799225</id><published>2009-07-29T06:04:00.000-07:00</published><updated>2009-07-29T06:09:57.324-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Verilab'/><category scheme='http://www.blogger.com/atom/ns#' term='Enum'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='String'/><title type='text'>SV Tips/Tricks - Converting Strings to Enums</title><content type='html'>SystemVerilog enumerated data type has one major shortcoming namely the inability to covert string to enum data type, whereas the reverse is possible. But there are many cases when one find the need to do so. Thankfully JL Gray of verilab has created a sample class template which can be used for the same purpose. The link to the blog entry is&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.verilab.com/blog/2007/10/casting-strings-to-enums-in-systemverilog/"&gt;http://www.verilab.com/blog/2007/10/casting-strings-to-enums-in-systemverilog/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy maadi !!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-4391839625893799225?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/4391839625893799225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/sv-tipstricks-converting-strings-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/4391839625893799225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/4391839625893799225'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/sv-tipstricks-converting-strings-to.html' title='SV Tips/Tricks - Converting Strings to Enums'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-5455803303098434149</id><published>2009-07-28T12:48:00.000-07:00</published><updated>2009-07-28T12:54:11.885-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Assertion'/><category scheme='http://www.blogger.com/atom/ns#' term='SVA'/><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Presentation'/><title type='text'>A Presentation on System Verilog Assertion</title><content type='html'>&lt;embed id="_ds_6543552" name="_ds_6543552" type="application/x-shockwave-flash" src="http://viewer.docstoc.com/" flashvars="doc_id=6543552&amp;amp;mem_id=597721&amp;amp;doc_type=ppt&amp;amp;fullscreen=0" allowscriptaccess="always" allowfullscreen="true" height="400" width="400"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;a href="http://www.docstoc.com/docs/6543552/Introduction-to-System-Verilog-Assertions"&gt;Introduction to System Verilog Assertions&lt;/a&gt; - &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-5455803303098434149?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/5455803303098434149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/presentation-on-system-verilog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5455803303098434149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/5455803303098434149'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/presentation-on-system-verilog.html' title='A Presentation on System Verilog Assertion'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-1290043163402886420</id><published>2009-07-28T12:17:00.000-07:00</published><updated>2009-07-28T12:54:37.039-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Verilog'/><category scheme='http://www.blogger.com/atom/ns#' term='Presentation'/><title type='text'>System Verilog Basic Links</title><content type='html'>These days I am working on System Verilog/VMM (for those lucky one who don't know what these are, System Verilog is a Hardware Verification Language which is used for verifying complex multi-million gates digital designs, and VMM is a verification methodology for the same):-&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Presentations:-&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.systemverilog.org/pdf/1a_DesignOverview.pdf"&gt;SV - Design&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.systemverilog.org/pdf/2a_TestbenchOverview.pdf"&gt;SV - Testbench&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.systemverilog.org/pdf/3a_AssertionsOverview.pdf"&gt;SV - Assertion&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.systemverilog.org/pdf/4_DPIOverview.pdf"&gt;SV - DPI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.systemverilog.org/pdf/SV_Symposium_2003.pdf"&gt;SV - Tranings (133 slides)&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.systemverilog.org/pdf/"&gt;And many more such presentations :)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-1290043163402886420?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/1290043163402886420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/system-verilog-basic-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/1290043163402886420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/1290043163402886420'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/system-verilog-basic-links.html' title='System Verilog Basic Links'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-967177542865624465.post-8357578316199264719</id><published>2009-07-28T11:42:00.001-07:00</published><updated>2009-07-28T11:42:50.766-07:00</updated><title type='text'>Welcome</title><content type='html'>Welcome to the new blog&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/967177542865624465-8357578316199264719?l=learn-systemverilog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learn-systemverilog.blogspot.com/feeds/8357578316199264719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/welcome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/8357578316199264719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/967177542865624465/posts/default/8357578316199264719'/><link rel='alternate' type='text/html' href='http://learn-systemverilog.blogspot.com/2009/07/welcome.html' title='Welcome'/><author><name>Subash</name><uri>http://www.blogger.com/profile/03095917153942037871</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_YoLjCsSgrqg/SwmIE__bTXI/AAAAAAAALbs/CplU1o50oRk/s1600-R/OgAAAOiuBrZLkIqh_O5EvM4sUezKGZlxEbCzuNlTa1LtyPlprTl9w3ibgmIBsG78buyn7ricZnqJW_FaR-uh-C34W1MAm1T1UNlHoAr9IvHLfzuw7YmCysp3LE_2.jpg'/></author><thr:total>0</thr:total></entry></feed>
