Friday, April 16, 2010

site in lef file

A site is a defination (a rectangle, I think) for placing a object. For example, all the standard celll use the same site.

Physical design clean netlist

The netlist that is input to physcial design should not have any
assign statements, unmapped logic( logic not mapped to any tech cells), combinational timing loops, 1'b0 and 1'b1 statements.

All the ports of cell instances even though they are not connected should be present or defined in the netlist.

In order that the unconnected pins are not removed from the netlist for a cell instantiation use the below command in dc shell

set verilogout_show_unconnected_pins true

The assign statements are generated in the netlist due to the following reasons.
1) feedthroughs ( input directly assinged to output; to avoid this use the buffer in betwn them)
2) multi ports nets ( two outputs directly driving the same net)
3) tri-state drivers in the design at the intermediate level ( tri-state drivers are used only at the IO level of design in ASIC0

To avoid the assign statements in the netlist use the following command

set_fix_multiple_port_nets  -feedthroughs -outputs -buffer_constants -all

Thursday, April 15, 2010

Formula to calculate the distance between adjacent macros

                                                     No of pins x metal pitch
Distance between the macros = -------------------------------
                                                    (no of metal layers used /2)

Consider one horizontal and vertical metal layer as one resource.

For 4 ML process, the denominator comes out to 2 and for 6 ML process it comes out to 3.

Finally calculate the value for  two adjacent macros by doubling the above value

Halo,blockage,fence, region definitions

Halo: Is not a hard constraint.


Suppose say, a routing halo, It won't stop you routing on the specified place if you give halo there.

But, It would certainly stop you from routing in the specified blockage.

Fence: If you have different modules defined in your netlist you would generally prefer them to keep in a specified area where you don't want to keep other module cells.

Tool neither allow other group cells to sit in that perticular fence nor allow the cells from the group out of fence.

Guide: You have the flexibility of moving the cells in and out of the design area.

Region: You could move other group cells into the region but not the region cells to out of the area.

All these are the ways of representations to tell the tool what to do exactly.

difference between placement blockage and Halo?

placement blockage and halo used to block other cell like standard cell or other macro to be placed in that area. So both placement blockage and halo have the same functionality.


THe different between them is halo stick with the macro like EBB. If EBB move, the halo move with it. But placement blockage will stick to the same location which you have defined for them. So for summary, halo move with the EBB movement but placement blockage location will remain although your macro move.

Wednesday, April 14, 2010

Useful AWK scripting commands

AWK SCRIPTING



Adding sth to a file


$NF is the value of the last field in the line in awk , $NF-1 is the last but one field


$0 is the entire line



grep PIN FB_041509_newpins.lef
awk '{print $2 "()"}'   this command greps all lines with PIN and
selects $2 only and writes to new file and adds () after $2 in every line


awk '{print $2 "()"}




awk '/PIN/ {print $1 $2}' filename ==> prints the output with $1 and $2 values side by side w/o any space




awk '/PIN/ {print $1,$2}' filename ==> prints the output with $1 and $2 values side by side with space
OR


awk '/PIN/ {print $1 " " $2}' filename ==> prints the output with $1 and $2 values side by side with space




awk '/foo/ { print $0 }' /etc/passwd this is command searches for foo in file passwd and prints the entire line having foo



awk '/start/, /stop/' file # Print all lines between start/stop pairs (not working)




awk '{print ; print ""}' FB_041509_newpins.lef to include line spaces between lines in a file




{ printf("The sum on line %d is %.0f.\n", NR, $1+$2) } in awk




awk '{ printf("the port of FB of %d is %f \n", NR, $2) }' FB_041509_newpins.lef



NR is the number of lines print NF prints all the line nos one by one in file


NF is the no of fields in a line and (print NF) prints all the fields of each line one by one




awk '/PIN/ {print $1; print $2}' FB_041509_newpins.lef prints $1 in one line and $2 in next line






awk '$1~/^C/' test.sp line beginning with C




PIN vcc after grep or search for PIN (the same line having PIN)


PIN vdd


OUTPUT is like this


PIN


vcc


PIN


vdd






awk '{print "-" " "$1 " " "il_biobuf_assp" " " "+" " " "PLACED" " " "(" " " $2 " "$3 " " ")" " " "S" }' newpadfile > compfile






awk '{print ; print " " ";"}' compfile > compfile_total ==> this command inserts ; in the every nextline of file compfile



egrep "Layout Primary Cell:

TOTAL DRC Results Generated:" oan211d2.report
awk '{ cell = $NF;getline;print cell,$(NF-1),$NF;}'


==============AWK GETLINE=================


AWK getline is important and used when we want to print the output by operating on more than one line




awk '{cell = $NF; getline;name = $4; getline;print cell,name,$3}' testfile ==> this command reads NF, $4 and $3 words from three different lines of the file testfile


IN the above command getline will get the next line in the file


awk '{ cell = $NF;getline;print cell,$(NF-1),$NF;}'




=====================================VI COMMANDS===========================================

useful Vi editor commands - text replacement and etc VISUAL BLOCK editing

==============VI COMMANDS===========================================


:80,90s/text/replacetext/g -- command to replace a text within certain lines


:70,99w >> filename (to append text from a file betn line nos to filename )


:n1,n2w file Write lines n1 to n2 to file


:n1,n2w >> file Append lines n1 to n2 to file


:1,10w file write lines 1 through 10 to file newfile


:340,$w >> file write lines 340 through the end of the file and append to file newfile





:33,224s/^/hh/ - insert the string 'hh' at the beginning of lines


:33,224s/$/hh/ - insert the string 'hh' at the ending of lines




:g/read/p - prints all occurances of `read' [kind of like a Unix grep]



% Display current filename





CTRL G shows the total no of lines in a file



:%s/text/replacetext/g to replace text


:uparrow for the above replacement command



:3,18d delete lines 3 through 18


ln -s file_name link_name





gf to move to a file in vi editor to come back type :bd or :e#


cat encounter.log
grep error
more


(VISUAL BLOCK) CTRL-V select lines to place text and type SHIFT I and type text u want and press escape