2012年1月30日星期一

To probe signal from layout for reviewing

This can be done by running DRC check
Keep the layer and connection definition, delete the rule checks in the rule deck (NOT the header file),
then add the following commands at end of the rule deck:

*** remember to set "DRC MAXIMUM RESULTS ALL", since the result output

*** may be exceed the max. limits

// probe nets
Plot_VDDA { @output all metal shapes belonging to VDDA net
NET Metaltop VDDA
NET Met3 VDDA
NET Met2 VDDA
NET PolyxRes VDDA
NET Nsd VDDA
NET Psd VDDA
}
DRC CHECK MAP Plot_VDDA GDSII 6 0 "./plots/VDDA.gds"

Convert verilog netlist to spice netlist

"v2lvs" (come along with Calibre) can convert verilog netlist to Calibre format netlist for LVS purpose

       v2lvs -v verilog_in.v -o spice_out.sp -w 3


for more complex syntax put into a script, say "v2sp.sh"

      v2lvs -n -s0 GND -s1 VDD -s inc_1.cdl -s inc_2.sp -lsp sp_ref_lib.sp -v $1 -o $2

e.g. run in console:
./v2sp.sh input.v output.sp


##
-n :  make the unconnected pins to get numbered connections starting at 1000
-s0 : default global ground is changed to
-s1 : default global power is changed to
-s : causes the string .INCLUDE "filename" to be put at the beginning of the generated spice file
-lsp : Spice library file name, pin mode. The spice file is parsed for interface configurations. Pins with pin select ([]) annotation are kept as individual pins using escaped identifiers. Normally standard cells reference library for cell mapping.
-v : input verilog file name
-o : output spice netlist file name
$1 : system var, which is filename1
$2 : system var, which is filename2


Commands to run LVS/DRC in console mode

calibre -lvs -hier lvs.runset

calibre -drc -hier drc.runset

To ignore a cell or region when running DRC/LVS

if a cell is not ready or a region where the design rule is violated, they can be ignored in the rule deck

     LAYOUT WINDEL 315 2638 384 2680 // ignore the rectangle region at (315, 2638) (384, 2680)

     EXCLUDE CELL "cell_name" // exclude the "cell_name"

     LVS BOX cell1 cell2 // treat cell1, cell2 as a black box, only check pin connection, not the inside netlist/layout of the cells. (useful for phantom cells or unfinished cells for doing LVS)

Layout pin text placement

The pin text on the layout can be specified by a text file rather than placing the text label on layout. This approach can be used for running LVS of a gds file which doesn't include any text information.         

LAYER M2_TXT 50 // define the layer        

TEXT LAYER M2_TXT // define layer as a text layer        

LAYOUT TEXT CLOCK 10.5 16.8 M2_TXT // place the text "CLOCK" at (10.5, 16.8) 

 the layout text can be included in a separated file to simplify the rule deck file

Call an subcircuit when generating netlist in Analog Design Envirnment (ADE)

1) create a sch & symbol view for the subcircuit

2) copy the "symbo" view to "spectre" or "hspiceD", or others view as desired

3) open the base CDF for the cell, add a component partmer called "model" in the "Edit CDF Parameter" from, specify as belows:
       paramType : String
       parseAsNumber: no
       parseAsCell : yes
       storeDefault : no
       name : model
       prompt : Model Name
then press OK

4) in the "Simulation Information", edit the following parameters:
       choose simulator : hspiceD, or others
       otherParamters : model
       instParameters : myParameters
       componentName  : (leave blank)
       namePrefix : x
       termOrder : the subcircuit terminals order

Finally, include the path of the subcircuit by hand edit in the generated netlist, or by
ADE --> Setup --> Model --> Model Libraries


Update:
Follow below steps yet works (without passing parameter) :-
repeat above point 1) & 2).
CDF : Simulatior Information
           |-- by simulator -> hspiceD
           |-- name prefix = x
           |-- termOrder = "a" "b" "c" etc. pin order same as subckt terminals
        
           Alt.
           |-- by simulator ->  spectre
           |-- termOrde = "a" "b" "c" etc. pin order same as subck terminals

2010年3月3日星期三

Change bash shell style

3 special shell paramenters to set the shell looks:

* PS1 - The value of this parameter is expanded (see PROMPTING below) and used as the primary prompt string. The default value is \s-\v\$ .
* PS2 - The value of this parameter is expanded as with PS1 and used as the secondary prompt string. The default is >
* PS3 - The value of this parameter is used as the prompt for the select command
* PS4 - The value of this parameter is expanded as with PS1 and the value is printed before each command bash displays during an execution trace. The first character of PS4 is replicated multiple times, as necessary, to indicate multiple levels of indirection. The default is +

PS1 options:
* \a : an ASCII bell character (07)
* \d : the date in "Weekday Month Date" format (e.g., "Tue May 26")
* \D{format} : the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required
* \e : an ASCII escape character (033)
* \h : the hostname up to the first '.'
* \H : the hostname
* \j : the number of jobs currently managed by the shell
* \l : the basename of the shell’s terminal device name
* \n : newline
* \r : carriage return
* \s : the name of the shell, the basename of $0 (the portion following the final slash)
* \t : the current time in 24-hour HH:MM:SS format
* \T : the current time in 12-hour HH:MM:SS format
* \@ : the current time in 12-hour am/pm format
* \A : the current time in 24-hour HH:MM format
* \u : the username of the current user
* \v : the version of bash (e.g., 2.00)
* \V : the release of bash, version + patch level (e.g., 2.00.0)
* \w : the current working directory, with $HOME abbreviated with a tilde
* \W : the basename of the current working directory, with $HOME abbreviated with a tilde
* \! : the history number of this command
* \# : the command number of this command
* \$ : if the effective UID is 0, a #, otherwise a $
* \nnn : the character corresponding to the octal number nnn
* \\ : a backslash
* \[ : begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
* \] : end a sequence of non-printing characters

e.g.
PS1="\s-\u:\W\$ "
output : bash-myDesktop:Pictures$

how to change color