September 18, 2016

Register Banking

Register Banking, also referred to as Multi-Bit Register Banking is a physical implementation technique of merging two or more flip-flops into a single multi-bit register. Let's first look at what all flip-flops are potential candidates for implementing register banks.

Technically speaking, any two flip-flops which share the same clock, the same asynchronous control pins, e.g. the reset or the preset pins, and the same scan enable pins are potential candidates for register banking. Before we delve any further, let's talk about the incentives for designers to use register banking for their design? 

Advantages of register banking:

  • Illustrating with the example of 2-bit register banks, one can easily see that the overall pin density of the 2-bit MBFF has significantly reduced as compared to using 2 standalone flip-flops. By pin density, I refer to the number of pins per unit area of silicon. While, the number of pin per standard cell has certainly increased, the overall pin density would be less. Higher pin density is the major cause of shorts in the SoCs. Reducing the pin density can therefore not only mitigate the short count, but also reduce the DRC count post-routing. 

    By sharing the scan enable, clock pin, reset pin, and the scan input pin one can reduce the total pins from 12 to 7 just by using a 2-bit register bank. Imagine the benefits when one would go for higher order register banks! I have used up to 8 bit register banks and now I can appreciate the reasons better! :)
  • While reducing pin density is indirectly useful, there's more tangible gain. That is the area! Circuit designers can do a better optimization of transistors when they have to fit two flip-flops on a single standard cell versus when designers have to use 2 standalone flip-flops. Hence, the overall area of a MBFF (Multi-bit FF) will always be more optimum.

  • Third advantage would be the optimum use of routing resources. Imagine routing signals like Scan Enable, Reset and Clock to 8 sequentials instead of one! However, the benefits won't scale by the same ratio of 8:1, using a MBFF would use lesser routing resources over using standalone FFs.

  • The biggest and the foremost reason behind using register banking is something different. I'm sure you must have guessed it by now. And it is the dynamic power! If you have lesser number of clock sinks, that would mean you need to route the clock to fewer sequentials. This would directly translate into using lesser number of clock buffers, hence lesser DYNAMIC POWER! This indeed is the motivation behind using register banking. Moreover, for FINFETs, owing to their 3-dimensional structure, the pin capacitance is significantly higher than their CMOS counterparts. Higher capacitance would directly mean higher dynamic power dissipation. Using register banking technique helps to offset some of that extra pin capacitance and reduces the overall dynamic power.
  • Ancillary benefits of register banking could be the requirement of lesser number of hold buffers or even reduction in the length of scan chain.

The biggest headache of using register banking technique is the Logic Equivalence Checks because mapping of the register banks to appropriate sequentials from the RTL becomes quite difficult. LEC, among many things, checks for the name of the sequentials while mapping and checking the equivalence between the golden and the revised sides. The instance name of the register bank is usually a combination of the instance names of all the standalone flip-flops comprising the multi-bit register. Hence LEC may have a tough time in establishing the equivalencies. 

While theoretically, register banking sounds simple, the designers or alternatively the design tools should exercise care in choosing the standalone sequentials for register banking. In addition to ensuring that the scan enable, clock signal and the asynchronous control signals are same, it is also desired that the length of the combinational cloud feeding the individual data pins of the multi-bit flops be almost the same. If let's say, one input has a higher combinational depth as compared to other inputs, the clock to the multi-bit sequential might need to be "pushed" to meet timing, and thereby offsetting the benefits of register banking. Excess use of clock buffers might even lead to congestion issues and would significantly eat up the routing resources.





August 09, 2016

IR Drop Analysis

Just yesterday, I got a question from one of our readers Lakshman Yandapalli. I thought it would be nice to write a blog post for you all!

Let's start with some background as to what indeed is the IR drop analysis.



When we talk about standard cells, we usually talk about the logical pins, let's say, A and B for the inputs and Z for outputs. What we do miss stating explicitly are the power/ground pins: the VDD and the VSS. These connections are usually implicit from the context (unless of course if you have a Muti-voltage design! Let's save this story for some other post).

