Saturday, February 20, 2016
Tuesday, February 2, 2016
power routing basics
Power routing basics :
- How to calculate number of core power/ground pads required?
Lets assume 1Watt power is consumed by chip and 1V is ss corner
voltage
Power = Voltage*Current
P=V*I
I = P/V
=1/1
= 1 ampere = 1000 milli
ampere
Assume each pad can drive maximum of 100mA current.
No.of power pads required (p) = 1000/100=10 pads
No.of ground pads required (g) = p = 10 pads
Ideally 10 ground pads and 10
power pads are sufficient. In most of the cases the power distribution
may not be uniform meaning the pads which are placed in the centre of chip are
more effective as the sinks at centre might have less resistive paths. So we
need to add more pads lets say 30% more pads.
So, no.of power/ground pads = (1+0.3)*10=13
- How to calculate the core PG ring width? Given Jmax (maximum current density of metal layer = 50mA/um)
- Core PG ring width = (Total current)/(No.of sides *Jmax)
= 1000/(4*50)=5 u
- How to calculate pad to core trunk width?
- Pad to core trunk width = total current/(no.of sides * Jmax)
=
1000/(4*50)=5 u
- How to calculate strap width and no.of straps for a block? Given width of block is W and height of block as H. Total power of block as P
- Let I = P/V
- Total current from top and bottom = (I * W)/(W+H)
- Let current is equally be supplied from top and bottom.
- Itop = Ibottom = (I * W)/(W+H)
- Similarly Ileft = Iright = (I * H)/(W+H)
- With 1% voltage drop at a node in the center
- Reffective (from Vertical) = (0.01*(VDD/2))/Itop
- Reffective (from Horizontal) = (0.01*(VDD/2))/Ileft
- Width of Straps based on EM limits :
- Total width of Vertical strap (Wvstrap-em) = Itop /Jmax
- Total width of horizontal strap (Whstrap-em) = Ileft /Jmax
- Now assume initial width of strap to be 5X of min-width
- Wvstrap = 5*0.07=0.35 (0.07 is the min width for metal6)
- Rstripe-v = (Rpsq * H)/Wvstrap
- Note : Rpsq = Rho/thickness
- No.of vertical straps = Nvstraps = Rstripe-v / Reffective
- Now check the total width of vertical straps = Nvstraps * Wvstrap is greater than or equal to Wvstrap-em else increase the Wvstrap accordingly.
Tuesday, December 15, 2015
TCL example scripts
In this post, I will upload sample scripts to refer : (Under cons)
EXAMPLE : 1
For the engineers who are familiar with static timing analysis, as a programmer I want to calculate arrival time, required time, slack at each node using the given circuit. The example script will be able to demonstrate some of the tcl functions. The following circuit 10 nodes excluding (Out node), delay of each node is represented in the brackets. The objective of this program is to write a TCL script to analyse the slack at each and every node using graph based slack analysis.
Brief introduction about the graph based STA :
We need to break the entire program into three sections :
1. Arrival time calculation (AT)
2. Required time calculation (RT)
3. Slack calculation.
First we need to calculate AT at each node, Let's do hand calculation of arrival time at few nodes. Arrival time at node 'A' is 10 as delay of node 'A' is 10 and then it passes through node 'D' whose delay is '8', so the arrival time at node 'D' is 18 adding the delay of traversed path. But we can reach D by traversing IN->B->D accounting the delay of 13 (5+8), so we need to choose bigger one of the two arrival times (18,13) and assign that arrival time to node 'D' in this case it is '18'. We need to repeat the same for all the nodes.
In the second section we need to calculate the required time starting from out node 'O'. In general we might be given required time by the clock specification. But in this case we take RT as the max of all the arrival times.
Sunday, December 13, 2015
physical design
Please visit this blog to learn/discuss all about physical design tips, techniques, fundamentals.
Monday, December 7, 2015
regex
Regex,regsub :
A
regular expression is simply a description of a pattern that describes a set of possible characters in an input string.
Example :
strings
Strings
- A string is a sequence of letters, it always need not be enclosed in the quotes until you use some white spaces in between the words. Tcl is a string based language it provides rich set of operations on strings.
Examples :
set str1 one
set str2 "two three"
set str3 I\ need\ not\ enclose\ this\ in\ quotes
- Following operations can be executed on strings:
- string compare
- string equal
- string length
- string match #global expression
- string toupper
- string tolower
- string totitle #it will convert the starting letter of string to uppercase
- string index
- string range
- string reverse
Example :
lists
- Lists
- Lists are equivalent to arrays in the conventional programming language like C.
- Lists can be expanded and collapsed on the fly.
- Example 1
: - set list1 "a b c d"
File handling
File Handling :
File names could be specified in Unix format.
In order to work with a file, first one has to open a channel to the file... this is also called handle
Once the channel is opened, TCL retruns a channelId which is used to work with the files
Typical steps to be followed while working with files:
Step 1: Check whether the file specified exists or not
Step 2: Open a channel pointing to the file... TCL returns an ID
Step 3: Use the ID to work with the file
Step 4: Close the channel after use
File Open :
"open " could be used to open a channel to a file. This command returns the file-handle (channelID ) which could be used to work with the files.
Syntax:
"open " opens a channel to the file specified by the fileName with the access permissions specified by the access mode. Default is "r".
A channel once opened, remains open until specifically closed.
File Close :
"close " is used to close a channel previously opened using the "open" command.
Syntax:
Example :
procs
Procedures return to the calling program through "return" statement
Every procedure must have a corresponding return statement. This however is not strictly required.
Once they are created, procedures could be used just as any other TCL command
Procedures are declared with the help of keyword "proc "
Each procedure may have a set of formal parameters and some variables - local and global
Syntax:
statement1
statement2
:
}
Example:
}
Syntax:
Example:
% proc proc_a { a b c } { body of procedure }
% proc proc_b b { body of procedure }
Once created, a procedure could be invoked/ called just by its name
Example: proc_a { $a $b $c } , proc_b { $b } w.r.t. The above example
Every procedure has its own set of local variables.
Any two procedures may have variables with the same names. The values of the variables do not get affected since they are not visible outside the procedure block.
"global " could be used to declare the scope of some variables as global
"global " should be used inside a procedure
Syntax:
"global " binds variable names "varName "... to global variables. References to these names will refer to global variables instead of local variables for the duration of the current procedure.
Example 1:
Example 2: Simple tree traversal iterative procedure.
Example 3 :
Example 3 :
Sunday, December 6, 2015
continue and break
- Continue and Break statements
- Continue statement will terminate the current execution of the loop and start the next iteration.
- Break statement will terminate the execution of the loop and comes out of the loop.
- Continue and Break statements are very important in real life implementation.
- For example, you might run placer or some extraction which is running for like a very long time (say 48 hours) and you do not want to lose your database with all the fixes you can use break and come out of the loop. Another example is if you do not want to execute the timer update on every iteration, but want to execute in every other iteration.
Example 1:
- Continue statement will terminate the current execution of the loop and start the next iteration.
- Break statement will terminate the execution of the loop and comes out of the loop.
- Continue and Break statements are very important in real life implementation.
Control Structures
Control Structures : (Under construction)
In general execution of the program would be sequential, if the programmer needs to change the flow of execution, he can very well do using certaintcl constructs. We will discuss about them in this section. Following are the different constructs which are available in TCL:
if - else & if - elseif - else structurewhile structureforeach structurefor structureswitch
- else & if - elseif - else structureif
If the condition is evaluated true, command1 and command2 will be executed.
Syntax :
command1
command2
}
You can use if-else structure as well. i.e. if t he condition is true do this and if it is false do that .
Syntax :
command1
command2
} else {
command3
command4
}
You can use if-elseif-else and even nested if within each group.
If
condition1 is evaluated to true, command_m would be executed, else if
condition2 is evaluated to true command_n. If neither the condition evaluates to true, command_p would be executed
if condition1 { { }
command_m
}elseif { c ond ition2{ }
com mand_n
}{ else
com mand_p
}
Example 1:
While loop
- While the condition evaluates to true iterate over the loop again and again till it evaluates to false. Once it evaluates to false come out of the loop.
while { condition} {
statement1;statement2;updation; }
Example 2:
For loop
It is similar to the while loop except that you can have a flexibility to initialize the loop iterator and also update the iterator in the same line.
for { initiliaze } { condition} { updation } {
command1;command2;..}
Example 3:
It loops over a set of variables in the list and executes operations on each variable. It is the most commonly used control structure in the TCL.
statement1;
statement2;
.
.
}
Example 4:
TCL arrays
TCL array: (Under construction)
:
array exists
array get
array names
array set
array size
array unset
array startsearch
array nextelement
array anymore
array donesearch
array statistics
sat and Saturday are same
wed and Wednesday are same
fri and Friday are same
thu and Thursday are same
sun and Sunday are same
tue and Tuesday are same
mon and Monday are same
Array is a collection of variables.Associative -> abstract data type composed of a collection of key value pairs.- Key value pairs are not ordered.
- Each variable can hold any value or an array.
How to create an array in tcl ?
- We can create an array using
set or "array set"
Different operations associated with array
Output:
Note: Observe that key and value pairs are not ordered.
Example:2
Output:
4 is associated to Thu
Example:2
Output:
4 is associated to Thu
5 is associated to Fri
1 is associated to Mon
6 is associated to Sat
2 is associated to Tue
7 is associated to Sun
3 is associated to Wed
All array operations are listed in this example
Example:3
Example:4
All array operations are listed in this example
Example:3
Example:4
TCL upvar command usage
Example:
proc upvar_demo {var1 var2} {
}
upvar_demo outvar1 outvar2
#Output :
Values of variables before executing the procedure
outvar1 : Hello
outvar2 : World
Values of variables after executing the upvar procedure
outvar1 : TCL
outvar2 : Script
Subscribe to:
Posts (Atom)







