date: Jul 23, 2007; author: Graham Petley, email: graham.petley@vlsitechnology.org Copyright (c) 2003-2007 Graham Petley This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Directory Structure ------------------- alliance bin Directory for small scripts. cells Alliance layout and 0.13um Alliance timing files. rgalib 88 lambda tall, 8 lambda pitch gate array library. ssxlib 100 lambda tall, 10 lambda pitch standard cell library converted from the sxlib. stxlib As ssxlib but uses ALU2 for metal-1. sxlib Original Alliance 50 lambda tall, 5 lambda pitch standard cell library with transistor length of 1 lambda. vgalib 88 lambda tall, 8 lambda pitch gate array library. vsclib 72 lambda tall, 8 lambda pitch standard cell library. vsxlib 100 lambda tall, 10 lambda pitch standard cell library converted from the vxlib. vtclib As vsclib but uses ALU2 for metal-1. vtxlib As vsxlib but uses ALU2 for metal-1. vxlib Compatible with sxlib but meets deep sub-micron layout rules. wsclib 80 lambda tall, 8 lambda pitch standard cell library derived by a script from the vsclib with better well contacts. wtclib As wsclib but uses ALU2 for metal-1. cif The CIF directories contain real micron layout for each of the libraries. The layer numbers are the same as the MOSIS ones and not the Alliance ones. The layout is provided in generic 0.13um rules, 2um rules corresponding to the Mead-Conway lambda rule set and for the sxlib and vxlib in 1um Alliance lambda rules. The diffusion layers are represented both by N and P implants and an active layer; and by separate N and P diffusions. All CIF files can be viewed in Dreal by sourcing the README file (source ./README). These CIF files are less accurate than the ones produced by Magic. The 2um ones are used to read the layout into Magic, and they store the abutment box and REF information, which Magic does not support, and which is reinserted by a script into the CIF written from Magic. etc Configuration files for Alliance software. RDS and GRAAL files for graal, DREAL for dreal, CFG for s2r and PAR for xsch. gif Graphic files for each cell in 0.13um technology used for the databook. makevbe The directories with names ending in 100 and 200 contain user created scripts which are run to produce the initial VBE files. These are moved to the vbe directory. The directories with names ending in 013 have scripts created by the characterisation flow. The characterisation script runs them to produce the VBE files in the VBE directory. subckt Subcircuit files written from Alliance. The parasitic capacitance are not as accurate as the Magic ones, but the files are used for the alphabetic port order, and a script copies this to the Spice subcircuit written from Magic. vbe VHDL functional descriptions with timing and area information formatted for the Alliance synthesis tools. Each library has a number of different directories which are explained with reference to the rgalib. rgalib013 VBE files with 0.13um timing generated by the characterisation scripts. rgalib013_6 (a) VBE files from rgalib013 copied across and modified with 6fF added to the input pins; (b) VBE files from rgalib013_6_macros copied across (c) catalogue file listing the cells from rgalib013. rgalib013_6_macros VBE files for two or more cells from rgalib013_6 combined into a single cell. The timing is the same as the two combined cells. Their use allows functions to be synthesised which don't exist in the library (eg the an2v0x2 in the rgalib), or higher drive strengths (eg the xor2_x2 in the vxlib). rgalib013_6_min The VBE file for the weakest drive strength for each function copied across from rgalib013_6. The directory can be used by BOOG to ensure that the starting cell is always the smallest and LOON will then buffer up as necessary to improve the delay of the critical path. rgalib013_macros As rgalib013_6_macros but the macros are made from cells in rgalib013. rgalib200 VBE files made from the scripts in makevbe with approximate Alliance 0.35um timing. rgalib_netlist Netlists for the macros in rgalib013_macros. BOOG or LOON will use any VBE file in the library directory for synthesis, but will try to flatten any cell instance that is not in the catalog file. So if LOON uses a cell from rgalib013_macros then the successive LOON will replace the cell with the netlist in this directory. bin Script directory. examples Directory with examples using the libraries. The examples show how to obtain the fastest circuit and layout using assymetric vias as well as demonstrating the libraries. adder4 The Alliance adder4 example with all the lbraries from VHDL to CIF and GDS layout. bin Libraries with a different height and pitch to the sxlib need the source code for OCP and NERO modified. In order to make the examples easier to run, all the compiled binaries have been copied to the bin directory. If you have a Linux system on Intel hardware, you should be able to run the examples without compiling or installing the Alliance software. The directory also contains scripts for operations like tracing a critical path, terminating standard cell rows with well contacts etc. cells The VBE and layout files for all the libraries have been copied here. etc The Alliance configuration files have been copied here. multi4 The 4-bit multiplier example taken from Alberto Palacios Pawlovsky and looped thru the synthesis steps to find the fastest solution. ram4x4 Small 4x4 RAM described in VHDL and synthesised using the vsclib latch. html Location of the pages of the web data book. The pages are created by the characterisation scripts. magic Directory with Magic version of the library cells, the CIF and GDS layouts, and the directories with the files created by the characterisation. The characterisation files and placed in the magic directory because Magic is used to extract the Spice decks. Probably in a later release the characterisation will be relocated. cells The Magic format layout files. They are created by the script makeallviews in alliance/cells/vsclib for the vsclib013 for example using the 2um CIF file in alliance/cif/vsclib200. cif CIF format layout files in 0.13um and 2um technology, and for the sxlib in 1um technology. These files are DRC clean except for the sxlib in 0.13um (use the ssxlib013 instead) and have correct implant layers. The CIF files in alliance/cif, written by s2r in Alliance, do not have correct implant layers. etc Configuration files for Magic and directories containing intermediate files used in moving CIF backwards and forwards between Alliance and Magic. gds GDS format layout files which match those in in the cif directory. The REF geometries and labels are missing. spice_rgalib03 Spice decks, characterisation scripts and files for the rgalib in 0.13um. The characterisation can be started by running the script ./allcells, which will characterise the whole library by running Spice on each cell and reformatting the results into an Alliance VBE file and a Synopsys Liberty file. Individual functions can be char- acterised on their own. Eg. for the 2-NAND gate, cd nd2 ./allnd2 The script ./allfunc will run Spice to check the functionality of all the cells. The characteris- ation also rewrites the web data book. Note that the full characterisation of a library with a lot of cells can take a long time. The files which the user must create for a new cell are: alliance/cells/rgalib/xxx.ap alliance/makevbe/rgalib200/xxx.bash synopsys/pmd/rgalib013/xxx.pmd xcircuit/cells/rgalib/xxx.ps 1) xxx.bash must be run to produce xxx.vbe which is moved to alliance/vbe/rgalib200. 2) makeallviews xxx must be run in alliance/ cells/rgalib to create the needed cell views. 3) The xxx.ps graphic must be converted to a GIF file and copied to xcircuit/gif/rgalib. I use Gimp manually. 4) The layout CIF in magic/cif/rgalib013 must be converted to a GIF file and copied to alliance/gif/rgalib013. I use the program pplot by Tim Edwards and then a proprietary program Adobe Illustrator. Steps (3) and (4) aren't supported by the char- acterisation scripts. If the new cell is also a new function, then the file synopsys/pmd/rgalib013/yyy.pmd is needed, where yyy is the function name (eg nr4a). Cells with one output and up to 4 inputs are currently handled automatically by the files in the templates directory. spice_ssxlib013 Ditto for the ssxlib in 0.13um. spice_sxlib013 Ditto for the sxlib in 0.13um. spice_vgalib013 Ditto for the vgalib in 0.13um. spice_vsclib013 Ditto for the vsclib in 0.13um. The results are also used for the wsclib013 and the characteris- ation script also rewrites the wsclib013 web data book. spice_vxlib013 Ditto for the vxlib in 0.13um. subckt Directory with the extracted Spice decks from Magic. They are created by the script makeallviews in alliance/cells/rgalib for the 0.13um rgalib. The Spice deck written from Magic is merged with the header information in the Spice deck written by s2r from Alliance. templates Directory with the template files for the char- acterisation directories. In spice_rgalib013, a script ./makefunction will write or rewrite the files needed to characterise a cell by copying and modifying them from templates. The combinational cells are handled generically which means that the characterisation and functionality scripts are generated by reading the information in the pmd files. Cells with two outputs are handled specially. Cells with more thaqn 4 inputs are not currently supported. The characterisation scripts for flip-flops and latches are made in a one-off manner which still has to be automated. synopsys The Synopsys format Liberty files are copied here. pmd Basic information on functions (like pin names) and cells (like transistor widths) which is used to make the spice decks, Alliance VBE and Synopsys LIB files. xcircuit Schematics and logic symbols for the libraries. cells Schematics and symbols in Postscipt format. gif Graphics for the web data book. subckt Spice decks written from Xcircuit. They are merged with the header information written by s2r from Alliance. In the future these could be used for a transistor level LVS with the subcircuits in magic/subckt. Notes ----- 1. How to run the spice characterisation on the rgalib. 2. Which RDS file to use for viewing CIF files. 3. Location of Alliance VBE files. 4. Dreal and different CIF connector label conventions. 5. Layer visibility viewing recommendation for Graal. 6. Comment layer numbers and implant layers in Alliance and Magic CIF. 7. Use of TALU1 and TALU8 layers in Graal. 8. Meaning and use of config files in alliance/etc. 9. Long explanation about abutment boxes. 10.How to invoke Magic with a vsclib technology file. 11.How to use the vsclib with Alliance ocp and nero. 12.Spice simulator used for characterisation. 13.Using other Spice simulators. 14.Checking functionality with Spice. 15.Characterising with the Alliance and Xcircuit spice decks. 16.Information about Xcircuit schematic editor. 17.Some notes on the examples. 1. The characterisation flow for the rgalib in 0.13um is described here. Other libraries are similar. The directory magic/spice_rgalib013 contains the files. ./allcells runs the complate characterisation. New cells should be added to cell_list.txt, and if the cell is also a new function, then the function should be added to ./allcells and ./allfunc. technology.pmd contains the basic technology description. ./makefunction will create a new directory (if not existing) with the function name and create the simulation and script files by copying them from magic/templates. Combinational cells up to 4 inputs and 1 output are handled automatically. Other functions will have to be created by hand using the existing examples. ./makelib will use the cells listed in cell_list.txt to do makefunction for the whole library. ./makelut will create the timing and power LUTs need. ./allcells will create a LIB file for each cell and function, and write these to the rgalib013.lib file. File rgalib013_header.lib is written first and rgalib013_footer last, with the LUTs written after the header. ./makefunction will copy the pmd files from synopsys/pmd/rgalib013. It will choke if they don't exist. You will also need a cell.bash file in alliance/makevbe/rgalib200 and use this to create a cell.vbe file which is moved to alliance/vbe/rgalib200. The web data book needs cell information in html/cells/rgalib and rgalib013. The layout graphics should be created and put in alliance/gif/rgalib and logic graphics in xcircuit/gif/rgalib. The flow to add a new cell involves creating some user supplied and then running scripts. The user created files for a cell with name xxx and having function yyy (eg nr4av0x05 and nr4a) are: 1/ Draw xxx.ap in Graal using vsc200.rds in alliance/cells/rgalib. 2/ Create the pmd file xxx.pmd in synopsys/pmd/rgalib013. If it is also a new function (say yyy), then create file yyy.pmd in synopsys/pmd/rgalib013. 3/ Create the file xxx.bash in alliance/makevbe/rgalib200. 4/ Draw the schematic xxx.ps in xcircuit/cells/rgalib and write out a spice deck. If it is a new function, draw the symbol yyy.ps in xcircuit/cells/rgalib. 5/ In magic/spice_rgalib013, add cell xxx to cell_list.txt. For a new function, add yyy to ./allcells and ./allfunc. 6/ Modify the text in html/cells/rgalib/yyy.txt as appropriate. If it is a new function, yyy.txt and yyy.info must be created. Then scripts must be run to create the files needed for full characterisation. 7/ Run the script ./makeallviews xxx in alliance/cells/rgalib to make the needed cell views. 8/ In alliance/makevbe/rgalib200, execute ./xxx.bash>xxx.vbe and move xxx.vbe to alliance/vbe/rgalib200. 9/ In xcircuit/cells/rgalib convert xxx.ps to a GIF file and move it to xcircuit/gif/rgalib. For a new function, make a GIF of yyy.ps and move as well. There is no script to do this. I use GIMP manually. 10/In xcircuit/cells/rgalib execute ./makespifile xxx to make xxx.spi and move to xcircuit/subckt/rgalib. Then in directory xcircuit/subckt/rgalib013 run ./makespifiles. The first ./makespifile puts a subcircuit wrapper around the spice deck written from Xcircuit. The wrapper comes from the Alliance Graal layout. The second ./makespifiles adjusts the channel length from 0.11um to 0.13um. 11/In magic/cif/rgalib013 run ./makeps xxx to create the layout graphic xxx.ps. Move it to alliance/postscript/rgalib013. Convert it to a GIF file. There is no script to do this conversion. I use Adobe Illustrator and an unpleasant batch job, and even more unpleasantly I use Windows for the job :-( Now create the spice characterisation files. 12/In magic/spice_rgalib013 run ./makefunction yyy. This will create, if new function, or recreate the spice decks by copying and modifying from magic/templates. An additional set of decks will be created for cell xxx (which is read from cell_list.txt). Check the functionality. 13/In magic/spice_rgalib013/yyy run ./allyyy_func. This runs a Spice job which simulates the cells in magic/spice_rgalib013/yyy and compares their outputs to their desired logical value. The logical value comes from the one defined in synopsys/pmd/rgalib013/yyy.pmd. Characterise the cell. 14/In magic/spice_rgalib013/yyy run ./allyy to characterise all the cells by running Spice, formatting the results to Alliance VBE and Synopsys .LIB, and writing the web data book page. The Spice description for the cells are in magic/subckt/rgalib013, and were written during step (7). Updating the library. 15/The characterisation script writes the new Alliance VBE file to alliance/vbe/rgalib013. The VBE files in directories rgalib013_6 and rgalib013_6_min must be updated by running the scripts ./copycells. 16/The Synopsys .LIB files are in magic/spice_rgalib013/yyy with names xxx.lib for the new cell and yyy.lib for all the cells. If you want to add the cell to the library .LIB file, go to magic/spice_rgalib013 and run ./allcells fred. Fred can be any argument which causes the script to not do any characterisation, but simply use existing files to remake the characterisation outputs. The web data book pages will all be remade, and if there is a new function, it will be correctlt inserted in sequence. Before doing this you might want to update the version info in file rgalib013_header.lib. 17/File rgalib013.lib can be checked with the Synopsys supplied program liberty_parse, and it can be screened with ./makescr (which needs the Synopsys program libscr). 2. The CIF and GDS files in directories in alliance/cif, magic/cif and magic/gds can be viewed by running ./README in the directory. This loads the correct RDS file for viewing. Dreal is simple, but nice in that it does not require a proprietary layout format. It directly reads and writes CIF or GDS files. The RDS file used by Dreal is set by the RDS_TECHNO_NAME variable. e.g. RDS_TECHNO_NAME=../../../alliance/etc/vsc013.rds Look at the README file in alliance/cells for the RDS file to use with each library. I recommend the 2um or 1um RDS files for editing. If you use the 0.13um files you can view the 0.13um layout but the grid is more tricky to use. Viewing the 0.13um layout just by changing the RDS file is a Graal feature which Magic does not have. 3. The Alliance synthesis and P&R software requires that the layout AP and timing VBE files are in the same directory. For the sxlib supplied by Alliance this isn't a problem because there is only one set of timing files in a 0.35um technology. But more generally, there will be a problem because the AP layout is technology independent, but the timing files aren't. So there could be many timing files for each layout file. I recommend making a copy of the VBE files, the AP files and also the CIF and GDS files in a single directory. This has been done in examples/cells/rgalib013 in the case of the rgalib. 4. Dreal writes labels using 4N or 4X identifiers in the CIF file, but is capable of reading CIF files that use 94 type identifiers (like the CIF files written by Magic). If you read a CIF file using the 94 type identifiers into Dreal, and then write it back out, the 94 identifiers are converted to 4N type identifiers. 5. I recommend turning off the Nwell and Pwell layers, and the Abutment Box layer (AB or TALU8) during normal viewing of the cells with Graal. This makes cell viewing much easier. 6. The CIF layer names and GDS layer numbers are the ones used by MOSIS and not by Alliance. The CIF and GDS files can be viewed with the Alliance cmos.rds file. The CIF and GDS files have the diffusion layer in two forms. One is a single ACTIV layer (CAA,43) with N (CSN,45) and P (CSP,44)implant layers. The other is separate N (CND,3) and P (CPD,4) diffusions. Only the CIF and GDS files written from Magic have correct N and P implants. The Alliance implants do not always cover the poly layer, as is generally required. The Magic layout files are also cleaner than the ones from Alliance. 7. The TALU1 layer marks a blockage for ALU1. It is not used by the Alliance NERO software. In the stxlib, vtclib, vtxlib and wtclib, where ALU2 is mapped to metal-1, the TALU1 layer has been changed to TALU2. This IS recognised by NERO and can be used to control metal-1 connections to the cells. How this is done can be seen in the example in examples/adder4. Layer TALU8 is used as an explicitly drawn abutment box. 8. Files s*.dreal and s.graal are used for Dreal and Graal and libraries where ALU1 is used for metal-1. Files t*.dreal and t.graal are used where ALU2 is used for metal-1. The difference between s013.dreal and s200.dreal is in the text scaling. Set the variable like: GRAAL_TECHNO_NAME=../../../alliance/etc/s.graal spimodel.cfg defines the name used for the N and P transistor mosfet model used when writing out spice decks. I like to keep this simple and have chosen 'N' and 'P'. These namee match those in the supplied 0.13um generic spice model in magic/subckt/rgalib013 and others. You use spimodel.cfg by setting variable: MBK_SPI_MODEL=../../../alliance/etc/spimodel.cfg If your CIF files contain segments smaller than 0.01um, then you need to set MBK_SCALE_X=1000 This is needed for example with the 0.13um layout, where the minimum feature size is 0.005um. xsch.par is used by XSCH, the Alliance graphic schematic viewer which is used to view critical paths. For best viewing, the names used for the logic gates should be entered in this file. If you don't use this file, you will see the gates on your critical path drawn as simple boxes. You use xsch.par by setting variable: XSCH_PARAM_NAME=../../../alliance/etc/xsch.par where the ../../../alliance/etc is replaced by the location of your files. 9. A note on abutment boxes. The abutment box shows how close an adjacent cell can be placed. All cell geometries are either placed a half design rule width inside the AB, or extend up to or even beyond the AB so that they merge with geometry in the adjacent cell. Alliance cells use a special AB construct which appears in the CIF file as a 4A CIF extension rather than as a geometry. CIF extensions starting with 4 are a way of defining features that are not supported by by the CIF standard. Connectors are 4X and node text is 4N. The 4A extension is the one originally used by VLSI Technology and Compass Design Automation. These companies no longer exist, which means that the 4A CIF extension is now no longer used outside the Alliance software environment. The more common CIF extension used for labelling is 94 CIF. Magic uses this, and it is also used in popular works like Michael J.S. Smith's "Application-Specific Integrated Circuits". This convention doesn't seem to provide a solution for the AB definition, and also the default Magic technology files have no support for an abutment box. Because of this, I have decided to draw an explicit AB into the cells using layer TALU8, and to modify the Alliance and Magic technology files to support it. The vxlib does not use it because I want to maintain compatibility with the sxlib, which doesn't know about layer TALU8. The script which creates the vsxlib and vtxlib from the vxlib though adds the TALU8 layer. In the Graal and Dreal menus, the layer TALU8 is shown as AB. In the CIF output from Alliance, the abutment box layer is called AB. For Magic, the technology files have been updated to support the AB layer. If Alliance CIF files are read into Magic, I recommend using these technology files rather than the default scmos one because of this AB support. Afterwards the Magic MAG files can be read using the scmos default technology file, but you will get a warning about an unrecognised layer. The N and P-implants in the output CIF and GDS are generated using this AB abutment layer. This means they are correctly drawn, fully covering the poly layer. The implant layers in the CIF and GDS files written by s2r only cover the diffusion layers and are incorrect for DSM technology. 10.The Magic technology files can be found in directory magic/etc. They have been copied to the cells' location so that Magic can be invoked like: magic -Tvsc200 I don't know how to set up a technology file search path in Magic and get it to point to the magic/etc directory. 11.Place and route for standard cell libraries that are different from the sxlib require custom versions of OCP and NERO. Even for sxlib layout I have found that the -R option in NERO which should set metal-2 to be vertical does not work when there are many metal layers. OCP also uses the wrong size of connector. I have made custom versions of OCP and NERO for all the libraries by modifying the source code. This is documented in the Alliance archive at: www-asim.lip6.fr/pipermail/alliance-users/2003q4/000475.html The compiled programs have been copied into examples/bin and should run on a Linux system and Intel hardware without the need for source code modifications by the user. 12.The cell characterisation has been done with winspice3 running on Linux under Wine. I have run it both with regular Wine and with Crossover. Winspice3 is actually designed to work under Windows, so the characterisation should work here too, although I haven't tested it. The spice command 'wspice3' in my scripts is a link to nice -n 10 ~/cxoffice/bin/wine --workdir $PWD c:\\winspice\\wspice3.exe -b $PWD/$1 You'll need to set your wspice3 link to your spice simulator in a similar way in order to get the jobs to run. I found that the 'nice' command had to be used to lower the batch job priority so that I could continue working while the spice ran in the background. Without a 'nice' command, the batch job would frequently hog resources (and I have 1G RAM, 30G HD, but this didn't stop the resource hogging). 13.winspice3 is based upon Berkely Spice3F4, but it includes a LOT of bug fixes. In theory, the characterisation spice decks should run with other Spice programs derived from Spice3F4, but it is likely that bugs will stop it functioning. I use version 1.05.07, and I think the scripts will not work with earlier versions. 14.Each cell has a functionality spice check. The ideal response is taken from the pmd file. If the actual response at the end of each cycle is within 10mV of the ideal then the cell is considered functional. There are two versions of the spice check. xxx_func.cir is a batch job that writes an error file if the cell is not functional. xxx_fplot.cir plot the waveforms for an interactive debug. From my experience, if there is an error, the likeliest cause is from a pin mislabelling. 15.In addition to the Spice subcircuits coming from the Magic cells, the library includes subcircuits written from Alliance and from the schematics drawn with Xcircuit. The spice decks in magic/spice_vsclib013 reference the subcircuits in magic/subckt, but this can be edited to alliance/subckt or xcircuit/subckt, and the jobs should run on the new subcircuits. 16.Xcircuit is an interesting schematic editor because the schematics are stored as Postscript files rather than in a proprietary format. This means you don't need Xcircuit to visualise the schematics. Even though the file format is generic Postscript, Xcircuit is still able to write a Spice deck from them. The schematic symbol library (in vlsi_lib.lps) has been set up so that each transistor shows its width in lambda, with a transistor length of 2 lambda being assumed by default. In the xcircuit/cells directory, the .ps files are the schematics; the .spc files are the Spice decks written from xcircuit; and the .spi files are the the .spc files packaged into a subcircuit using the script ./makespifile. These subcircuits are copied into xcircuits/subckt. When the Spice deck is written, the sizes are all expressed in a 2um technology. To run with a different technology, a .SCALE factor must be used. For the vsclib, this is in the parameters file in xcircuits/subckt/*. For 0.13um and the vsclib, the smallest value of lambda is 0.055um. This though makes the transistor length 2*0.055=0.11um and not 0.13um. To get to 0.13um, a script edit must be done which copies the subcircuits in xcircuit/subckt/vsclib to vsclib013, and modifies the transistor length to 2.3636um. There is a similar "trick" used to make the Spice decks extracted from Magic. This is documented in the vsc013.tech27 Magic technology file. The Spice circuit files in magic/spice_vsclib013 and the other directories can be used with the subcircuits in xcircuit/subckt if the location of the included subckt is changed. 17.In directory examples are the adder4 and ram4x4 synthesis and layout examples, and the multi4 synthesis example. All needed Alliance files have been locally copied. Each sub-directory contains a README file with more information. Layout output can be viewed in Graal and the CIF and GDS files with Dreal. The VST files and critical paths can be viewed with Xsch. The layout graphics have also been converted to GIF format, although the script to do this is not included in the library release.