<?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-469081173588188170</id><updated>2011-11-20T00:24:03.451+05:30</updated><category term='Timing Analysis'/><category term='verilog'/><category term='Netlist'/><category term='STA'/><category term='metastability'/><category term='clock domain crossing'/><category term='system verilog'/><category term='Digital design'/><category term='cdc'/><category term='interview questions'/><category term='macros'/><category term='functional verification'/><title type='text'>ASIC Design and Verification</title><subtitle type='html'>Complete ASIC design portal</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-4482584186663401711</id><published>2011-03-16T11:00:00.000+05:30</published><updated>2011-03-16T11:01:15.165+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional verification'/><category scheme='http://www.blogger.com/atom/ns#' term='system verilog'/><title type='text'>TOP 10 VERIFICATION MYTHS</title><content type='html'>1. This is legacy code no need to verify it - Hold your horses! Are you 100% sure&lt;br /&gt;that you’re dealing with silicon proven code? Are you sure that nobody’s touched&lt;br /&gt;it since it last worked?&lt;br /&gt;2. I can come up with a patch in 5 minutes - That’s OK as long as you make sure&lt;br /&gt;you don’t end up with a verification environment that looks like a bunch of&lt;br /&gt;patches hooked together. Ask yourself how easily it would be to modify or fix your&lt;br /&gt;environment a week from today? Isn’t it worth it to take a couple of more minutes&lt;br /&gt;and write a robust code?&lt;br /&gt;3. Start checking and plan as you go - A big no no! Don’t be tempted into this.&lt;br /&gt;Even if your task looks like a piece of cake, always plan in advance. You’ll be&lt;br /&gt;amazed to see how many problems can be completely avoided. Remember the 5&lt;br /&gt;P's: Proper Planning Prevents Poor Performance.&lt;br /&gt;4. This is really simple, no need for a test plan - Consider your test plan document&lt;br /&gt;as your working contract. Whatever you put in it defines the requirements for&lt;br /&gt;your current work. If it’s a simple task then just write a test plan on half a page.&lt;br /&gt;5. Verification is not the product, no need to keep software standards - True,&lt;br /&gt;verification is not the product but still - when you’re dealing with thousands lines&lt;br /&gt;of code, you’d better make sure there is a certain level of consistency, let alone&lt;br /&gt;programming errors.&lt;br /&gt;6. Don’t have time to add comments - Remember the last time you spent half a day&lt;br /&gt;on reverse engineering somebody else’s code? How about your own code? Better&lt;br /&gt;yet, start each test with comments explaining the steps in the test and keep them&lt;br /&gt;up to date.&lt;br /&gt;7. Oh I know! Let’s just force the signal from outside - Forced wires have this&lt;br /&gt;tendency to get forgotten along the way and then reappear at a later stage,&lt;br /&gt;usually a week before tapeout. So be extra careful.&lt;br /&gt;8. Must have regression running in the background all the time - Regression&lt;br /&gt;runs alone can’t do the job. You must have a Regression Sitter to monitor and&lt;br /&gt;analyze the results or else - you’re just wearing out your servers.&lt;br /&gt;9. We have reached 100% coverage there’s no point in running more tests - Not&lt;br /&gt;really. Your coverage model can only capture what you thought about in advance.&lt;br /&gt;Obviously a random test bench is capable of generating additional scenarios that&lt;br /&gt;might reveal a bug, so don’t stop at 100%. Instead - enhance the functional&lt;br /&gt;coverage model.&lt;br /&gt;10. Verifiers should be looking for bugs - This is a common misconception of what&lt;br /&gt;verification is all about. Verifiers should be focused on building a well&lt;br /&gt;constructed, robust and complete test bench. Bugs will come out on their own.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-4482584186663401711?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/4482584186663401711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=4482584186663401711' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4482584186663401711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4482584186663401711'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2011/03/top-10-verification-myths.html' title='TOP 10 VERIFICATION MYTHS'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-3226154447352204466</id><published>2011-03-10T17:28:00.002+05:30</published><updated>2011-03-10T17:36:05.167+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='system verilog'/><title type='text'>Difference between Initial block and Final block in SV</title><content type='html'>Final block is a new concept which was introduced in System Verilog.&lt;br /&gt;&lt;br /&gt;The basic difference between these two are evident from the nomenclature, i.e, Initial block starts getting executed during simulation time t=0 while the Final block gets executed when the simulation is completed.&lt;br /&gt;&lt;br /&gt;Before getting into details, there is one similarity between these two sequential block of codes, both of them gets executed only once during the simulation&lt;br /&gt;&lt;br /&gt;Now getting back to the difference between Initial and Final blocks, Initial blocks can contain some # delays or wait statements or some wait for events, but the Final block should not contains any such things.&lt;br /&gt;&lt;br /&gt;Final block should get executed with 0 simulation time. Ideally this is used for test case status reporting or some display statements that have to be printed after the test case execution is completed&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-3226154447352204466?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/3226154447352204466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=3226154447352204466' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/3226154447352204466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/3226154447352204466'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2011/03/difference-between-initial-block-and.html' title='Difference between Initial block and Final block in SV'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-4222308930403268204</id><published>2009-03-25T09:27:00.002+05:30</published><updated>2009-03-25T09:30:48.023+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='metastability'/><category scheme='http://www.blogger.com/atom/ns#' term='clock domain crossing'/><category scheme='http://www.blogger.com/atom/ns#' term='Digital design'/><category scheme='http://www.blogger.com/atom/ns#' term='cdc'/><title type='text'>Understanding Clock Domain Crossing Issues</title><content type='html'>&lt;div class="textBlock"&gt; &lt;span style="font-size:85%;"&gt;&lt;span class="orange11"&gt;&lt;/span&gt;&lt;span class="storyHEADLINE"&gt;&lt;/span&gt;&lt;span class="orange12BOLD"&gt;&lt;/span&gt;&lt;b&gt;Introduction&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;SoCs are becoming more complex these days. A lot of functionality is being added to chips and data is frequently transferred from one clock domain to another. Hence, clock domain crossing verification has become one of the major verification challenges in deep submicron designs. &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; A clock domain crossing occurs whenever data is transferred from a flop driven by one clock to a flop driven by another clock.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig1.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;1. Clock domain crossing.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt; In &lt;i&gt;Figure 1&lt;/i&gt;, signal A is launched by the C1 clock domain and needs to be captured properly by the C2 clock domain. Depending on the relationship between the two clocks, there could be different types of problems in transferring data from the source clock to the destination clock. Along with that, the solutions to those problems can also be different. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Traditional methods like simulation and static timing analysis alone are not sufficient to verify that the data is transferred consistently and reliably across clock domains. Hence, new verification methodologies are required, but before devising a new methodology it is important to understand the issues related to clock domain crossings properly. Different types of clock domain crossings are discussed here along with the possible issues encountered in each one of them and their solutions. A new verification methodology is then proposed which will ensure that data is transferred correctly across clock domains. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; In all the subsequent sections, the signal names shown in &lt;i&gt;Figure 1&lt;/i&gt; are directly used. For example, C1 and C2 imply the source and destination clocks respectively. Similarly A and B are used as source and destination flop outputs respectively. Also, the source and destination flops are assumed to be positive edge triggered. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Clock Domain Crossing Issues&lt;/b&gt;&lt;br /&gt;This section describes three main issues which can possibly occur whenever there is a clock domain crossing. The solutions for those issues are also described. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;A. Metastability&lt;/b&gt;&lt;br /&gt;Problem. If the transition on signal A happens very close to the active edge of clock C2, it could lead to setup or hold violation at the destination flop "FB". As a result, the output signal B may oscillate for an indefinite amount of time. Thus the output is unstable and may or may not settle down to some stable value before the next clock edge of C2 arrives. This phenomenon is known as metastability and the flop "FB" is said to have entered a metastable state. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; Metastability in turn can have the following consequences from a design perspective: &lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;If the unstable data is fed to several other places in the design, it may lead to a high current flow and even chip burnout in the worst case.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Different fan-out cones may read different values of the signal, and may cause the design to enter into an unknown functional state, leading to functional issues in the design.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;The destination domain output may settle down to the new value or may return to the old value. However, the propagation delay could be high leading to timing issues.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:85%;"&gt; For example, see &lt;i&gt;Figure 2&lt;/i&gt;. If the input signal A transitions very close to the posedge of clock C2, the output of the destination flop can be metastable. As a result it can be unstable and may finally settle to 1 or 0 as depicted by signals B1 and B2. &lt;/span&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig2.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;2. Metastability has consequences.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Solution. Metastability problems can be avoided by adding special structures known as synchronizers in the destination domain. The synchronizers allow sufficient time for the oscillations to settle down and ensure that a stable output is obtained in the destination domain. A commonly used synchronizer is a multi-flop synchronizer as shown in &lt;i&gt;Figure 3&lt;/i&gt;. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig3.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;3. Multi-flop synchronization.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt; This structure is mainly used for single and multi-bit control signals and single bit data signals in the design. Other types of synchronization schemes are required for multi-bit data signals such as MUX recirculation, handshake, and FIFO. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;B. Data Loss&lt;/b&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Problem. Whenever a new source data is generated, it may not be captured by the destination domain in the very first cycle of the destination clock because of metastability. As long as each transition on the source signal is captured in the destination domain, data is not lost. In order to ensure this, the source data should remain stable for some minimum time, so that the setup and hold time requirements are met with respect to at least one active edge of destination clock. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;If the active clock edges of C1 and C2 arrive close together, the first clock edge of C2, which comes after the transition on source data A, is not able to capture it. The data finally gets captured by the second edge of clock C2 (&lt;i&gt;Figure 4&lt;/i&gt;).  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; However, if there is sufficient time between the transition on data A and the active edge of clock C2, the data is captured in the destination domain in the first cycle of C2. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig4.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;4. Effect of metastability on data capture.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Hence, there may not be a cycle by cycle correspondence between the source and destination domain data. Whatever the case, it is important that each transition on the source data should get captured in the destination domain. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;For example: Assume that the source clock C1 is twice as fast as the destination clock C2 and there is no phase difference between the two clocks. Further assume that the input data sequence "A" generated on the positive edge of clock C1 is "00110011". The data B captured on the positive edge of clock C2 will be "0101". Here, since all the transitions on signal A are captured by B, the data is not lost. This is depicted in &lt;i&gt;Figure 5&lt;/i&gt;. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig5.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;5. No data is lost in this case.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt; However, if the input sequence is "00101111", then the output in the destination domain will be "0011". Here the third data value in the input sequence which is "1" is lost as shown in &lt;i&gt;Figure 6&lt;/i&gt;. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig6.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;6. Data is lost in this case.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; Solution. In order to prevent data loss, the data should be held constant in the source domain long enough to be properly captured in the destination domain. In other words, after every transition on source data, at least one destination clock edge should arrive where there is no setup or hold violation so that the source data is captured properly in the destination domain. There are several techniques to ensure this. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;For example, a finite state machine (FSM) can be used to generate source data at a rate, such that it is stable for at least 1 complete cycle of the destination clock. This can be generally useful for synchronous clocks when their frequencies are known. For asynchronous clock domain crossings, techniques like handshake and FIFO are more suitable. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;C. Data Incoherency&lt;/b&gt;&lt;br /&gt;Problem. As seen in the previous section whenever new data is generated in the source clock domain, it may take 1 or more destination clock cycles to capture it, depending on the arrival time of active clock edges. Consider a case where multiple signals are being transferred from one clock domain to another and each signal is synchronized separately using a multi-flop synchronizer. If all the signals are changing simultaneously and the source and destination clock edges arrive close together, some of the signals may get captured in the destination domain in the first clock cycle while some others may be captured in the second clock cycle by virtue of metastability. This may result in an invalid combination of values on the signals at the destination side. Data coherency is said to have been lost in such a case. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; If these signals are together controlling some function of the design, then this invalid state may lead to functional errors. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; For example: Assume that "00" and "11" are two valid values for a signal X[0:1] generated by clock C1. As shown in &lt;i&gt;Figure 7&lt;/i&gt;, initially there is a transition from 1-&gt;0 on both the bits of X. Both the transitions get captured by clock C2 in the first cycle itself. Hence the signal Y[0:1] becomes "00". &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig7.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;7. Data coherency is lost in this case.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; Next, there is a transition from 0-&gt;1 on both the bits of signal X. Here the rising edge of clock C2 comes close to the transition on signal X. While the transition on X[0] is captured in the first clock cycle, the transition on X[1] gets captured in second clock cycle of C2. This results in an intermediate value of "10" on Y[0:1] which is an invalid state. Data coherency is lost in this case. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Solution. In the above example, the problem results because all the bits are not changing to a new state in the same cycle of destination clock. If all the bits either retain their original value or change to the new value in the same cycle, then the design either remains in the original state or goes to a correct new state. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Now, if the circuit is designed in such a way that while changing the design from one state to another, only one bit change is required, then either that bit would change to a new value or would retain the original value. Since all the other bits have the same value in both the states, the complete bus will either change to the new value or retain the original value in this case. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;This in turn implies that if the bus is Gray-encoded, the problem would get resolved and an invalid state would never be obtained. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;However, this is applicable only for control busses as it may not be possible to Gray-encode the data busses. In such cases, other techniques like handshake, FIFO and MUX recirculation can be used to generate a common control logic to transfer data correctly.&lt;br /&gt; The MUX recirculation technique is shown in &lt;i&gt;Figure 8&lt;/i&gt;.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig8s.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;8. MUX recirculation technique.&lt;/i&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;a href="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig8.gif"&gt;Click here for a larger version&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt; Here, a control signal EN, generated in the source domain is synchronized in the destination domain using a multi-flop synchronizer. The synchronized control signal EN_Sync drives the select pin of the muxes, thereby controlling the data transfer for all bits of the bus A. In this way, individual bits of the bus are not synchronized separately, and hence there is no data incoherency. However, it is important to ensure that when the control signal is active, the source domain data A[0:1] should be held constant. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;!--end body--&gt; &lt;/p&gt;&lt;/div&gt; &lt;!--body--&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Synchronous Clock Domain Crossings&lt;/b&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;This section describes various types of synchronous clock domain crossings. Clocks which have a known phase and frequency relationship between them are known as synchronous clocks. These are essentially the clocks originating from the same clock-root. A clock crossing between such clocks is known as a synchronous clock domain crossing. It can be divided into several categories based on the phase and frequency relationship of the source and destination clocks as follows: &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Clocks with the same frequency and zero phase difference &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Clocks with the same frequency and constant phase difference&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Clocks with different frequency and variable phase difference&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Integer multiple clocks&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Rational multiple clocks&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;All the above sub categories may not be used in real designs but are being considered here for completeness and better understanding of the subject. &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; While describing all the above cases, it is assumed that the source clock (C1) and the destination clock (C2) have the same phase and frequency jitter and are balanced with the same specifications of clock latency and skew. It is also assumed that the clocks begin with a zero phase difference between them and the "clock to Q" delay of the flops is 0. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Clocks with the same frequency and zero phase difference&lt;/b&gt;&lt;br /&gt;This refers to two identical clocks, as the clocks C1 and C2 have the same frequency and 0 phase difference. Note, that as the clocks C1 and C2 are identical and generated from the same root clock, the data transfer from C1 to C2 is essentially not a clock domain crossing. For all practical purposes, this is the case of a single clock design and is considered here for completeness. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Whenever data is transferred from clock C1 to C2, one complete clock cycle of C1 (or C2) is available for data capture as shown in &lt;i&gt;Figure 9&lt;/i&gt;. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig9.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;9. Clocks with the same frequency and phase.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; As long as the combinational logic delay between the source and destination flops is such that the setup and hold time of the circuit can be met, the data will be transferred correctly. The only requirement here is that the design should be STA (static timing analysis) clean. In that case, there will be no problem of metastability, data loss or data incoherency. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Clocks with the same frequency and constant phase difference&lt;/b&gt;&lt;br /&gt;These are the clocks having the same time period but a constant phase difference. A typical example is the use of a clock and its inverted clock. Another example is a clock which is phase shifted from its parent clock, for example by T/4 where T is the time period of the clocks. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; Clocks C1 and C2 have the same frequency but are phase shifted and C1 is leading C2 by 3T/4 time units (&lt;i&gt;Figure 10&lt;/i&gt;).  &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig10.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;10. Same frequency, phase shifted clocks.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Whenever data is transferred from clock C1 to C2, there is more restriction on the combinational logic delay due to smaller setup/hold margins. If the logic delay at the crossing is such that the setup and hold time requirements can be met, data will be transferred properly and there will be no metastability. In all such cases, there is no need for a synchronizer. The only requirement here is that the design should be STA clean. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Clocks with different frequency and variable phase difference&lt;/b&gt;&lt;br /&gt;These are clocks which have a different frequency and a variable phase difference. There can be two sub-categories here, one where the time period of one clock is an integer multiple of the other and a second where the time period of one clock is a non-integer (rational) multiple of the other. In both cases, the phase difference between the active edges of clocks is variable. These two cases are described in detail below. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;A. Integer multiple clocks&lt;/b&gt;&lt;br /&gt;In this case, the frequency of one clock is an integer multiple of the other and the phase difference between their active edges is variable. Here the minimum possible phase difference between the active edges of 2 clocks would always be equal to the time period of the fast clock. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; In &lt;i&gt;Figure 11&lt;/i&gt; clock C1 is 3 times faster than clock C2. Assuming T is the time period of clock C1, the time available for data capture by clock C2 could be T, 2T or 3T depending on which edge of clock C1 the data is launched. Hence, the worst case delay of any path should meet the setup time with respect to the edge with a phase difference of T. The worst case hold check would be made with respect to the edge with 0 phase difference. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig11.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;11. Integer multiple clocks.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;In all such cases, one complete cycle of the faster clock is always available for data capture, hence it should always be possible to meet the setup and hold requirements. As a result there will be no metastability or data incoherency and a synchronizer is not needed. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;However, there can still be a problem of data loss in the case of fast to slow clock crossing. (That is, the source clock is faster than the destination clock.) In order to prevent this, the source data should be held constant for at least one cycle of the destination clock. This can be ensured by using some control circuit, for example, a simple finite state machine (FSM) would work in this case. In the example shown in &lt;i&gt;Figure 11&lt;/i&gt;, if the source data is generated once in every 3 cycles of the source clock, there would be no data loss.&lt;br /&gt;For the case of slow to fast crossings, there will anyways be no data loss.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;B. Rational multiple clocks&lt;/b&gt;&lt;br /&gt;In this case, the frequency of one clock is a rational or non-integer multiple of the other clock and the phase difference between the active clock edges is variable. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; Unlike the situation where one clock is an integer multiple of the other, here the minimum phase difference between the two clocks can be very small- small enough to cause metastability. Whether or not a metastability problem will occur depends on the value of the rational multiple, and the design technology. Three different cases are being considered here with the help of examples. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; In the first case, there is a sufficient phase difference between the active edges of the source and destination clocks such that there will be no metastability. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; In the second case, the active clock edges of the two clocks can come very close together, close enough to cause metastability problem. However, in this case the frequency multiple is such that, once the clock edges come close together, there would be sufficient margin in the next cycle to capture data properly without any setup or hold violation. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; In the third case, the clock edges of the two clocks can be close enough for many consecutive cycles. This is similar to the behavior of asynchronous clocks except that here the clock-root for both the clocks is the same and hence the phase difference between the clocks can be calculated. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Note that in all the examples given below, some delay values are used and it is assumed that a phase margin of less than or equal to 1.5ns between the clock edges can cause metastability. This is just a placeholder value and in real designs, it would be a function of many things including technology used, flop characteristics, etc. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Example 1&lt;/b&gt;&lt;br /&gt;This is the case when the active clock edges of both the clocks will never come very close together, and in all cases there would be a sufficient margin to meet the setup and hold requirements of the circuit. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; Consider a clock C from which 2 clocks C1 and C2 are derived with a frequency of divide-by-3 and divide-by-2 respectively with respect to clock C. Here clock C1 is 1.5 times slower than clock C2. As shown in &lt;i&gt;Figure 12&lt;/i&gt;, the time period of clock C1 is 15ns and of C2 is 10ns. The least possible phase difference between the two clock edges is 2.5ns which should be sufficient to meet setup and hold time requirements. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig12.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;12. Clock edges never come very close together.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; However, additional combinational logic should not be added at the crossing due to the very small setup/hold margins. If there is any logic, its delay should meet the setup and hold time requirements. If this condition can be met, there will be no metastability and no synchronizer would be required. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; Further, if the crossing is a slow to fast crossing, there will be no data loss. However, in case of a fast to slow clock crossing, there can be data loss. In order to prevent this, the source data needs to be held constant for at least one cycle of the destination clock so that at least one active edge of the destination clock arrives between two consecutive transitions on the source data. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Example 2&lt;/b&gt;&lt;br /&gt;In this case, the active clock edges of both the clocks can come very close together intermittently. In other words, the clock edges come close together once and then there would be sufficient margin between the edges for the next few cycles (to capture data properly) before they come close again. Here the word "close" implies close enough to cause metastability. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; In &lt;i&gt;Figure 13&lt;/i&gt;, clocks C1 and C2 have time periods 10ns and 7ns respectively. Notice, that the minimum phase difference between the two clocks is 0.5ns, which is very small. So, there are chances of metastability and a synchronizer would be required. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; Due to metastability, the data may not be captured in the destination domain when the clock edges are very close together. However, in this case, note that once the clock edges come very close together, in the next cycle there is a sufficient margin so that the data can be captured properly by the destination clock. This is shown by signal B2 in &lt;i&gt;Figure 13&lt;/i&gt;. While the expected output would be B1, the actual waveform could look like B2, but still there is no data loss in this case. However there can be an issue of data incoherency as described previously. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig13.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;13. Clock edges come close together intermittently.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;For a fast to slow crossing, data loss can occur, and in order to prevent this, the source data should be held constant for a minimum of one destination clock cycle. Again, this can be done by the use of a simple FSM. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Example 3&lt;/b&gt;&lt;br /&gt;This is the case when the phase difference between the clocks can be very small at times and can remain like that for several cycles. This is very similar to asynchronous clocks except that the variable phase differences will be known and will repeat periodically. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; In &lt;i&gt;Figure 14&lt;/i&gt;, clocks C1 and C2 have time periods 10ns and 9ns respectively. It can be seen that the active clock edges of both the clocks come very close together for 4 consecutive cycles. In the first two cycles there is a possibility of a setup violation (as the source clock is leading the destination clock) and in the next two cycles there is a possibility of hold violation (as the destination clock is leading the source clock). &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig14s.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;14. Clock edges are close for consecutive cycles.&lt;/i&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;a href="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig14.gif"&gt;Click here for a larger version&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; In this case, there will be an issue of metastability and hence synchronization needs to be done. Apart from metastability there can be an issue of data loss also, even though it is a slow to fast clock domain crossing. As can be seen from &lt;i&gt;Figure 14&lt;/i&gt;, B1 is the expected output if there would have been no metastability. However, the actual output can be B2. Here the data value '1' is lost, because in the first cycle the value '1' is not captured due to setup violation and in the second cycle the new value '0' is incorrectly captured due to hold violation. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;In order to prevent data loss, the data needs to be held constant for a minimum of two cycles of the destination clock. This is applicable for both fast to slow as well as slow to fast clock domain crossings. This can be done by controlling the source data generation using a simple FSM. However, the data incoherency issue can still be there. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;In such cases, standard techniques like handshake and FIFO are more useful to control data transfer as they will also take care of the data incoherency issue. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Asynchronous Clock Domain Crossings&lt;/b&gt;&lt;br /&gt;Clocks which do not have a known phase or frequency relationship between them are known as asynchronous clocks. Whenever there is a clock crossing between two asynchronous clocks, their active edges can arrive very close together leading to metastability. Here the phase difference between the clocks can be variable and unlike synchronous clocks it is unpredictable. &lt;/span&gt; &lt;!--end body--&gt;  &lt;!--body--&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Proper synchronization needs to be done in the destination domain to prevent metastability. Apart from that, there can be problems of data loss and data incoherency (in both fast to slow as well as slow to fast clock crossings). If the source and destination clock frequencies are known, data loss can be prevented by holding the source data constant for two cycles of the destination clock. However, if the circuit is to be designed to be independent of clock frequencies, handshake or FIFO techniques should be used to prevent metastability, data loss and data incoherency. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Verification Methodology&lt;/b&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;This section describes a methodology which will ensure that the circuit has been designed properly to handle the clock domain crossing issues. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;The validation activity can be divided into two categories, namely structural and functional. Structural validation ensures that appropriate synchronization logic has been added wherever it is required and functional validation ensures that the logic which has been added is actually performing the intended function. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; A number of CDC problems can be detected just by performing structural validation. These checks are simpler and much faster than the functional validation. Moreover, if there are structural issues, most of the functional validation would have no relevance anyway. Hence, verification should begin with the structural checks and the problems detected there should be corrected before moving on to functional validation. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; Rule-based checking is a very efficient way to perform structural validation.&lt;br /&gt;Assertion-based verification techniques can be used to perform functional validation. Assertions can be inferred automatically in the design using some EDA tools, or they can be inserted in the RTL using any of the standard assertion languages like OVL, PSL and SVA. These languages are supported by many EDA vendors. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; These assertions can either be simulated in the functional simulation environment or can be verified using formal verification techniques. Both these techniques have their own advantages and disadvantages. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; The simulation results are dependent on the quality of test vectors used. A problem may go undetected if the vectors applied cannot stimulate it, and it is very difficult to determine the right set of test vectors which will give good coverage. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;As compared to simulation, formal techniques give a much better coverage and there is no need to provide any test vectors. However, formal techniques have some performance issues because of state space explosion which is a well known problem in formal analysis (see reference 4). So, these checks are not suitable for full chip analysis but they work reasonably well at the block level. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; A step-by-step approach for verifying clock domain crossings is described here.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Step 1&lt;/b&gt;&lt;br /&gt;Check for the presence of valid synchronizers in:&lt;br /&gt;All asynchronous clock domain crossings, and,&lt;br /&gt;Those cases of synchronous clock domain crossings where there can be metastability as described in the section on rational multiple clocks. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;A multi-flop synchronizer is sufficient to ensure that there will be no metastability. However, there can still be a problem of data incoherency. So, it is advisable to check at this stage only, that multi-flop synchronizers are used only for scalar signals. They can also be used for control busses. They should not be used for data busses however. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;A rule-based checker can be used to automatically detect all clock domain crossings and to check for the presence of valid synchronizers at all places where they are required. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; If there are missing synchronizers, the designer should modify the design to add appropriate synchronization logic.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Step 2&lt;/b&gt;&lt;br /&gt;Check for the presence of separately synchronized signals which are converging. These are probable candidates for data incoherency. These candidates can be identified by doing structural analysis of the design. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;The candidate signals for data incoherency should be verified to be Gray-encoded. This validation can be done through assertions. The assertion itself could even be generated by a structural checking tool " whenever it sees signals which are candidates for data incoherency. &lt;i&gt;Figure 15&lt;/i&gt; shows a control bus clock domain crossing, which is synchronized using a multi-flop synchronizer but is not Gray-encoded. A waveform trace is generated for the assertion failure. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig15.gif" /&gt;&lt;br /&gt;&lt;/span&gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;i&gt;15. Formal verification helps catch gray-encoding failure.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; In case the converging signals cannot be Gray-encoded, change the synchronization scheme to one which uses a common control signal, for example, MUX recirculation, FIFO or handshake. These schemes still need to be validated for proper functionality as described in Step 4. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Step 3&lt;/b&gt;&lt;br /&gt;Once the proper synchronization logic is in place and the Gray-encoding checks have been done, the next step is to verify that there is no data loss while transferring data from one clock domain to the other. This needs to be checked for the following two cases: &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Synchronous clock domain crossings&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;All fast to slow crossings&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Slow to fast crossings where the clock edges can be close together for continuous cycles&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;All asynchronous clock domain crossings&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt; These can be validated by asserting that each source data launch is always captured in the destination domain. &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;In the case of fast to slow synchronous clock domain crossings, where a synchronizer is not required and for the simple cases of multi-flop synchronization, check that after every transition on the source data an active edge of the destination clock arrives where there is no setup or hold violation. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;For other synchronization schemes, some standard functional checks can be done to ensure that there is no data loss, which are described in Step 4. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Step 4&lt;/b&gt;&lt;br /&gt;In all cases, where some special synchronization schemes are used, it is necessary to verify that they are performing the intended function correctly. This is important to ensure that there will be no metastability, data incoherency or data loss problem. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; The required checks are given here for three commonly used schemes: &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Handshake synchronization: Check that the request-data and request-acknowledge protocols are working as per the specifications.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;FIFO synchronization: Check that there is no FIFO overflow or underflow.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Mux recirculation: With reference to &lt;i&gt;Figure 8&lt;/i&gt;, check that while the synchronized control signal EN_Sync is active, the following two conditions hold:&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Source data A[0:1] is stable, and,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;at least one active edge of destination clock arrives&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt; The methodology described in the above four steps is also depicted in &lt;i&gt;Figure 16&lt;/i&gt;. &lt;/span&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;span style="font-size:85%;"&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig16s.gif" /&gt;&lt;br /&gt;&lt;img src="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig16b.gif" /&gt;&lt;br /&gt;&lt;i&gt;16. The flow of the verification methodology.&lt;/i&gt; &lt;a href="http://i.cmpnet.com/edadesignline/2007/dec07/Apafig16.gif"&gt;Click here for a larger version&lt;/a&gt;&lt;/span&gt;   &lt;/center&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;br /&gt;Traditional verification methods like simulation and static timing analysis are not sufficient to detect all types of problems which can occur in clock domain crossings. The problems which can occur depend on the types of clock domain crossings. Similarly, the solutions to those problems are also different and hence the verification techniques required are different as well. Some of the basic problems of clock domain crossings have been discussed here. The solutions to those issues are also discussed and a verification methodology is proposed which will ensure that data is correctly transferred across clock domains. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; [1] Sanjay Churiwala, "Tackling multiple clocks in SoCs", EE Times March 15, 2004.&lt;br /&gt;[2] Shaker Sarwary, "Solving the toughest problems in CDC analysis", EE Times August 28, 2006.&lt;br /&gt;[3] http://www.asic-world.com/tidbits/metastablity.html&lt;br /&gt;[4]K. McMillan, Symbolic Model Checking, Kluwer Academic Publishers, Boston, 1993. &lt;/span&gt;&lt;/p&gt; &lt;span style="font-size:85%;"&gt;&lt;b&gt;About the Authors:&lt;br /&gt;Saurabh Verma&lt;/b&gt; Is an engineering manager at Atrenta. He has a bachelor degree from Indian Institute of Technology, Kanpur. He can be reached at: &lt;a href="mailto:saurabhv@atrenta.com"&gt;Verma&lt;/a&gt;&lt;br /&gt;&lt;b&gt;Ashima S. Dabare&lt;/b&gt; Ashima is a Consulting Applications Engineer at Atrenta. She has a masters degree from Indian Institute of Technology, Delhi. She can be reached at: &lt;a href="mailto:ashima@atrenta.com"&gt;Dabare&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;!--end body--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-4222308930403268204?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/4222308930403268204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=4222308930403268204' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4222308930403268204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4222308930403268204'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2009/03/understanding-clock-domain-crossing.html' title='Understanding Clock Domain Crossing Issues'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-7111510372788973894</id><published>2009-03-25T09:24:00.001+05:30</published><updated>2009-03-25T09:25:50.025+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='metastability'/><category scheme='http://www.blogger.com/atom/ns#' term='clock domain crossing'/><category scheme='http://www.blogger.com/atom/ns#' term='Digital design'/><category scheme='http://www.blogger.com/atom/ns#' term='cdc'/><title type='text'>Introduction to Metastability</title><content type='html'>&lt;pre&gt;Any asynchronous input from the outside world to a clocked circuit represents&lt;br /&gt;a source of unreliability, since there is always some residual probability&lt;br /&gt;that the clocked circuit will sample the asynchronous signal just at the&lt;br /&gt;time that it is changing.&lt;br /&gt;&lt;br /&gt;From a specification point of view, synchronous elements such as flip flops&lt;br /&gt;specify a &lt;b&gt;Setup time&lt;/b&gt; and a &lt;b&gt;Hold time&lt;/b&gt;. By its nature an&lt;br /&gt;asynchronous input cannot be reliably expected to meet this specification, and&lt;br /&gt;so it will have transitions that fall within the timing window that is bounded&lt;br /&gt;by these two specifications. When this occurs, the result can be one of three&lt;br /&gt;scenarios:&lt;br /&gt;&lt;br /&gt;1) The state of the signal prior to the transition is used.&lt;br /&gt;2) The state of the signal after the transition is used.&lt;br /&gt;3) The flip flop goes metastable.&lt;br /&gt;&lt;br /&gt;The first two possibilities are of no consequence, since the signal is&lt;br /&gt;asynchronous, but the third possibility is what the rest of this article is&lt;br /&gt;about.&lt;br /&gt;&lt;br /&gt;Metastability caused havoc in synchronous systems. It is caused by the unstable&lt;br /&gt;equilibrium state for example when a pair of cross coupled CMOS inverters are&lt;br /&gt;stuck at mid-voltages. It is impossible to determine how long such a state&lt;br /&gt;persists. Unfortunately, due to the complexities in today's systems, it is not&lt;br /&gt;possible for the designer to avoid this type of situation.&lt;br /&gt;&lt;br /&gt;The most common approach to minimizing the problems of metastability propagating&lt;br /&gt;into our synchronous systems is to use a synchronizing circuit to take the&lt;br /&gt;asynchronous input signal, and align it to the timing regimen of the rest of the&lt;br /&gt;system.&lt;br /&gt;&lt;br /&gt;The synchronizer though can go metastable itself, and the goal of a designer is&lt;br /&gt;to minimize the probability of this occuring and propagating to the output of&lt;br /&gt;the synchronizer. In current (2004) technology, this can usually be achieved&lt;br /&gt;with a two stage or three stage synchronizer.&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/469081173588188170-7111510372788973894?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/7111510372788973894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=7111510372788973894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/7111510372788973894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/7111510372788973894'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2009/03/introduction-to-metastability.html' title='Introduction to Metastability'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-2577750450381938415</id><published>2008-09-16T20:48:00.003+05:30</published><updated>2009-04-28T16:33:50.422+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Verilog Questions</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cpvemuri%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="Edit-Time-Data" href="file:///C:%5CDOCUME%7E1%5Cpvemuri%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_editdata.mso"&gt;&lt;link rel="OLE-Object-Data" href="file:///C:%5CDOCUME%7E1%5Cpvemuri%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_oledata.mso"&gt;&lt;!--[if !mso]&gt; &lt;style&gt; v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} &lt;/style&gt; &lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	mso-bidi-font-size:10.0pt; 	font-family:Arial; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman";} @page Section1 	{size:595.3pt 841.9pt; 	margin:113.4pt 28.35pt 42.55pt 56.7pt; 	mso-header-margin:28.35pt; 	mso-footer-margin:28.35pt; 	mso-paper-source:7;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Q: What is the difference between a Verilog task and a Verilog function?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;A:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;The following rules distinguish tasks from functions:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;1.&lt;span style=""&gt;   &lt;/span&gt;A function shall execute in one simulation time unit&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt;   &lt;/span&gt;A task can contain time-controlling statements.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;2.&lt;span style=""&gt;   &lt;/span&gt;A function cannot enable a task&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;A task can enable other tasks or functions.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;3.&lt;span style=""&gt;   &lt;/span&gt;A function shall have at least one input type argument and shall not have an output or inout type argument;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;A task can have zero or more arguments of any type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;4.&lt;span style=""&gt;   &lt;/span&gt;A function shall return a single value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;A task shall not return a value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Q: Given the following Verilog code, what value of "a" is displayed?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;always @(clk) begin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;           &lt;/span&gt;a&lt;span style=""&gt;  &lt;/span&gt;= 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt;         &lt;/span&gt;a &lt;= 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt;        &lt;/span&gt;$display(a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;end&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;A:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;This is a tricky one! Verilog scheduling semantics basically imply a four-level deep queue for the current simulation time:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;   &lt;/span&gt;1: Active Events&lt;span style=""&gt;                &lt;/span&gt;(blocking statements)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;   &lt;/span&gt;2: Inactive Events&lt;span style=""&gt;              &lt;/span&gt;(#0 delays, etc)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;   &lt;/span&gt;3: Non-Blocking Assign Updates&lt;span style=""&gt;  &lt;/span&gt;(non-blocking statements)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;   &lt;/span&gt;4: Monitor Events&lt;span style=""&gt;               &lt;/span&gt;($display, $monitor, etc).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Since the "a = 0" is an active event, it is scheduled into the 1st "queue". The "a &lt;= 1" is a non-blocking event, so it's placed into the 3rd queue. Finally, the display statement is placed into the 4th queue. Only events in the active queue are completed this sim cycle, so the "a = 0" happens, and then the display shows a = 0.&lt;span style=""&gt;  &lt;/span&gt;If we were to look at the value of a in the next sim cycle, it would show 1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Q: Given the following snippet of Verilog code, draw out the waveforms for clk and a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;always @(clk) begin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;           &lt;/span&gt;&lt;span style=""&gt;   &lt;/span&gt;a = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;           &lt;/span&gt;#5 a = 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;end&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;A:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;       &lt;/span&gt;10&lt;span style=""&gt;      &lt;/span&gt;30&lt;span style=""&gt;      &lt;/span&gt;50&lt;span style=""&gt;      &lt;/span&gt;70&lt;span style=""&gt;      &lt;/span&gt;90&lt;span style=""&gt;     &lt;/span&gt;110&lt;span style=""&gt;     &lt;/span&gt;130&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;clk ___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;a&lt;span style=""&gt;   &lt;/span&gt;___________________________________________________________&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;This obviously is not what we wanted, so to get closer, you could use "always @ (posedge clk)" instead, and you'd get&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;       &lt;/span&gt;10&lt;span style=""&gt;      &lt;/span&gt;30&lt;span style=""&gt;      &lt;/span&gt;50&lt;span style=""&gt;      &lt;/span&gt;70&lt;span style=""&gt;      &lt;/span&gt;90&lt;span style=""&gt;     &lt;/span&gt;110&lt;span style=""&gt;     &lt;/span&gt;130&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;clk ___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                            &lt;/span&gt;___&lt;span style=""&gt;                     &lt;/span&gt;___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;a&lt;span style=""&gt;   &lt;/span&gt;_______________________|&lt;span style=""&gt;   &lt;/span&gt;|___________________|&lt;span style=""&gt;   &lt;/span&gt;|_______&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Q: What is the difference between the following two lines of Verilog code?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;#5 a = b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;a = #5 b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;A:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;#5 a = b;&lt;span style=""&gt;  &lt;/span&gt;Wait five time units before doing the action for "a = b;".&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;           &lt;/span&gt;The value assigned to a will be the value of b 5 time units hence.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;a = #5 b;&lt;span style=""&gt;  &lt;/span&gt;The value of b is calculated and stored in an internal temp register.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;           &lt;/span&gt;After five time units, assign this stored value to a.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Q: What is the difference between:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;c = foo ? a : b; and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;if (foo) c = a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;else&lt;span style=""&gt;     &lt;/span&gt;c = b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;A:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;The ? merges answers if the condition is "x", so for instance if foo = 1'bx, a = 'b10, and b = 'b11, you'd get c = 'b1x.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;On the other hand, if treats Xs or Zs as FALSE, so you'd always get c = b. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Q: Using the given, draw the waveforms for the following versions of a (each version is separate, i.e. not in the same run):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;reg clk;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;reg a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;always #10 clk = ~clk;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;(1) always @(clk) a = #5&lt;span style=""&gt;  &lt;/span&gt;clk;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;(2) always @(clk) a = #10 clk;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;(3) always @(clk) a = #15 clk;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;Now, change a to wire, and draw for:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;(4) assign #5&lt;span style=""&gt;  &lt;/span&gt;a = clk;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;(5) assign #10 a = clk;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;     &lt;/span&gt;(6) assign #15 a = clk;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;A:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;10&lt;span style=""&gt;      &lt;/span&gt;30&lt;span style=""&gt;      &lt;/span&gt;50&lt;span style=""&gt;      &lt;/span&gt;70&lt;span style=""&gt;      &lt;/span&gt;90&lt;span style=""&gt;     &lt;/span&gt;110&lt;span style=""&gt;     &lt;/span&gt;130&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;clk ___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;          &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;(1)a ____|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;(2)a ______|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;(3)a __________________________________________________________&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Since the #delay cancels future events when it activates, any delay over the actual 1/2 period time of the clk flatlines...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;With changing a to a wire and using assign, we just accomplish the same thing...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;       &lt;/span&gt;10&lt;span style=""&gt;      &lt;/span&gt;30&lt;span style=""&gt;      &lt;/span&gt;50&lt;span style=""&gt;      &lt;/span&gt;70&lt;span style=""&gt;      &lt;/span&gt;90&lt;span style=""&gt;     &lt;/span&gt;110&lt;span style=""&gt;     &lt;/span&gt;130&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;clk ___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;          &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;(4)a ____|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;span style=""&gt;     &lt;/span&gt;___&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;(5)a ______|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;span style=""&gt;   &lt;/span&gt;|___|&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;(6)a __________________________________________________________&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-2577750450381938415?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/2577750450381938415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=2577750450381938415' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2577750450381938415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2577750450381938415'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/09/verilog-questions.html' title='Verilog Questions'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-8136636611528567909</id><published>2008-09-05T20:13:00.001+05:30</published><updated>2008-09-05T20:16:50.357+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Rules for govering usage of a verilog Function</title><content type='html'>&lt;span style="font-family: verdana;"&gt;The following rules govern the usage of a Verilog function construct:&lt;/span&gt;&lt;br /&gt;&lt;ul style="font-family: verdana;"&gt;&lt;li&gt;A function cannot advance simulation-time, using constructs like #, @.etc.&lt;/li&gt;&lt;li&gt;A function shall not have nonblocking assignments.&lt;/li&gt;&lt;li&gt;A function without a range defaults to a one bit reg for the return value.&lt;/li&gt;&lt;li&gt;It is illegal to declare another object with the same name as the function in the scope where the function is declared&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/469081173588188170-8136636611528567909?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/8136636611528567909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=8136636611528567909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/8136636611528567909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/8136636611528567909'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/09/rules-for-govering-usage-of-verilog.html' title='Rules for govering usage of a verilog Function'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-4841194123006118132</id><published>2008-09-05T16:32:00.000+05:30</published><updated>2008-09-05T16:33:17.114+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='STA'/><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><title type='text'>Synthesis Questions</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;b&gt; What are the various Design constraints used while performing Synthesis for a design?&lt;/b&gt;&lt;br /&gt;Ans:  1. Create the clocks (frequency, duty-cycle).&lt;br /&gt; 2. Define the transition-time requirements for the input-ports&lt;br /&gt; 3. Specify the load values for the output ports&lt;br /&gt; 4. For the inputs and the output specify the delay values(input delay and ouput delay), which are  already consumed by the neighbour chip.&lt;br /&gt; 5. Specify the case-setting (in case of a mux) to report the timing to a specific paths.&lt;br /&gt; 6. Specify the false-paths in the design&lt;br /&gt; 7. Specify the multi-cycle paths in the design.&lt;br /&gt; 8. Specify the clock-uncertainity values(w.r.t jitter and the margin values for setup/hold).&lt;br /&gt; 19. Specify few verilog constructs which are not supported by the synthesis tool.  &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;What are the various design changes you do to meet design power targets?&lt;/b&gt;&lt;br /&gt;Ans: Design with Multi-VDD designs, Areas which requires high performance, goes with high VDD and areas which needs low-performance are working with low Vdd's, by creating Voltage-islands and making sure that appropriate level-shifters are placed in the cross-voltage domains Designing with Multi-Vt's(threshold voltages), areas which require high performance, goes with low Vt, but takes lot of leakage current, and areas which require low performance with high Vt cells, which has low leakage numbers, by incorporating this design process, we can reduce the leakage power. As in the design , clocks consume more amount of power, placing optimal clock-gating cells, in the design and controlling them by the module enable's gives a lot of power-savings.&lt;br /&gt;As clock-tree's always switch making sure that most number of clock-buffers are after the clock-gating cells, this reduces the switching there by power-reduction.&lt;br /&gt;Incorporating Dynamic Voltage and Frequency scaling (DVFS) concepts based on the application , there by reducing the systems voltage and frequency numbers when the application does not require to meet the performance targets. Ensure the design with IR-Drop analysis and ground-bounce analysis, is with-in the design specification requirement. Place power-switches, so that the leakage power can be reduced. related information.&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt; what is meant by Library Characterizing&lt;/b&gt;&lt;br /&gt;Ans: Characterization in terms of delay, power consumption,..  &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt; what is meant by wireload model &lt;/b&gt;&lt;br /&gt;Ans: In the synthesis tool, in order to model the wires we use a concept called as "Wireload models", Now the question is what is wireload models: Wireload models are statistical based on models with respect to fanout. say for a particular technology based on our previous chip experience we have a rough estimate we know if a wire goes for "n" number of fanin then we estimate its delay as say "x" delay units. So a model file is created with the fanout numbers and corresponding estimated delay values. This file is used while performing Synthesis to estimate the delay for Wires, and to estimate the delay for cells, technology specific library model files will be available&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt; what are the measures to be taken to design for optimized area&lt;/b&gt;&lt;br /&gt;Ans: As silicon real-estate is very costly and saving is directly propotional to the company's revenue generation lot of emphasize is to design which has optimial utilization in the area-front. The steps to reduce area are&lt;br /&gt;If the path is not timing-critical, then optimize the cells to use the low-drive strength cells so that there will saving in the area. Abut the VDD rows Analyzing the utilization numbers with multiple floor-planning versions which brings up with optimized area targets.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt; what all will you be thinking while performing floorplan&lt;/b&gt;&lt;br /&gt;Ans: Study the data-flow graph of the design and place the blocks accordingly, to reducing the weighted sum of area, wire-length. Minimize the usuage of blocks other-than square shapes, having notches Place the blocks based on accessibility/connectivity, thereby reducing wire-length. Abut the memory, if the pins are one-sided, there-by area could be reduced. If the memory communicates to the outside world more frequently , then placing at the boundary makes much of a sense. Study the number of pins to be routed, with the minimum metal width allowed , estimate the routability issues. Study the architecture and application , so that the blocks which will be enabled should be scattered, to reduce the power-ground noise.&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;what are the measures in the Design taken for Meeting Signal-integrity targets&lt;/b&gt;&lt;br /&gt;Ans: As more and more devices are getting packed, results in more congested areas, and coupling capactiances dominating the wire-capacitance, creates SI violations. Let's see now by what are all the measures we can reduce/solve it.&lt;br /&gt;As clock-tree runs across the whole chip, optimizing the design for SI, is essential route the clock with double-pitch and triple spacing. In-case of SI violation, spacing the signal nets reduces cross-talk impacts.&lt;br /&gt; Shield the nets with power-nets for high frequency signal nets to prevent from SI.&lt;br /&gt;Enable SI aware routing , so that the tool takes care for SI&lt;br /&gt;Ensure SI enabled STA runs, and guarantee the design meeting the SI requirements&lt;br /&gt;Route signals on different layers orthogonal to each other&lt;br /&gt;Minimize the parallel run-length wires, by inserting buffers.&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/469081173588188170-4841194123006118132?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/4841194123006118132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=4841194123006118132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4841194123006118132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4841194123006118132'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/09/synthesis-questions.html' title='Synthesis Questions'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-2147276022860527656</id><published>2008-09-05T15:11:00.001+05:30</published><updated>2008-09-05T15:11:52.687+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><title type='text'>VLSI Concepts questions</title><content type='html'>&lt;ol&gt;&lt;li&gt;Explain why &amp;amp; how a MOSFET works&lt;/li&gt;&lt;li&gt;Draw Vds-Ids curve for a MOSFET. Now, show how this curve changes (a) with increasing Vgs (b) with increasing transistor width (c) considering Channel Length Modulation&lt;/li&gt;&lt;li&gt;Explain the various MOSFET Capacitances &amp;amp; their significance&lt;/li&gt;&lt;li&gt;Draw a CMOS Inverter. Explain its transfer characteristics&lt;/li&gt;&lt;li&gt;Explain sizing of the inverter&lt;/li&gt;&lt;li&gt;How do you size NMOS and PMOS transistors to increase the threshold voltage?&lt;/li&gt;&lt;li&gt;What is Noise Margin? Explain the procedure to determine Noise Margin&lt;/li&gt;&lt;li&gt;Give the expression for CMOS switching power dissipation&lt;/li&gt;&lt;li&gt;What is Body Effect?&lt;/li&gt;&lt;li&gt;Describe the various effects of scaling&lt;/li&gt;&lt;li&gt;Give the expression for calculating Delay in CMOS circuit&lt;/li&gt;&lt;li&gt;What happens to delay if you increase load capacitance?&lt;/li&gt;&lt;li&gt;What happens to delay if we include a resistance at the output of a CMOS circuit?&lt;/li&gt;&lt;li&gt;What are the limitations in increasing the power supply to reduce delay?&lt;/li&gt;&lt;li&gt;How does Resistance of the metal lines vary with increasing thickness and increasing length?&lt;/li&gt;&lt;li&gt;You have three adjacent parallel metal lines. Two out of phase signals pass through the outer two metal lines. Draw the waveforms in the center metal line due to interference. Now, draw the signals if the signals in outer metal lines are in phase with each other&lt;/li&gt;&lt;li&gt;What happens if we increase the number of contacts or via from one metal layer to the next?&lt;/li&gt;&lt;li&gt;Draw a transistor level two input NAND gate. Explain its sizing (a) considering Vth (b) for equal rise and fall times&lt;/li&gt;&lt;li&gt;Let A &amp;amp; B be two inputs of the NAND gate. Say signal A arrives at the NAND gate later than signal B. To optimize delay, of the two series NMOS inputs A &amp;amp; B, which one would you place near the output?&lt;/li&gt;&lt;li&gt;Draw the stick diagram of a NOR gate. Optimize it&lt;/li&gt;&lt;li&gt;For CMOS logic, give the various techniques you know to minimize power consumption&lt;/li&gt;&lt;li&gt;What is Charge Sharing? Explain the Charge Sharing problem while sampling data from a Bus&lt;/li&gt;&lt;li&gt;Why do we gradually increase the size of inverters in buffer design? Why not give the output of a circuit to one large inverter?&lt;/li&gt;&lt;li&gt;In the design of a large inverter, why do we prefer to connect small transistors in parallel (thus increasing effective width) rather than lay out one transistor with large width?&lt;/li&gt;&lt;li&gt;Given a layout, draw its transistor level circuit. (I was given a 3 input AND gate and a 2 input Multiplexer. You can expect any simple 2 or 3 input gates)&lt;/li&gt;&lt;li&gt;Give the logic expression for an AOI gate. Draw its transistor level equivalent. Draw its stick diagram&lt;/li&gt;&lt;li&gt;Why don't we use just one NMOS or PMOS transistor as a transmission gate?&lt;/li&gt;&lt;li&gt;For a NMOS transistor acting as a pass transistor, say the gate is connected to VDD, give the output for a square pulse input going from 0 to VDD&lt;/li&gt;&lt;li&gt;Draw a 6-T SRAM Cell and explain the Read and Write operations&lt;/li&gt;&lt;li&gt;Draw the Differential Sense Amplifier and explain its working. Any idea how to size this circuit? (Consider Channel Length Modulation)&lt;/li&gt;&lt;li&gt;What happens if we use an Inverter instead of the Differential Sense Amplifier?&lt;/li&gt;&lt;li&gt;Draw the SRAM Write Circuitry&lt;/li&gt;&lt;li&gt;Approximately, what were the sizes of your transistors in the SRAM cell? How did you arrive at those sizes?&lt;/li&gt;&lt;li&gt;How does the size of PMOS Pull Up transistors (for bit &amp;amp; bit- lines) affect SRAM's performance?&lt;/li&gt;&lt;li&gt;What's the critical path in a SRAM?&lt;/li&gt;&lt;li&gt;Draw the timing diagram for a SRAM Read. What happens if we delay the enabling of Clock signal?&lt;/li&gt;&lt;li&gt;Give a big picture of the entire SRAM Layout showing your placements of SRAM Cells, Row Decoders, Column Decoders, Read Circuit, Write Circuit and Buffers&lt;/li&gt;&lt;li&gt;In a SRAM layout, which metal layers would you prefer for Word Lines and Bit Lines? Why?&lt;/li&gt;&lt;li&gt;How can you model a SRAM at RTL Level?&lt;/li&gt;&lt;li&gt;Whatï¿½s the difference between Testing &amp;amp; Verification?&lt;/li&gt;&lt;li&gt;For an AND-OR implementation of a two input Mux, how do you test for Stuck-At-0 and Stuck-At-1 faults at the internal nodes? (You can expect a circuit with some redundant logic)&lt;/li&gt;&lt;li&gt;What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up? &lt;/li&gt;&lt;/ol&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/469081173588188170-2147276022860527656?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/2147276022860527656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=2147276022860527656' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2147276022860527656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2147276022860527656'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/09/vlsi-concepts-questions.html' title='VLSI Concepts questions'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-8523340020689127846</id><published>2008-09-05T15:10:00.001+05:30</published><updated>2008-09-05T15:10:39.698+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><title type='text'>Digital Design questions</title><content type='html'>&lt;ol&gt;&lt;li&gt;Give two ways of converting a two input NAND gate to an inverter  &lt;/li&gt;&lt;li&gt;Given a circuit, draw its exact timing response. (I was given a Pseudo Random Signal Generator; you can expect any sequential ckt) &lt;/li&gt;&lt;li&gt;What are set up time &amp;amp; hold time constraints? What do they signify? Which one is critical for estimating maximum clock frequency of a circuit? &lt;/li&gt;&lt;li&gt;Give a circuit to divide frequency of clock cycle by two  &lt;/li&gt;&lt;li&gt;Design a divide-by-3 sequential circuit with 50% duty circle. (Hint: Double the Clock) &lt;/li&gt;&lt;li&gt;Suppose you have a combinational circuit between two registers driven by a clock. What will you do if the delay of the combinational circuit is greater than your clock signal? (You can't resize the combinational circuit transistors) &lt;/li&gt;&lt;li&gt;The answer to the above question is breaking the combinational circuit and pipelining it. What will be affected if you do this? &lt;/li&gt;&lt;li&gt; What are the different Adder circuits you studied? &lt;/li&gt;&lt;li&gt;Give the truth table for a Half Adder. Give a gate level implementation of the same. &lt;/li&gt;&lt;li&gt; Draw a Transmission Gate-based D-Latch.&lt;/li&gt;&lt;li&gt;Design a Transmission Gate based XOR. Now, how do you convert it to XNOR? (Without inverting the output)&lt;/li&gt;&lt;li&gt;How do you detect if two 8-bit signals are same? &lt;/li&gt;&lt;li&gt;How do you detect a sequence of "1101" arriving serially from a signal line? &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/469081173588188170-8523340020689127846?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/8523340020689127846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=8523340020689127846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/8523340020689127846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/8523340020689127846'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/09/digital-design-questions.html' title='Digital Design questions'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-8283064587068867062</id><published>2008-09-05T15:09:00.001+05:30</published><updated>2008-09-05T15:09:45.294+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><title type='text'>VLSI Interview Questions</title><content type='html'>&lt;p&gt;&lt;strong&gt; what are the differences between SIMULATION and SYNTHESIS &lt;/strong&gt;&lt;/p&gt; &lt;p&gt; Simulation &lt;= verify your design. &lt;br /&gt;synthesis &lt;= Check for your timing&lt;br /&gt;Simulation is used to verify the functionality of the circuit.. a)Functional Simulation:study of ckt's operation independent of timing parameters and gate delays. b) Timing Simulation :study including estimated delays, verify setup,hold and other timing requirements of devices like flip flops are met.&lt;br /&gt;Synthesis:One of the foremost in back end steps where by synthesizing is nothing but converting VHDL or VERILOG description to a set of primitives(equations as in CPLD) or components(as in FPGA'S)to fit into the target technology.Basically the synthesis tools convert the design description into equations or components&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Can u tell me the differences between latches &amp;amp; flipflops?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;There are 2 types of circuits:&lt;br /&gt;1. Combinational&lt;br /&gt;2. Sequential&lt;/p&gt; &lt;p&gt;Latches and flipflops both come under the category of "sequential circuits", whose output depends not only on the current inputs, but also on previous inputs and outputs. &lt;/p&gt; &lt;p&gt;Difference: Latches are level-sensitive, whereas, FF are edge sensitive. By edge sensitive, I mean O/p changes only when there is a clock transition.( from 1 to 0, or from 0 to 1)&lt;/p&gt; &lt;p&gt;Example: In a flipflop, inputs have arrived on the input lines at time= 2 seconds. But, output won't change immediately. At time = 3 seconds, clock transition takes place. After that, O/P will change.&lt;br /&gt;Flip-flops are of 2 types:&lt;br /&gt;1.Positive edge triggered&lt;br /&gt;2. negative edge triggered&lt;/p&gt; &lt;p&gt;1)fllipflops take twice the nymber of gates as latches&lt;br /&gt;2) so automatically delay is more for flipflops&lt;br /&gt;3)power consumption is also more&lt;/p&gt; &lt;p&gt;latch does    not have a clock signal, whereas a flip-flop always does.&lt;br /&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;What is slack?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The slack is the time delay difference from the expected delay(1/clock) to the actual delay in a particular path. &lt;br /&gt;Slack may be +ve or -ve.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p align="left"&gt;&lt;strong&gt;Equivalence between VHDL and C?&lt;/strong&gt;&lt;/p&gt; &lt;p align="left"&gt;There is concept of understanding in C there is structure.Based upon requirement structure provide facility to store collection of different data types.&lt;/p&gt; &lt;p align="left"&gt;In VHDL we have direct access to memory so instead of using pointer in C (and member of structure) we can write interface store data in memory and access it.&lt;/p&gt; &lt;p align="left"&gt; &lt;/p&gt; &lt;p align="left"&gt;&lt;strong&gt;RTL and Behavioral&lt;/strong&gt; &lt;/p&gt; &lt;p align="left"&gt;Register transfer language means there should be data flow between two registers and logic is in between them for end registers data should flow.&lt;/p&gt; &lt;p align="left"&gt;Behavioral means how hardware behave determine the exact way it works we write using HDL syntax.For complex projects it is better mixed approach or more behavioral is used.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-8283064587068867062?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/8283064587068867062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=8283064587068867062' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/8283064587068867062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/8283064587068867062'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/09/vlsi-interview-questions.html' title='VLSI Interview Questions'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-7581417409369742535</id><published>2008-08-11T22:34:00.003+05:30</published><updated>2008-08-11T22:43:09.870+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Digital design'/><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>What is a Race ? How to avoid it ?</title><content type='html'>&lt;span style="font-size:78%;"&gt;In this topic, i would like to address races, their causes, implications &amp;amp;&lt;br /&gt;preventions.&lt;br /&gt;&lt;br /&gt;Definition :&lt;span style="font-style: italic;"&gt; A Race condition occurs when two or more processes attempt to&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;access a target simultaneously.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Types of Races&lt;br /&gt;I)      Races in UDPs&lt;br /&gt;II)    Loops&lt;br /&gt;III)  Contention races&lt;br /&gt;&lt;br /&gt;I) Races in UDPs&lt;br /&gt; Race condition in UDP is caused by 2 conflicting rows in the table&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;&lt;br /&gt; primitive udp(q, a, b);&lt;br /&gt;   output q;&lt;br /&gt;   input a, b;&lt;br /&gt;   reg q;&lt;br /&gt;     table // a b : q : q+&lt;br /&gt;       r 0 : 0 : 0 ;&lt;br /&gt;       0 r : 0 : 1 ;&lt;br /&gt;     endtable&lt;br /&gt; endprimitive&lt;br /&gt;&lt;br /&gt;Solution :&lt;br /&gt; These kind of races are uncommon. Most of the UDPs used in the ASIC&lt;br /&gt; design comes from ASIC library vendor, So refer to your library vendor&lt;br /&gt; about this problem or another strategy is to combine the conflicting rows&lt;br /&gt; into a single row&lt;br /&gt;&lt;br /&gt;II) Races in LOOPS&lt;br /&gt; Races in loops can further be simplified into&lt;br /&gt;&lt;br /&gt; a) Combinational Loops&lt;br /&gt; b) Data Loops&lt;br /&gt; c) Simulation Loops&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Combinational Loop is a path in the code, that feeds back upon itself,  yet&lt;br /&gt;has no state devices in the path.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt; module CMBLOP (o, a, b, c);&lt;br /&gt;   output o;&lt;br /&gt;   input a, b, c;&lt;br /&gt;   reg o;&lt;br /&gt;     wire m = a | o;&lt;br /&gt;     wire n = b | m;&lt;br /&gt;   always @(c or n)&lt;br /&gt;     o = c | n;&lt;br /&gt; endmodule&lt;br /&gt;&lt;br /&gt;Solution :&lt;br /&gt; There is no fixed rule to actually break the combinational loop, a&lt;br /&gt; detailed understanding has to be required before breaking the loop. If&lt;br /&gt; there is no problem with the functionality, insert a Flop in between the&lt;br /&gt; feeback path. Remember all the combinational path have to broken for the&lt;br /&gt; timing purpose.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A Data loop is a path in the design that feeds back upon itself between two or&lt;br /&gt;more processes and has one or more latches in its path.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt; module DATLOP;&lt;br /&gt;   reg q, d, e;&lt;br /&gt; &lt;br /&gt;   always @ (e or d) //latch&lt;br /&gt;     if (e)&lt;br /&gt;       q = d;&lt;br /&gt;&lt;br /&gt;   always @ (q)&lt;br /&gt;     d = ~q;&lt;br /&gt;&lt;br /&gt; endmodule // DATLOP&lt;br /&gt;&lt;br /&gt;Designer has take outmost care to avoid such things as it can lead to&lt;br /&gt;infinte loop if the enable is made continuously high. A detailed&lt;br /&gt;understanding of the functionality is required to break the loop.&lt;br /&gt;&lt;br /&gt;A simulation loop is one where there is no data flow between two or more&lt;br /&gt;processes but there is a simulation feedback path.&lt;br /&gt;&lt;br /&gt;Example.&lt;br /&gt;&lt;br /&gt; module SIMLOP;&lt;br /&gt;   wire a, c;&lt;br /&gt;   reg b;&lt;br /&gt; &lt;br /&gt;   always @ (a or c) begin&lt;br /&gt;     b = a;&lt;br /&gt;   end&lt;br /&gt; &lt;br /&gt;   assign c = b;&lt;br /&gt;&lt;br /&gt; endmodule&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;III) Contention Races&lt;br /&gt;&lt;br /&gt;Verilog has a special provision for concurrent processes. Two different simulators&lt;br /&gt;can simulate two concurrent processes in a different order. Because of this&lt;br /&gt;ambiguity, you may get different simulation behavior from different simulators&lt;br /&gt;for the same Verilog description.&lt;br /&gt;&lt;br /&gt;A contention race occurs when the order of execution of multiple concurrent&lt;br /&gt;Verilog processes can affect the simulation behavior.&lt;br /&gt;&lt;br /&gt;Most races are not found until the Verilog description is ported to a different&lt;br /&gt;Verilog simulator, or they are never found, even after synthesis. Discovering&lt;br /&gt;the unstable behavior after the chip is fabricated is very expensive.&lt;br /&gt;&lt;br /&gt;There are two reasons why a simulator cannot find races&lt;br /&gt;i) A simulator usually has a fixed scheduling mechanism; when two processes are&lt;br /&gt;in the event queue, one is always executed before the other. However, the real&lt;br /&gt;chip performs all the computation in parallel; hence, one process may or may&lt;br /&gt;not be executed before the other.&lt;br /&gt;ii) A simulator does the simulation according to the test vectors. If the test&lt;br /&gt;vectors do not include the case that will result in the race, the simulator has&lt;br /&gt;no way to discover it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A race occurs when two or more processes attempt to access a target simultaneously.&lt;br /&gt;Different types of races are&lt;br /&gt;i)   Write – Write&lt;br /&gt;ii)  Read – Write&lt;br /&gt;iii) Trigger propagation races&lt;br /&gt;&lt;br /&gt;i) Write - Write Contention Race&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt; module wr_wr_race (clk, a, b); //Write – Write Race&lt;br /&gt;   input clk,b;&lt;br /&gt;   output a;&lt;br /&gt;   wire d1, d2;&lt;br /&gt;   reg c1, c2, a;&lt;br /&gt;   &lt;br /&gt;   always @(posedge clk) c1 = b;&lt;br /&gt;   always @(posedge clk) c2 = ~b;&lt;br /&gt;   assign d1 = c1;assign d2 = c2;&lt;br /&gt;   always @(d1) a = d1;&lt;br /&gt;   always @(d2) a = d2;&lt;br /&gt;   &lt;br /&gt; endmodule&lt;br /&gt;&lt;br /&gt;Solution :&lt;br /&gt; Write-Write Race are type of bus contention.Usually, write-write races&lt;br /&gt; are resolved by combining the writes into single process.&lt;br /&gt;&lt;br /&gt;ii) Read - Write Contention Race&lt;br /&gt;&lt;br /&gt;Read-write races occur when two concurrent processes attempt to access the same&lt;br /&gt;register. One process is trying to write a new value into the register and the&lt;br /&gt;other process is trying to read a value out of the register.&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;&lt;br /&gt; always @(posedge clk) /* write process */&lt;br /&gt; status_reg = new_val;&lt;br /&gt; always @(posedge clk) /* read process */&lt;br /&gt; status_output = status_reg;&lt;br /&gt;&lt;br /&gt;Solution :&lt;br /&gt; Use of non-blocking statement instead of blocking statements.&lt;br /&gt;&lt;br /&gt;iii) Trigger Propagation Race&lt;br /&gt;&lt;br /&gt;A trigger propagation race involves three processes. The first two processes&lt;br /&gt;are concurrent and their order of execution is indeterminate. The third process&lt;br /&gt;is sensitive to two signals.  Each of these two signals are assigned in one of&lt;br /&gt;the first two processes.&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;&lt;br /&gt; // process 1&lt;br /&gt; always @(posedge clk)&lt;br /&gt;   if (condition1) a = 1'b1;&lt;br /&gt; // process 2&lt;br /&gt; always @(posedge clk)&lt;br /&gt;   if (condition2) b = 1'b1;&lt;br /&gt; // process 3&lt;br /&gt; always @(a or b)&lt;br /&gt;   if(a || b) count = count + 1;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;"Guidelines for Avoiding Race Conditions:[1]"&lt;br /&gt;1. If a register is declared outside of the always or initial block, assign to it using a nonblocking&lt;br /&gt;assignment. Reserve the blocking assignment for registers local to the block.&lt;br /&gt;2. Assign to a register from a single always or initial block.&lt;br /&gt;3. Use continuous assignments to drive inout pins only. Do not use them to model internal&lt;br /&gt;conbinational functions. Prefer sequential code instead.&lt;br /&gt;4. Do not assign any value at time 0.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[1] Janick Bergeron, Writing Testbenches, Functional Verification of HDL Models, Kluwer&lt;br /&gt;Academic Publishers, 2000, pg. 147. (flawed race avoidance guidelines)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-7581417409369742535?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/7581417409369742535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=7581417409369742535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/7581417409369742535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/7581417409369742535'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/what-is-race-how-to-avoid-it.html' title='What is a Race ? How to avoid it ?'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-2907386508246962406</id><published>2008-08-09T23:00:00.002+05:30</published><updated>2008-08-09T23:08:23.177+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional verification'/><title type='text'>Functional Coverage vs Code Coverage</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Code coverage is a measure of what parts of the RTL implementation were  executed by your simulator while running the testcases.&lt;br /&gt;&lt;br /&gt;Functional  coverage is a measure of the level of &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;Functionality &lt;/span&gt;&lt;/span&gt;of the RTL covered by the  testcases. Unlike code coverage the metric in Functional coverage i.e. the &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;Functionality&lt;/span&gt;&lt;/span&gt; is defined by us using  functional coverage groups. There are various technologies available to define  these functional coverage points and to know if they were reached.&lt;br /&gt;&lt;br /&gt;Both  metrics are good and give different information about verification suite's  quality.&lt;br /&gt;&lt;br /&gt;Various flavors of code coverage metric tells us about how good  is the Stimulus to the Design Under Test.For e.g some lines are not covered or  some signals are not toggled, it means that the testbench and testcases are not  good enough to make the design reach these states.&lt;br /&gt;Code coverage cannot tell  us any relation between to different pieces of rtl code. E.g. Whether two  signals toggled together...or whether read-logic of block A and write logic of  block B was excited at the same time? .It can only tell us if a signal ever  toggled or if a logic code was ever reached.&lt;br /&gt;&lt;br /&gt;Functional coverage points  are an indicator coverage of the design's functional state. A functional state  can be achieved by combination of different pieces of code or different signals.  So its is a bit stronger metric to measure verification completion. But by  definition the functional coverage metric is very subjective. The goodness of a  functional coverage report is only as good as the functional coverage points and  its implementation.&lt;br /&gt;&lt;br /&gt;For any coverage metric to hold any meaning, it  should be coupled with a good checking mechanism for all the testcases. There is  no point in reaching a state of design or exciting a logic and not checking if  design responds as expected in that state.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The intent of code and functional coverage differs:&lt;br /&gt;&lt;br /&gt;Code Coverage :&lt;br /&gt;1.  there is no need to use Spec at all.&lt;br /&gt;2.It verifies test cases completeness  in terms of hitting every line, every expression etc of the RTL code.&lt;br /&gt;3.Also, it verifies for the non-accessable (dead) code and some other  code-related checks&lt;br /&gt;&lt;br /&gt;Functional Coverage :&lt;br /&gt;1. it verifies not only RTL  against Spec, but also Spec against higher-level system requirements.&lt;br /&gt;2.Performance verification may reveal functional spec deficiencies as well  as deep functional bugs too.&lt;br /&gt;&lt;/span&gt;&lt;!-- m --&gt;&lt;!-- m --&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-2907386508246962406?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/2907386508246962406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=2907386508246962406' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2907386508246962406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2907386508246962406'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/functional-coverage-vs-code-coverage.html' title='Functional Coverage vs Code Coverage'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-557691743612492637</id><published>2008-08-08T23:03:00.002+05:30</published><updated>2008-08-08T23:07:05.518+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>Soft macro Vs Hard macro?</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;b&gt;Soft macro Vs Hard macro?&lt;/b&gt;&lt;br /&gt;Soft macro and Hard macro are categorized as IP's while being optimized for power, area and performance. When buying IP and evaluation study is usually made to weigh advantages and disadvantages of one type of macro over the other like hardware compatibility issues like the different I/O standards within the design, and compatibility to reuse methodology followed by design houses.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Soft macros?&lt;/b&gt;&lt;br /&gt;Soft macros are used in SOC implementations. Soft macros are in synthesizable RTL form, are more flexible than Hard macros in terms of reconfigurability. Soft macros are not specific to any manufacturing process and have the disadvantage of being unpredictable in terms of timing, area, performance, or power. Soft macros carry greater IP protection risks because RTL source code is more portable and therefore, less easily protected than either a netlist or physical layout data. Soft macros are editable and can contain standard cells, hard macros, or other soft macros.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Hard macro?&lt;/b&gt;&lt;br /&gt;Hard macos are targeted for specific IC manufacturing technology. They are block level designs which are optimized for power or area or timing and silicon tested. While accomplishing physical design it is possible to only access pins of hard macros unlike soft macros which allows us to manipulate the RTL. Hard macro is a block that is generated in a methodology other than place and route ( i.e. using full custom design methodology) and is imported into the physical design database (eg. Volcano in Magma) as a GDS2 file.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-557691743612492637?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/557691743612492637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=557691743612492637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/557691743612492637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/557691743612492637'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/soft-macro-vs-hard-macro.html' title='Soft macro Vs Hard macro?'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-8189520570458793329</id><published>2008-08-08T21:33:00.001+05:30</published><updated>2008-08-08T21:35:51.741+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional verification'/><title type='text'>What is verification</title><content type='html'>&lt;span style="font-size:85%;"&gt;Verification is a huge topic and a number of books exist on the subject. As a goal of this blog, treatment of the topic has to be limited to a few aspects only.&lt;br /&gt;&lt;br /&gt;Wrong functionality which does not meet the end specification results in products which dont meet customer expectations. Hence verification of the design is needed to make sure that the end specification is met and corrective actions are taken on designs which dont meet them. If verification does not catch a bug in design, wrong designs get out in to the market.&lt;br /&gt;&lt;br /&gt;Coverage metrics are defined by most verification engineers. Based on the level of representation, here are a few coverage metrics..&lt;br /&gt;&lt;br /&gt;1. Code based metrics (HDL code)&lt;br /&gt;2. Circuit structure based metrics (Netlist)&lt;br /&gt;3. State-space based metrics (State Transition Graphs)&lt;br /&gt;4. Functionality based metrics (User defined Tasks)&lt;br /&gt;5. Spec based metrics (Formal or executable spec)&lt;br /&gt;&lt;br /&gt;There are many branches to verification of digital systems.&lt;br /&gt;&lt;br /&gt;Below we list a couple of them&lt;br /&gt;&lt;br /&gt;1. Simulation (for digital systems)&lt;br /&gt;2. Advanced formal verification of Hardware [equivalence checking, Assertions, Model Checking]&lt;br /&gt;3. Hardware Acceleration (FPGA/Emulation), or hardware/software co-design for simulation..&lt;br /&gt;&lt;br /&gt;Simulation aims to verify a given design specification. This is achieved by building a computer model of the hardware being designed and executing the model to analyze it's behavior. For the model to be accurate, it has to include as much information in it as possible to be of any realistic value. At the same time, the model should not consume too much computer memory and operations on the model should not be run time intensive.&lt;br /&gt;&lt;br /&gt;There are numerous levels of abstraction at which simulation can be performed..&lt;br /&gt;1. Device level&lt;br /&gt;2. Circuit level&lt;br /&gt;3. Timing and macro level&lt;br /&gt;4. Logic or gate level&lt;br /&gt;5. RTL level&lt;br /&gt;6. Behavioral level&lt;br /&gt;&lt;br /&gt;The specification (for the computer model) for a digital system is usually written at a behavioral level or RTL level (we will discuss more about gate level sim later!) :). In addition to the design requirements in the spec, more behavioral or RTL code is written in the form of a wrapper (test bench) around the original design to test and see if the design meets the design intent. The wrapper logic probes the design with functional vectors, collects the responses and verifies them against the expectated response.&lt;br /&gt;&lt;br /&gt;A simulator has a kernel to process an input description and apply stimuli on it and represent the result to an end user on a waveform viewer. Internally it creates models for gates, delay, connectivity and numerous other variables.&lt;br /&gt;&lt;br /&gt;There are various logic simulators available from numerous CAD vendors. (ModelSim, ncVerilog, VCS). Most of these simulators are a combination of event driven and cycle based mechanisms. They can also handle mixed language designs (VHDL+verilog) and adhere mostly to the Language specification which the IEEE standards committee comes out with. Some of these simulators are mixed mode simulator, i.e they can handle multiple levels of abstraction.&lt;br /&gt;&lt;br /&gt;Verification technology has matured over the years. We have many more mechanisms in place apart from simulation.&lt;br /&gt;&lt;br /&gt;I will try to list a few of them below and we will cover each one in the future&lt;br /&gt;&lt;br /&gt;Detection: Simulation, Lint Tools, Semi-formal, Random generators, Formal verification&lt;br /&gt;Debug and comprehension: waveforms, debug systems, Behavior based systems which use formal technology&lt;br /&gt;Infrastructure: Intelligent testbenches, Hardware Verification Langauages, Assertions&lt;br /&gt;&lt;br /&gt;A good reference for verification is "writing Test benches by Janick Bergeron". &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-8189520570458793329?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/8189520570458793329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=8189520570458793329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/8189520570458793329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/8189520570458793329'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/what-is-verification.html' title='What is verification'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-5182359076147379813</id><published>2008-08-08T20:20:00.006+05:30</published><updated>2008-08-08T20:36:03.691+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Timing Analysis'/><title type='text'>Power Gating</title><content type='html'>&lt;span style="color: rgb(204, 204, 204);font-size:85%;" &gt;&lt;span style="font-family:verdana;"&gt;Power Gating is effective for reducing leakage power [3]. &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(204, 204, 204);"&gt;Power gating is the technique wherein circuit blocks that are not in use are temporarily turned off to reduce the overall leakage power of the chip. This temporary shutdown time can also call as "low power mode" or "inactive mode". When circuit blocks are required for operation once again they are activated to "active mode". These two modes are switched at the appropriate time and in the suitable manner to maximize power performance while minimizing impact to performance. Thus goal of power gating is to minimize leakage power by temporarily cutting power off to selective blocks that are not required in that mode&lt;/span&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt; &lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Power gating affects design architecture more compared to the clock gating. It increases time delays as power gated modes have to be safely entered and exited. The possible amount of leakage power saving in such low power mode and the energy dissipation to enter and exit such mode introduces some architectural trade-offs. Shutting down the blocks can be accomplished either by software or hardware. Driver software can schedule the power down operations. Hardware timers can be utilized. A dedicated power management controller is the other option.&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;An externally switched power supply is very basic form of power gating to achieve long term leakage power reduction. To shutoff the block for small interval of time internal power gating is suitable. CMOS switches that provide power to the circuitry are controlled by power gating controllers. Output of the power gated block discharge slowly. Hence output voltage levels spend more time in threshold voltage level. This can lead to larger short circuit current.&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Power gating uses low-leakage PMOS transistors as header switches to shut off power supplies to parts of a design in standby or sleep mode. NMOS footer switches can also be used as sleep transistors. Inserting the sleep transistors splits the chip's power network into a permanent power network connected to the power supply and a virtual power network that drives the cells and can be turned off.&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;The quality of this complex power network is critical to the success of a power-gating design. Two of the most critical parameters are the IR-drop and the penalties in silicon area and routing resources. Power gating can be implemented using cell- or cluster-based (or fine grain) approaches or a distributed coarse-grained approach.&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Power-gating parameters&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Power gating implementation has additional considerations than the normal timing closure implementation. The following parameters need to be considered and their values carefully chosen for a successful implementation of this methodology [1] [2]. &lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul  style="color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Power gate size: &lt;/b&gt;The power gate size must be selected to handle the amount of switching current at any given time. The gate must be bigger such that there is no measurable voltage (IR) drop due to the gate. Generally we use 3X the switching capacitance for the gate size as a rule of thumb. Designers can also choose between header (P-MOS) or footer (N-MOS) gate. Usually footer gates tend to be smaller in area for the same switching current. Dynamic power analysis tools can accurately measure the switching current and also predict the size for the power gate.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul  style="color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Gate control slew rate: &lt;/b&gt;In power gating, this is an important parameter that determines the power gating efficiency. When the slew rate is large, it takes more time to switch off and switch-on the circuit and hence can affect the power gating efficiency. Slew rate is controlled through buffering the gate control signal. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul  style="color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Simultaneous switching capacitance: &lt;/b&gt;This important constraint refers to the amount of circuit that can be switched simultaneously without affecting the power network integrity. If a large amount of the circuit is switched simultaneously, the resulting "rush current" can compromise the power network integrity. The circuit needs to be switched in stages in order to prevent this.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul  style="color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Power gate leakage: &lt;/b&gt;Since power gates are made of active transistors, leakage is an important consideration to maximize power savings.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Fine-grain power gating&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Adding a sleep transistor to every cell that is to be turned off imposes a large area penalty, and individually gating the power of every cluster of cells creates timing issues introduced by inter-cluster voltage variation that are difficult to resolve. Fine-grain power gating encapsulates the switching transistor as a part of the standard cell logic. Switching transistors are designed by either library IP vendor or standard cell designer. Usually these cell designs conform to the normal standard cell rules and can easily be handled by EDA tools for implementation. &lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;The size of the gate control is designed with the worst case consideration that this circuit will switch during every clock cycle resulting in a huge area impact. Some of the recent designs implement the fine-grain power gating selectively, but only for the low Vt cells. If the technology allows multiple Vt libraries, the use of low Vt devices is minimum in the design (20%), so that the area impact can be reduced. When using power gates on the low Vt cells the output must be isolated if the next stage is a high Vt cell. Otherwise it can cause the neighboring high Vt cell to have leakage when output goes to an unknown state due to power gating. &lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Gate control slew rate constraint is achieved by having a buffer distribution tree for the control signals. The buffers must be chosen from a set of always on buffers (buffers without the gate control signal) designed with high Vt cells. The inherent difference between when a cell switches off with respect to another, minimizes the rush current during switch-on and switch-off. &lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Usually the gating transistor is designed as a high vt device. Coarse-grain power gating offers further flexibility by optimizing the power gating cells where there is low switching activity. Leakage optimization has to be done at the coarse grain level, swapping the low leakage cell for the high leakage one. Fine-grain power gating is an elegant methodology resulting in up to 10X leakage reduction. This type of power reduction makes it an appealing technique if the power reduction requirement is not satisfied by multiple Vt optimization alone. &lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Coarse-grain power gating&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;The coarse-grained approach implements the grid style sleep transistors which drives cells locally through shared virtual power networks. This approach is less sensitive to PVT variation, introduces less IR-drop variation, and imposes a smaller area overhead than the cell- or cluster-based implementations. In coarse-grain power gating, the power-gating transistor is a part of the power distribution network rather than the standard cell.&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt;&lt;span style="font-size:85%;"&gt;There are two ways of implementing a coarse-grain structure:&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt;&lt;span style="font-size:85%;"&gt;1) Ring-based&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt;&lt;span style="font-size:85%;"&gt;2) column-based&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul  style="color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Ring-based methodology&lt;/b&gt;: The power gates are placed around the perimeter of the module that is being switched-off as a ring. Special corner cells are used to turn the power signals around the corners. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul  style="color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Column-based methodology&lt;/b&gt;: The power gates are inserted within the module with the cells abutted to each other in the form of columns. The global power is the higher layers of metal, while the switched power is in the lower layers. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Gate sizing depends on the overall switching current of the module at any given time. Since only a fraction of circuits switch at any point of time, power gate sizes are smaller as compared to the fine-grain switches. Dynamic power simulation using worst case vectors can determine the worst case switching for the module and hence the size. IR drop can also be factored into the analysis. Simultaneous switching capacitance is a major consideration in coarse-grain power gating implementation. In order to limit simultaneous switching daisy chaining the gate control buffers, special counters are used to selectively turn on blocks of switches.&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;b&gt;Isolation Cells&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Isolation cells are used to prevent short circuit current. As the name indicates these cells isolate power gated block from the normally on block. Isolation cells are specially designed for low short circuit current when input is at threshold voltage level. Isolation control signals are provided by power gating controller. Isolation of the signals of a switchable module is essential to preserve design integrity. Usually a simple OR or AND logic can function as an output isolation device. Multiple state retention schemes are available in practice to preserve the state before a module shuts down. The simplest technique is to scan out the register values into a memory before shutting down a module. When the module wakes up, the values are scanned back from the memory. &lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;b&gt;Retention Registers&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;When power gating is used, the system needs some form of state retention, such as scanning out data to a RAM, then scanning it back in when the system is reawakened. For critical applications, the memory states must be maintained within the cell, a condition that requires a retention flop to store bits in a table. That makes it possible to restore the bits very quickly during wakeup. Retention registers are special low leakage flip-flops used to hold the data of main register of the power gated block. Thus internal state of the block during power down mode can be retained and loaded back to it when the block is reactivated. Retention registers are always powered up. The retention strategy is design dependent. During the power gating data can be retained and transferred back to block when power gating is withdrawn. Power gating controller controls the retention mechanism such as when to save the current contents of the power gating block and when to restore it back.&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="color: rgb(204, 204, 204);font-size:85%;" &gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;&lt;b&gt;References&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;  &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[1] &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;a href="http://www.eetimes.com/news/design/showArticle.jhtml?articleID=199903073&amp;amp;pgno=1"&gt;&lt;span style="text-decoration: none;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Practical Power Network Synthesis For Power-Gating Designs, &lt;/span&gt;&lt;/span&gt;&lt;img id="snap_com_shot_link_icon" class="snap_preview_icon" style="border: 0pt none ; margin: 0pt ! important; padding: 1px 0pt 0pt; max-height: 2000px; max-width: 2000px; min-width: 0px; min-height: 0px; font-style: normal; font-weight: normal; float: none; position: static; left: auto; top: auto; line-height: normal; background-image: url(http://i.ixnp.com/images/v3.42.0.2/theme/silver/palette.gif); background-color: transparent; visibility: visible; width: 14px; height: 12px; background-position: -1128px 0pt; background-repeat: no-repeat; text-decoration: none; vertical-align: top; display: inline;" src="http://i.ixnp.com/images/v3.42.0.2/t.gif" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;a href="http://www.eetimes.com/news/design/showArticle.jhtml?articleID=199903073&amp;amp;pgno=1"&gt;&lt;span style="text-decoration: none;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;http://www.eetimes.com/news/design/showArticle.jhtml?articleID=199903073&amp;amp;pgno=1&lt;/span&gt;&lt;/span&gt;&lt;img id="snap_com_shot_link_icon" class="snap_preview_icon" style="border: 0pt none ; margin: 0pt ! important; padding: 1px 0pt 0pt; max-height: 2000px; max-width: 2000px; min-width: 0px; min-height: 0px; font-style: normal; font-weight: normal; float: none; position: static; left: auto; top: auto; line-height: normal; background-image: url(http://i.ixnp.com/images/v3.42.0.2/theme/silver/palette.gif); background-color: transparent; visibility: visible; width: 14px; height: 12px; background-position: -1128px 0pt; background-repeat: no-repeat; text-decoration: none; vertical-align: top; display: inline;" src="http://i.ixnp.com/images/v3.42.0.2/t.gif" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, 11/01/2008&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0in; color: rgb(204, 204, 204); font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[2] Anand Iyer, “Demystify power gating and stop leakage cold”, Cadence Design Systems, Inc. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;a href="http://www.powermanagementdesignline.com/howto/181500691;jsessionid=NNNDVN1KQOFCUQSNDLPCKHSCJUNN2JVN?pgno=1"&gt;&lt;span style="text-decoration: none;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;http://www.powermanagementdesignline.com/howto/181500691;jsessionid=NNNDVN1KQOFCUQSNDLPCKHSCJUNN2JVN?pgno=1&lt;/span&gt;&lt;/span&gt;&lt;img id="snap_com_shot_link_icon" class="snap_preview_icon" style="border: 0pt none ; margin: 0pt ! important; padding: 1px 0pt 0pt; max-height: 2000px; max-width: 2000px; min-width: 0px; min-height: 0px; font-style: normal; font-weight: normal; float: none; position: static; left: auto; top: auto; line-height: normal; background-image: url(http://i.ixnp.com/images/v3.42.0.2/theme/silver/palette.gif); background-color: transparent; visibility: visible; width: 14px; height: 12px; background-position: -1128px 0pt; background-repeat: no-repeat; text-decoration: none; vertical-align: top; display: inline;" src="http://i.ixnp.com/images/v3.42.0.2/t.gif" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, 11/01/2008&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p face="verdana" style="margin-bottom: 0in; color: rgb(204, 204, 204);"&gt;&lt;span style="font-size:85%;"&gt;&lt;a name="_Ref143667556"&gt;&lt;/a&gt;&lt;a name="_Ref143442920"&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[3] De-Shiuan Chiou, Shih-Hsin Chen, Chingwei Yeh, "Timing driven power gating", Proceedings of the 43rd annual conference on Design automation,ACM Special Interest Group on Design Automation, pp.121 - 124, 2006&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-5182359076147379813?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/5182359076147379813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=5182359076147379813' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/5182359076147379813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/5182359076147379813'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/power-gating.html' title='Power Gating'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-2971407690811094960</id><published>2008-08-08T20:11:00.006+05:30</published><updated>2008-08-08T21:40:34.297+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Timing Analysis'/><title type='text'>Clock Gating</title><content type='html'>&lt;p style="font-family: verdana; color: rgb(204, 204, 204);"&gt;&lt;style&gt;&lt;!--   @page { size: 8.27in 11.69in; margin: 0.79in }   H3 { margin-bottom: 0.04in }   H3.western { font-family: "Arial", sans-serif; font-size: 13pt }   H3.cjk { font-family: "Nimbus Sans L"; font-size: 13pt }   H3.ctl { font-family: "Arial", sans-serif; font-size: 13pt }   P { margin-bottom: 0.08in }  --&gt;&lt;/style&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;Clock tree consume more than 50 % of dynamic power. The components of this power are: &lt;/span&gt;&lt;/p&gt;&lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:times new roman;"&gt; &lt;/p&gt;&lt;span style="color: rgb(204, 204, 204);font-family:times new roman;font-size:100%;"  &gt;1) Power consumed by combinatorial logic whose values are changing on each clock edge&lt;/span&gt;&lt;span style="color: rgb(204, 204, 204);font-family:times new roman;font-size:100%;"  &gt;&lt;br /&gt;2) Power consumed by flip-flops and&lt;/span&gt;&lt;span style="color: rgb(204, 204, 204);font-family:times new roman;font-size:100%;"  &gt;&lt;br /&gt;3) The power consumed by the clock buffer tree in the design. &lt;/span&gt;&lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:times new roman;"&gt; &lt;/p&gt;  &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:times new roman;"&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;It is good design idea to turn off the clock when it is not needed. Automatic clock gating is supported by modern EDA tools. They identify the circuits where clock gating can be inserted.&lt;/span&gt;&lt;/p&gt;  &lt;p face="times new roman" style="margin-bottom: 0in; color: rgb(204, 204, 204);"&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;RTL clock gating works by identifying groups of flip-flops which share a common enable control signal. Traditional methodologies use this enable term to control the select on a multiplexer connected to the D port of the flip-flop or to control the clock enable pin on a flip-flop with clock enable capabilities. RTL clock gating uses this enable signal to control a clock gating circuit which is connected to the clock ports of all of the flip-flops with the common enable term. Therefore, if a bank of flip-flops which share a common enable term have RTL clock gating implemented, the flip-flops will consume zero dynamic power as long as this enable signal is false.&lt;/span&gt;&lt;/p&gt;   &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:times new roman;" align="justify"&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;There are two types of clock gating styles available. They are:&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:times new roman;" align="justify"&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;1) Latch-based clock gating&lt;br /&gt;2) Latch-free clock gating.&lt;/span&gt;&lt;/p&gt;  &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:times new roman;" align="justify"&gt;&lt;span style="color: rgb(0, 0, 0);font-size:130%;" &gt;Latch free clock gating&lt;/span&gt;&lt;/p&gt;  &lt;p face="times new roman" style="margin-bottom: 0in; color: rgb(204, 204, 204);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-size:100%;"&gt;The latch-free clock gating style uses a simple AND or OR gate (depending on the edge on which flip-flops are triggered). Here if enable signal goes inactive in between the clock pulse or if it multiple times then gated clock output either can terminate prematurely or generate multiple clock pulses. This restriction makes the latch-free clock gating style inappropriate for our single-clock flip-flop based design&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JBXCoWo4fUM/SJxbcY4mA8I/AAAAAAAABoE/ZSLAnhpOrQY/s1600-h/latch_free_clock_gating.jpeg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JBXCoWo4fUM/SJxbcY4mA8I/AAAAAAAABoE/ZSLAnhpOrQY/s320/latch_free_clock_gating.jpeg" alt="" id="BLOGGER_PHOTO_ID_5232157410371961794" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p  style="margin-top: 0.08in; line-height: 150%; text-align: center; color: rgb(204, 204, 204);font-family:verdana;" lang="en-GB"&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-size:100%;"&gt;Latch free clock gating&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;" align="justify"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:times new roman;" align="justify"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Latch based clock gating&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p  style="margin-bottom: 0in; color: rgb(204, 204, 204);font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;The latch-based clock gating style adds a level-sensitive latch to the design to hold the enable signal from the active edge of the clock until the inactive edge of the clock. Since the latch captures the state of the enable signal and holds it until the complete clock pulse has been generated, the enable signal need only be stable around the rising edge of the clock, just as in the traditional ungated design style.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in; font-family: verdana; color: rgb(204, 204, 204);"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JBXCoWo4fUM/SJxbxv1RnWI/AAAAAAAABoM/KzCnIDXchJQ/s1600-h/latch_based_clock_gating.jpeg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JBXCoWo4fUM/SJxbxv1RnWI/AAAAAAAABoM/KzCnIDXchJQ/s320/latch_based_clock_gating.jpeg" alt="" id="BLOGGER_PHOTO_ID_5232157777309310306" border="0" /&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;Specific clock  cells are required in library to be utilized by the synthesis tools. Availability of clock gating cells and automatic insertion by the EDA tools makes it simpler method of low power technique. Advantage of this method is that clock gating does not require modifications to RTL description.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in; color: rgb(204, 204, 204);"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt;   &lt;p style="margin-bottom: 0in; color: rgb(204, 204, 204);" align="justify"&gt;&lt;span style="font-size:130%;"&gt;&lt;b&gt;References&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in; font-family: times new roman; color: rgb(204, 204, 204);"&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;[1] Frank Emnett and Mark Biegel, “Power Reduction Through RTL Clock Gating”, SNUG, San Jose, 2000&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0in; font-family: times new roman; color: rgb(204, 204, 204);"&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;[2] PrimeTime User Guide&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in; font-family: times new roman; color: rgb(204, 204, 204);"&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-2971407690811094960?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/2971407690811094960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=2971407690811094960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2971407690811094960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2971407690811094960'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/clock-gating.html' title='Clock Gating'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JBXCoWo4fUM/SJxbcY4mA8I/AAAAAAAABoE/ZSLAnhpOrQY/s72-c/latch_free_clock_gating.jpeg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-7482072893555815545</id><published>2008-08-08T19:36:00.005+05:30</published><updated>2008-08-08T21:29:38.514+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Timing Analysis'/><category scheme='http://www.blogger.com/atom/ns#' term='Netlist'/><title type='text'>STA vs Gate-level Simulation</title><content type='html'>&lt;span style="font-family:verdana;"&gt;Hi all,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;This post tries to explains the basic differences between Static Timing Analysis ( STA ) and Gate-Level Simulations ( Dynamic Timing Analysis )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-weight: bold;"&gt;Dynamic Timing Analysis :&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol style="font-family: verdana;"&gt;&lt;li&gt;The design is simulated in full timing mode. &lt;/li&gt;&lt;li&gt;Not all possibilities tested as it is dependent on the input test vectors. &lt;/li&gt;&lt;li&gt;Simulations in full timing mode are slow and require a lot of memory. &lt;/li&gt;&lt;li&gt;Best method to check asynchronous interfaces or interfaces between different timing domains.&lt;/li&gt;&lt;li&gt;Requires huge amount of computing resources (CPU time, disk space for     the waveforms, etc.).&lt;/li&gt;&lt;li&gt;Helps to validate the constraints mentioned during synthesis like false paths, multi-cycle paths, etc.&lt;/li&gt;&lt;li&gt;Helps validate your formal verification like set_comparison and set_equivalent constraints etc&lt;/li&gt;&lt;li&gt;Reset sequences are also more problematic in gate-level simulations, so this is a common place to catch them.  Synchronous reset issues that cause unknowns to pass into the flops when the reset is synthesized as part of the logic can be caught explicitly in gate-level simulation.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Validation of cross-clock domain false/multicycle paths, user defined modes of operation with case_analysis and clock phase relationships can be error-prone.&lt;/li&gt;&lt;li&gt;Helps to validate the most critical power up sequences in the design&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style="font-family: verdana; font-weight: bold;"&gt;Static timing Analysis :&lt;/p&gt;&lt;ol style="font-family: verdana;"&gt;&lt;li&gt;The delays over all paths are added up. &lt;/li&gt;&lt;li&gt;All possibilities, including false paths, verified without the need for test vectors. &lt;/li&gt;&lt;li&gt;Much faster than simulations, hours as opposed to days. &lt;/li&gt;&lt;li&gt;Not good with asynchronous interfaces or interfaces between different timing domains. &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Static verification methodologies such as static timing analysis and formal verification are&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;required to meet aggressive schedules, since they reduce the need to run &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;full back annotated regression.  However, it must be understood that the &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;static verification environments are constraint based.  Therefore, the&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;analysis is only as accurate as the constraints that drive it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;With respect to static vs. dynamic timing verification, I think it is of&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;primary  importance that all asynchronous interfaces are thoroughly stressed&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;in back annotated simulations.  In most multi-clock domain designs, many or&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;all of the clocks are treated as false paths in static timing analysis.  I&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;think back annotated simulations are the most dependable method of verifying the&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;correct implementation of synchronizers and FIFO's at asynchronous&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;boundaries, and consider back annotated simulations a necessary sign-off step before tapeout.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-7482072893555815545?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/7482072893555815545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=7482072893555815545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/7482072893555815545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/7482072893555815545'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/sta-vs-gate-level-simulations.html' title='STA vs Gate-level Simulation'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-3769851412680685878</id><published>2008-08-08T16:08:00.002+05:30</published><updated>2008-08-08T16:09:18.362+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Digital design'/><title type='text'>Minimum Depth of FIFO required</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;Consider a case in which there are two systems SystemA &amp; SystemB working with two different clocks clkA (100MHz)&amp; clkB (70MHz) correspondingly. Both these clocks are asynchronous to each other . Data has to be communicated from SystemA to SystemB. SystemA is capable writing 70 words of data in 100 clock cycles, while SystemB is capable of reading data in each and every clock cycle.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Design a FIFO with minimum depth for the above specifications&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-3769851412680685878?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/3769851412680685878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=3769851412680685878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/3769851412680685878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/3769851412680685878'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/minimum-depth-of-fifo-required.html' title='Minimum Depth of FIFO required'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-3628735773316400774</id><published>2008-08-08T16:05:00.003+05:30</published><updated>2008-08-08T16:11:10.789+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Clock generation using Blocking or Non blocking statements</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;Consider the following two blocks of code&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 153, 51);"&gt;initial #1 clk1 = 0 ;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 153, 51);"&gt;always @ ( clk1 )&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 153, 51);"&gt;  #10 clk1 = ~clk1 ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;initial #1 clk2 = 0 ;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;always @ ( clk2 )&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;  #10 clk2 &lt;= ~clk2 ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the difference between the following two block of statements&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-3628735773316400774?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/3628735773316400774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=3628735773316400774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/3628735773316400774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/3628735773316400774'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/clock-generation-using-blocking-or-non.html' title='Clock generation using Blocking or Non blocking statements'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-8955063811464983421</id><published>2008-08-08T16:03:00.002+05:30</published><updated>2008-08-08T16:15:57.901+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Blocking vs Non blocking statements</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;Check the code below&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;module test;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;reg clk,clk1,q,q1,d;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;initial&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;begin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;clk = 1'b0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;clk1 = 1'b0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;d = 1'b0;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;#15 d &lt;= 1'b1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;end&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;always&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;#5 clk = ~clk;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;always&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;#5 clk1 &lt;= ~clk1;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;always @(posedge clk)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;    begin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;      q&lt;=d;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;    end&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;always @(posedge clk1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;    begin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;      q1&lt;=d;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;    end&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;initial&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;begin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;$monitor($realtime,"\t clk = %b, clk1 = %b, q = %b, q1 = %b, d = %b ",clk,clk1,q,q1,d);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;#100 $finish;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic; color: rgb(0, 153, 0);"&gt;endmodule&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the output of the code above, justify it&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-8955063811464983421?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/8955063811464983421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=8955063811464983421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/8955063811464983421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/8955063811464983421'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/blocking-vs-non-blocking-statements.html' title='Blocking vs Non blocking statements'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-2799322943182674923</id><published>2008-08-08T16:02:00.003+05:30</published><updated>2008-08-08T16:17:17.222+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Question on File Handling</title><content type='html'>Hi all, This is a question on file handling&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;integer FH ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;initial&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;  FH = $fopen("filename1","r");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Consider the code mentioned above, What would be the value of FH if the the&lt;br /&gt;file "filename1" does not exist ? Would this result in a simulation error ? Justify ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-2799322943182674923?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/2799322943182674923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=2799322943182674923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2799322943182674923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2799322943182674923'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/question-on-file-handling.html' title='Question on File Handling'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-4716503333323946706</id><published>2008-08-08T15:57:00.005+05:30</published><updated>2008-08-08T16:14:42.085+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Difference between conditional operator &amp; if .. else</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;Consider the following verilog code&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic;font-family:times new roman;" &gt;module if_cond ;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic;font-family:times new roman;" &gt;reg [1:0] a,b ;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic;font-family:times new roman;" &gt;reg [1:0] c2 ;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic;font-family:times new roman;" &gt;wire [1:0] c1 ;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic;font-family:times new roman;" &gt;reg [1:0] foo ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 255); font-family: verdana; font-style: italic;font-family:times new roman;" &gt; assign c1 = foo ? a : b ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic;font-family:times new roman;" &gt;always @ ( foo or a or b )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic;font-family:times new roman;" &gt;  begin&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(153, 51, 0); font-family: verdana; font-style: italic;font-family:times new roman;" &gt;if ( foo )&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0); font-family: verdana; font-style: italic;font-family:times new roman;" &gt;      c2 = a ;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0); font-family: verdana; font-style: italic;font-family:times new roman;" &gt;    else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0); font-family: verdana; font-style: italic;font-family:times new roman;" &gt;      c2 = b ;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic;font-family:times new roman;" &gt;  end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-style: italic;font-family:times new roman;" &gt;endmodule&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What is the difference between the variables C1 &amp;amp; C2 ? Is there any ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-4716503333323946706?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/4716503333323946706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=4716503333323946706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4716503333323946706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4716503333323946706'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/difference-between-conditional-operator.html' title='Difference between conditional operator &amp; if .. else'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-1617634971799396770</id><published>2008-08-02T21:20:00.004+05:30</published><updated>2008-08-08T16:17:58.115+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Learn to display color messages using Verilog</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;How many among you know that you can actually display color messages using Verilog ?&lt;br /&gt;&lt;br /&gt;Using the following piece of code, one can actually display color messages ( possible on for Linux &amp;amp; Unix terminals )&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;module colour(); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;initial &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;begin &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$write("%c[1;34m",27); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("*********** This is in blue ***********"); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$write("%c[0m",27); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("%c[1;31m",27); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("*********** This is in red ***********"); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("%c[0m",27); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("%c[4;33m",27); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("*********** This is in brown ***********"); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("%c[0m",27); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("%c[5;34m",27); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("*********** This is in green ***********"); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("%c[0m",27); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("%c[7;34m",27); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("*********** This is in Back groung colour ***********"); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;$display("%c[0m",27); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;end &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;endmodule &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Code developed by Gopi&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-1617634971799396770?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/1617634971799396770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=1617634971799396770' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/1617634971799396770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/1617634971799396770'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/08/learn-to-display-color-messages-using.html' title='Learn to display color messages using Verilog'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-5040752081834142520</id><published>2008-07-29T20:36:00.006+05:30</published><updated>2008-08-08T16:18:40.769+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>How many times does the "for" loop gets executed</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;How many times does the for loop gets executed in the following verilog code&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;reg [3:0] loop ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;for ( loop = 0 ; loop &lt;= 15 ; loop = loop + 1 ) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;  begin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;    $display("Inside the loop for the %d time",loop);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; color: rgb(0, 153, 0);"&gt;  end&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-5040752081834142520?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/5040752081834142520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=5040752081834142520' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/5040752081834142520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/5040752081834142520'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/07/how-many-times-for-loop-gets-executed.html' title='How many times does the &quot;for&quot; loop gets executed'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-3156646698163773389</id><published>2008-07-29T20:25:00.001+05:30</published><updated>2008-11-13T07:20:11.862+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Digital design'/><title type='text'>Design a XOR gate using the following custom gates</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JBXCoWo4fUM/SI8wAvAttmI/AAAAAAAABmQ/Zc0TnQrYDUY/s1600-h/X_gate_Y_gate.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_JBXCoWo4fUM/SI8wAvAttmI/AAAAAAAABmQ/Zc0TnQrYDUY/s320/X_gate_Y_gate.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5228450481578030690" /&gt;&lt;/a&gt;&lt;br /&gt;This particular one was given in an interview at IBM over 10 years ago.&lt;br /&gt;&lt;br /&gt;Due to the war in the land of Logicia there is a shortage of XOR gates. Unfortunately, the only logic gates available are two weird components called “X” and “Y”. The truth table of both components is presented below - Z represents a High-Z value on the output.&lt;br /&gt;Could you help the poor engineers of Logicia to build an XOR gate?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-3156646698163773389?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/3156646698163773389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=3156646698163773389' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/3156646698163773389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/3156646698163773389'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/07/design-xor-gate-using-following-custom.html' title='Design a XOR gate using the following custom gates'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JBXCoWo4fUM/SI8wAvAttmI/AAAAAAAABmQ/Zc0TnQrYDUY/s72-c/X_gate_Y_gate.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-6016684242541446493</id><published>2008-07-29T20:07:00.005+05:30</published><updated>2008-07-29T20:17:38.069+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional verification'/><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Model a buffer of 20 units in verilog</title><content type='html'>HI all, Which is the correct way of modeling a buffer of 20 units in verilog &lt;br /&gt;&lt;br /&gt;Option 1 : #20 a  =     b ;&lt;br /&gt;Option 2 :     a  = #20 b ;&lt;br /&gt;Option 3 : #20 a &lt;=     b ;&lt;br /&gt;Option 4 :     a &lt;= #20 b ;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-6016684242541446493?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/6016684242541446493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=6016684242541446493' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/6016684242541446493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/6016684242541446493'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/07/model-buffer-of-20-units-in-verilog.html' title='Model a buffer of 20 units in verilog'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-4617790323520908862</id><published>2008-07-29T18:44:00.003+05:30</published><updated>2008-07-29T20:01:21.762+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Difference between these two verilog statements</title><content type='html'>Hi all, Can you find the difference between these two verilog (VERILOG-1995) statements&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;$fopen("filename");&lt;br /&gt;$fopen("filename","w");&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;There is more than one difference ....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-4617790323520908862?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/4617790323520908862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=4617790323520908862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4617790323520908862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4617790323520908862'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/07/difference-between-these-two-verilog.html' title='Difference between these two verilog statements'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-4831845794733674241</id><published>2008-07-28T16:07:00.002+05:30</published><updated>2008-07-28T16:08:13.184+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Interview Questions</title><content type='html'>* Define setup window and hold window ?&lt;br /&gt;    * What is the effect of clock skew on setup and hold ?&lt;br /&gt;    * In a multicycle path, where do we analyze setup and where do we analyze hold ?&lt;br /&gt;    * How many test clock domains are there in a chip ?&lt;br /&gt;    * How enables of clock gating cells are taken care at the time of scan ?&lt;br /&gt;    * Difference between functional coverage and code coverage ?&lt;br /&gt;    * Does 100% code coverage means 100% functional coverage &amp; vice versa?&lt;br /&gt;    * What do you mean by useful skew ?&lt;br /&gt;    * What is shift miss and capture miss in transition delay faults ?&lt;br /&gt;    * What is the structure of clock gating cell ?&lt;br /&gt;    * How can you say that placing clock gating cells at synthesis level will reduce the area of the design ?&lt;br /&gt;    * How will you decide to insert the clock gating cell on logic where data enable is going for n number of flops&lt;br /&gt;    * What is the concept of synchronizers ?&lt;br /&gt;    * What are lockup latches?&lt;br /&gt;    * What is the concept of  power islands ?&lt;br /&gt;    * What does OCV, Derate and CRPR mean in STA ?&lt;br /&gt;    * What is dynamic power estimation ?&lt;br /&gt;    * On AHB bus which path would you consider for worst timing ?&lt;br /&gt;    * What is the difference between blocking &amp; non-blocking statements in verilog ?&lt;br /&gt;    * What are the timing equations for setup and hold, with &amp; without considering timing skew ?&lt;br /&gt;    * Design a XOR gate with 2-input NAND gates&lt;br /&gt;    * Design AND gate with 2X1 MUX &lt;br /&gt;    * Design OR gate with 2X1 MUX&lt;br /&gt;    * Design T-Flip Flop using D-Flip Flop&lt;br /&gt;    * In a synchronizer how you can ensure that the second stage flop is getting stabilized input?&lt;br /&gt;    * Design a pulse synchronizer&lt;br /&gt;    * Calculate the depth of a buffer whose clock ratio is 4:1 (wr clock is fatser than read clock)&lt;br /&gt;    * Design a circuit that detects the negedge of a signal. The output of this circuit should get deasserted along with the input signal&lt;br /&gt;    *  Design a DECODER using DEMUX&lt;br /&gt;    * Design a FSM for 10110 pattern recognition&lt;br /&gt;    * 80 writes in 100 clock cycles, 8 reads in 10 clock cycles. What is the minimum depth of FIFO?&lt;br /&gt;    * Why APB instead of AHB ?&lt;br /&gt;    * case, casex, casez  if synthesized what would be the hardware&lt;br /&gt;    * Define monitor functions for AHB protocol checker&lt;br /&gt;    * What is the use of AHB split, give any application&lt;br /&gt;    * Can we synchronize data signals instead of control signals ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-4831845794733674241?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/4831845794733674241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=4831845794733674241' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4831845794733674241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/4831845794733674241'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/07/interview-questions.html' title='Interview Questions'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-2472840281196347720</id><published>2008-07-28T16:02:00.001+05:30</published><updated>2008-07-28T16:04:15.142+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Verilog Questions</title><content type='html'># What is the difference between $display and $monitor and $write and $strobe?&lt;br /&gt;# What is the difference between code-compiled simulator and normal simulator?&lt;br /&gt;# What is the difference between wire and reg?&lt;br /&gt;# What is the difference between blocking and non-blocking assignments?&lt;br /&gt;# What is the significance Timescale directivbe?&lt;br /&gt;# What is the difference between bit wise, unary and logical operators?&lt;br /&gt;# What is the difference between task and function?&lt;br /&gt;# What is the difference between casex, casez and case statements?&lt;br /&gt;# Which one preferred-casex or casez?&lt;br /&gt;# For what is defparam used?&lt;br /&gt;# What is the difference between "= =" and "= = =" ?&lt;br /&gt;# What is a compiler directive like 'include' and 'ifdef'?&lt;br /&gt;# Write a verilog code to swap contents of two registers with and without a temporary register?&lt;br /&gt;# What is the difference between inter statement and intra statement delay?&lt;br /&gt;# What is delta simulation time?&lt;br /&gt;# What is difference between Verilog full case and parallel case?&lt;br /&gt;# What you mean by inferring latches?&lt;br /&gt;# How to avoid latches in your design?&lt;br /&gt;# Why latches are not preferred in synthesized design?&lt;br /&gt;# How blocking and non blocking statements get executed?&lt;br /&gt;# Which will be updated first: is it variable or signal?&lt;br /&gt;# What is sensitivity list?&lt;br /&gt;# If you miss sensitivity list what happens?&lt;br /&gt;# In a pure combinational circuit is it necessary to mention all the inputs in sensitivity disk? If yes, why? If not, why?&lt;br /&gt;# In a pure sequential circuit is it necessary to mention all the inputs in sensitivity disk? If yes, why? If not, why?&lt;br /&gt;# What is general structure of Verilog code you follow?&lt;br /&gt;# What are the difference between Verilog and VHDL?&lt;br /&gt;# What are system tasks?&lt;br /&gt;# List some of system tasks and what are their purposes?&lt;br /&gt;# What are the enhancements in Verilog 2001?&lt;br /&gt;# Write a Verilog code for synchronous and asynchronous reset?&lt;br /&gt;# What is pli? why is it used?&lt;br /&gt;# What is file I/O?&lt;br /&gt;# What is difference between freeze deposit and force?&lt;br /&gt;# Will case always infer priority register? If yes how? Give an example.&lt;br /&gt;# What are inertial and transport delays ?&lt;br /&gt;# What does `timescale 1 ns/ 1 ps' signify in a verilog code?&lt;br /&gt;# How to generate sine wav using verilog coding style?&lt;br /&gt;# How do you implement the bi-directional ports in Verilog HDL?&lt;br /&gt;# How to write FSM is verilog?&lt;br /&gt;# What is verilog case (1)?&lt;br /&gt;# What are Different types of Verilog simulators available?&lt;br /&gt;# What is Constrained-Random Verification ?&lt;br /&gt;# How can you model a SRAM at RTL Level?&lt;br /&gt;# What are different types of timing verifications?&lt;br /&gt;# What is the difference between Formal verification and Logic verification?&lt;br /&gt;# What is the difference between verification and validation? And what are procedures of doing the same?&lt;br /&gt;# What is the difference between testing and verification?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-2472840281196347720?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/2472840281196347720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=2472840281196347720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2472840281196347720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/2472840281196347720'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/07/verilog-questions.html' title='Verilog Questions'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-469081173588188170.post-6322202632045020134</id><published>2008-07-25T22:03:00.002+05:30</published><updated>2008-07-28T15:51:57.362+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional verification'/><category scheme='http://www.blogger.com/atom/ns#' term='verilog'/><title type='text'>Try to find the corner case in this verilog code</title><content type='html'>Hi Everyone, The following is a small verilog code which below models a flip-flop with asynchronous set/reset logic (active low).  The model synthesizes correctly, but there is a corner case where simulation results are incorrect.  What is the corner case?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;always_ff @(   posedge clk&lt;br /&gt;            or negedge rst_n     // active-low reset&lt;br /&gt;            or negedge set_n     // active-low set&lt;br /&gt;           )&lt;br /&gt;  if (!rst_n)           // reset has priority over set&lt;br /&gt;    q_out &lt;= '0;        // reset all bits to zero&lt;br /&gt;  else if (!set_n)&lt;br /&gt;    q_out &lt;= '1;        // set all bits to one&lt;br /&gt;  else&lt;br /&gt;    q_out &lt;= data_in;   // d input assignment&lt;br /&gt;&lt;br /&gt;Hope this question will tickle the technical senses of all the ASIC verification engineers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/469081173588188170-6322202632045020134?l=asic-design-verification.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asic-design-verification.blogspot.com/feeds/6322202632045020134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=469081173588188170&amp;postID=6322202632045020134' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/6322202632045020134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/469081173588188170/posts/default/6322202632045020134'/><link rel='alternate' type='text/html' href='http://asic-design-verification.blogspot.com/2008/07/try-to-find-corner-case-in-this-verilog.html' title='Try to find the corner case in this verilog code'/><author><name>Pradeep V</name><uri>http://www.blogger.com/profile/06054281904339010457</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