IR drop is the voltage drop in the metal wires consituting the power grid before it reaches the VDD pins of the standard cells. Why do we bother about the voltage? Because the speed of the standard cell (the propagation delay) would be directly proportional to the VDD value. Higher VDD would mean faster cell, or lower propagation delay.

Now imagine that your SoC has a nominal voltage of 1V, and you closed your setup timing assuming the ideal 1V libraries. However, the IR drop of 40mV came into picture after you built the power grid, and the voltage is no longer 1V, let's say it is 0.96V. Now, with V = 0.96V, the delays of standard cells would be higher and you might see an increase in your setup-time violations!

Let's look into the factors that could cause this IR drop and how can we mitigate those factors, and what should our sign-off corners be to make sure no failures post-silicon!

While considering IR drop, you'd be concerned with two factors:

1. Static IR Drop: Dependent on the RC of the power grid connecting the power supply to the respective standard cells.

It is ALWAYS desirable to create the POWER GRID in higher metal layers. Higher metal layers would mean more wide wires, and hence would mean lower resistance. Lower resistance would mean that the IR drop would be lower, and hence lesser impact on setup-timing. 

Capacitance of metal wires would be the combination of ground and the coupling capacitance. If for some reason, you feel that the capacitance is too large, and it is indeed the reason for IR drop, it could either be because 
  • Long wire length: Resulting in higher wire cap. 
  • High fan-out of the net: Resulting in higher load-cap, or perhaps 
  • High routing congestion in a particular area resulting in high coupling capacitance with the neighboring nets.

Now, how to mitigate the problem? You can try splitting the net so that the fan-out gets distributed (pretty much similar to building a clock tree), you can split the long wire by placing appropriate power bumps. Or you can also analyze the congestion and space the wires apart to reduce coupling capacitance!
Update: 
Simple equation representing the static IR drop would be the following:
Vstatic_drop = Iavg x Rwire
2. Dynamic IR Drop: Dependent on the switching activity of the standard cells themselves.
Switching activity of standard cells also contributes significantly to the IR drop, also known as the Dynamic IR drop. Higher would be the switching activity, in a given region, there'll be an increased demand for current from the power supply. More is the current, more would be the IR drop (which is essentially Current times the wore resistance!).
If you ever come across such a use case, you might want to space the standard cells apart so that the burden on a given bump to feed many standard cells which have high switching activity would be mitigated. 

Dynamic IR Drop is also sometimes referred to by the term of Voltage "Droop".

Update: Dynamic IR drop is contingent upon the current drawn by the standard cells, and that brings in a time-dependent variation of current into picture. Dynamic IR drop is represented by the equation:

Vdynamic_drop = L (di/dt)

Now that we have a fair understanding of IR Drop analysis, let's talk about the PVT/RC corners where one should analysis IR drop in their design.
Let's start with the RC corner.

1. RC Corner: The RC corner where the physical design engineers should analyze for IR drop would be the case when the RC product is worst. And that would indeed be the (RC)max corner, also referred to as the RCWorst corner.

2. PVT Conditions: PVT conditions would typically impact the standard cells. For IR drop analysis we would be concerned about the case where we expect the highest switching activity for standard cells. That would be the FF corner, High voltage, and high temperature.
High temperature might seem an anomaly, but higher temperature would mean higher wire resistance as well, and hence higher RC!


Last comment about IR drop analysis. It also makes sense to run IR drop analysis for the worst case setup timing check because IR drop would most probably impact only setup timing. So, designers may want to run the IR drop analysis for the RCWorst, High Temperature, SS slow and low voltage. But typically it is not done because the low voltage corner is usually already guard-banded to account for the IR drop. So, running IR drop analysis on the low voltage corner would be overly pessimistic! 




June 17, 2016

Self Gated Flip-Flop

Hey folks!

