Thursday, April 17, 2008
FSM Problem
Friday, April 11, 2008
Clock Tree Synthesis
The basics of CTS is to develop the interconnect that connects the system clock into all the cells in the chip that uses the clock. For CTS, your major concerns are,
- Minimizing the clock skew
- Optimizing clock buffers to meet skew specifications and
- Minimize clock-tree power dissipation
For a balanced tree without buffers (before CTS), the clock line's capacitance increases exponentially as you move from the clocked element to the primary clock input. The extra capacitance results from the wider metal needed to carry current to the branching segments. The extra metal also results in additional chip area to accommodate the extra clock-line width. Adding buffers at the branching points of the tree significantly lowers clock-interconnect capacitance, because you can reduce clock-line width toward the root.
The biggest problem we face in designing clock trees is skew minimization. The factors that contribute to clock skew include loading mismatch at the clocked elements, mismatch in RC delay.
Clock skew adds to cycle times, reducing the clock rate at which a chip can operate. Typically, skew should be 10% or less of a chip's clock cycle, meaning that for a 100-MHz clock, skew must be 1 nsec or less. High-performance designs may require skew to be 5% of the clock cycle.
Effect of CTS
- Lots of clock buffers are added
- Congestion may increase
- Non-clock tree cells may have been moved to non-ideal locations
- Can introduce new timing violations
Glossary
Clock distribution: The main task of clock distribution is to distribute the clock signal across the chip in order to minimize the clock skew.
Clock buffer: To keep equal rise and fall delays of the clock signal.
Global skew: Difference in clock timing paths b/w any combination of two FFs in the design within the same clock domain.
Local skew : Balances the skew only b/w related FF pairs. FFs are related only when one FF launches date which is captured by the other.
Tuesday, April 8, 2008
State Diagram
Depth of the Asynchronous FIFO
For worst case scenario, difference in the data rate between write and read should be maximum. Hence, for write operation maximum data rate should be considered and for read operation minimum data rate should be considered for calculating the depth of the FIFO.
Any Asynchronous FIFO has a write frequency and a read frequency. Assume that the write frequency (Fw) is faster than read frequency (Fr).
Scenario 1:
Fw = 1/Tw and Fr = 1/Tr where Tw and Tr are Time periods of write and read respectively.
Now Transmitter (Write side) wants to transmit "W" words of data. But FIFO can take only "N" words of data in Tw time.
Time taken to transmit "W" words is (Tw/N) * W
But Receiver can read "P" words in Tr time interval.
So the Receiver can read ((Tw/N)*W*P)/Tr words in (Tw/N) * W time.
Subtract the the data read from FIFO to the data written into the FIFO.
Here the data written into the FIFO is "W" words
Data read from the FIFO is ((Tw/N)*W*P)/Tr words.
FIFO size = W-((Tw/N)*W*P)/Tr
Where
W = Maximum number of bytes that the transmitter can send
N = Number of bytes that the transmitter sends per Tw
Tw = Transmitter's time period
P = Number of bytes that receiver receives per Tr
Tr = Receiver's time period
Consider the case of a FIFO where the 'Fw' is 100 MHz and 50 words are written into the FIFO in 100 clocks while the 'Fr' is 50 MHz and one word is read out every clock.
In the worst case scenario, the 50 words are written into the FIFO as a burst in 500 ns. In the same time duration, the read side can read only 25 words out of the FIFO. The remaining 25 words are read out of the FIFO in the 50 idle write clocks. So the depth of the FIFO should be at least 28. (Three clock cycles are for synchronizer latency).
Tuesday, April 1, 2008
Functional Coverage vs Code Coverage
Functional coverage is the determination of how much functionality of the design has been exercised by the verification environment. Let us explain this with a simple example:
If your manager told you to prove that the set of regression tests created for a particular design was exercising all the functionality defined in the specification. How would you go about proving?
- You would show the list of tests in the regression suite and correlation of those tests to the functionality defined in the specification.
- You would need to prove that the test executed the functionality, it is supposed to check.
- Finally, you would create a list showing each function and check off those that were exercised.
- From this list you would extract a metric showing number of functions exercised divided by total number of functions to be checked.
There are two magical questions that every design team ask and answer.
- Is my chip functioning properly?
- Am I done verifying the chip?
The role of coverage in verification environment
Both functional and code coverage are complementary to each other, meaning that 100% functional coverage doesn't imply 100% code coverage; 100% code coverage - still has to achieve functional coverage goals.
Identify the coverage holes
One of the most important of functional verification is to identify the coverage holes in the coverage space The goal for any successful verification is to achieve the specified target goals with least amount of simulation cycle.
Limitation of functional coverage
- There is not a defined list of 100% functionality of the design is and therefore, there may be a missing functionality in the list.
- There is no real way to check that the coverage model is correct, manual check is the only way.