Just yesterday, I was wondering if it's possible to come up with a self gated flip-flop architecture which could be used to extreme low-power applications. As soon as I designed the flip-flop and satisfied myself that it seemed to be working well on paper, I was ecstatic! However, that was short-lived because a prior art search revealed that someone had already designed a pretty similar structure 2 years back!

But since I found it cool, I'm tempted to share it with the readers here. Let's start with the motivation for such a flip-flop.

There may be applications in which certain flip-flops of the design may toggle states quite infrequently. Now, it's a well known fact that even though a flip-flop is not switching states, it will continue to dissipate dynamic power internally as long as the clock is constantly switching states. And there's also a well-known, exalted solution of clock gating! But clock gating is not always a viable solution. Let's look at the reasons when and why clock gating may not be a viable solution:

Clock Gating Integrated Cell
  • Clock Gating is usually performed by using a clock gating integrated cell, which essentially comprises of a latch and an AND gate. Latch itself is a sequential element, and logically half of the flip-flop, and physically takes up around 60-65% of the flip-flop area. Coupled with an AND gate, the internal switching activity of the clock gating cell would result in significant standby power dissipation.
  • Adding a clock gating cell makes sense only if there are a bunch of flip-flops to be clock gated. That is basically to offset the extra overhead of power dissipation within a clock gating cell.
  • Clock Gating cell will also have additional logic to control it's enable signal, leading to more power dissipation, however, this component is not really significant in most of the cases.

All the above reasons point for need of an effective strategy for a fine-grained clock gating technique without worrying about any additional overheads one might incur in doing so. That way a self-gated flip-flop might come to our rescue and would help in saving that extra milli- or perhaps micro-watts of power! Pretty cool, no! ;)

Architecture:
What I thought was: flip-flop would have a state either 0 or a 1. And these are the only two states that one ever needs to worry about. And this is best accomplished by a toggle flop.

Toggle Flop


Now, let's say initially flip-flop was reset to 0 and D was 0. The flop should be self gated. And as soon as D goes to 1, the flip-flop should TOGGLE, and stay at 1 as long as D stays as 1. So, we need the following components: a toggle flop; a XOR between D, Q; and a clock gating logic (either an AND or an OR gate).

Connections are pretty intuitive as shown as follows:


Implementing XOR is simple, and can be accomplished by using 8 transistors plus inverters. NOR gate would need 4 additional transistors. So, using just 12 extra transistors on top of the existing flip-flop circuit, you get a self-gated flip-flop with minimal dynamic power! How's that for a circuit?!

Self-Gated FF

It would be prudent to add the name of the patent/publication that I eventually found in the references, so that nobody accuses me of plagiarism! :D

Reference: 


  • Low Power Toggle latch-based flip flop including integrated clock gating circuit: US 20150200652A1.

April 24, 2016

Hold Time Violations

How often has someone asked you how to fix setup time violations?! And how often have you replied with many techniques ranging from cell upsizing, to logical retiming. From Vt swapping to utilizing useful clock skew or perhaps even reduction in the clock frequency?

And how often someone has trapped you for the asking the impact of clock frequency on the hold time!


Let's imagine a scenario. You designed a chip, and it's been manufactured. You discovered that there's one hold time violation and let's say, the slack is -10ps. Well, logical answer would be to throw that chip away since hold time cannot be met by tweaking the clock frequency. But it it were that simple, I wouldn't have asked this question! :P

Now, think a little. And answer what all "engineering tweaks" you can do in order to make the chip work, or I should say to try and make the chip work?


I expect a healthy discourse on this question, and I'm sure even I would end up learning a few things which I might not have appreciated till now. I request you to enlighten me with your thoughts.


Thanks! :)

January 05, 2016

Puzzle: Logical Restructuring

Can you comment on the functionality of the below circuit?


Using the concept of bubble shifting, can you optimize the above circuit to reduce its area? Consider all gates to be implemented in standard CMOS technology, and assume that area is directly proportional to the number of transistors used.

You may also compute the percentage area reduction as a result of bubble shifting by counting the number of transistors in the optimized circuit.