0% found this document useful (0 votes)
24 views

Chaitra Report

Uploaded by

dhanya.kn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Chaitra Report

Uploaded by

dhanya.kn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

C++ LAYOUT GENERATOR BASED ON MGEN 2015

CHAPTER 1
INTRODUCTION

MGEN refers to module generators. MGEN system is implemented along with the C+
+ code file. MGEN system consists of functions to create geometric objects. As C++ code
will generate the desired layout, it needs data based on which specified layout will be created,
so all the data will be put in a MGEN tech file. This tech file acts as input file to the C++ file.

MGEN system has been implemented using object oriented programming language
C++. Using this approach standard environment can be supplied. On the other hand full
power of object oriented programming environment can be exploited. Compared to C, C++
offers many advantages. First the reliability of the software written in the C++ is much better
than the software written in C because of strong type checking in C++. Second the data
access mechanism in C++ prevents the user from unintended destruction of information.

Kernel of the MGEN system consists of the library containing the set of fundamental
functions for creation and manipulation of geometric objects and cells

Layout generators, like Cadence' PCells, are an essential part of a full-custom design
kit. Today's full-custom designs contain easily 10.000 unique PCell masters for transistors,
passive devices, contacts, guard rings etc. The C++ layout generators are implemented based
on the MGEN module generator environment. MGEN is developed by ATMEL, Germany
and is used for many years internally for layout generators, a layout editor and many other
layout specific applications. MGEN provides typical classes for layout representation and
various layout format input/output interfaces for e.g. SKILL. Additionally, MGEN has a
decent infrastructure for layout generators by providing base classes, for example the
parameter handling.

The Infineon pcell generators are eda tool independent C++ class hierarchy built on
top of the open source mgen layout library. Basic layout geometry and connectivity objects
used in the Infineon pcell generators are identical to those used in open source mgen library
(Rectangles, polygons, paths etc). In order to use the Infineon pcell generators to generate
pcells for a specific tool two interface layers have to be coded. C++ side to translate the
internal layout data to an agreed upon binary format. The other layer is on the layout tool side

SJCE, MYSURU Page 1


C++ LAYOUT GENERATOR BASED ON MGEN 2015

to interpret the binary format piped from the C++ generators and convert it to the
corresponding tool specific layout objects.

1.1 ARCHITECTURE OF MGEN

MGEN system consists of two layers MGEN library and the MGEN toolbox. MGEN
library support basic functionality of MGEN system. MGEN library supports set of classes to
deal with object that represent layout connectivity data. MGEN toolbox is built on top of
library. It provides set of generators for various layout components starting from simple
contacts to complex CMOS.

APPLICATION

MGEN TOOL BOX

MGEN LIBRARY

FIGURE 1.1: MGEN ARCHITECTURE

Within the MGEN there are three distinct families of objects to create and maintain
layout data. The first group of family is called as primitive objects which are related to one
single layout component. Example geometric component such as rectangle belongs to this
group.

Second group is called as composite type objects. These are used to maintain a set of
fundamental type objects. Example for this type is cell definition. Third is a supplementary
type object. This group is used for object composition of primitive and composite objects

SJCE, MYSURU Page 2


C++ LAYOUT GENERATOR BASED ON MGEN 2015

1.2 DEVELOPMENT FLOW

C++ SOURCE
CODE (*.C)

C++ COMPILER

MGEN TECH CREATES


FILE EXECUTABLES
FILES

Ex: ifxdevlayoutcds (*.o)

EXECUTABLES WILL
CREATE SKILL CODE

Loaded Skill File (*.il)

OUTPUT
(DESIRED
LAYOUT) Viewed in Virtuoso

FIGURE 1.2: DEVELOPMENT FLOW

1.3 BASIC COMMANDS NEED TO BE FOLLOWED

 Enter into your working unit using following command on terminal


 Camino tptest  CCtech_v040_TPdev_cam130
 cd units/<unit name> (ex: cd units/ hammigi )
 virtuoso&
 Enter into working place
 cd svn /mgen /trunk /src
 unixgui –linux –R osrel= = 40& ( This will open an new terminal ).

SJCE, MYSURU Page 3


C++ LAYOUT GENERATOR BASED ON MGEN 2015

 Enter the following commands in new terminal


 Source setup.csh (It’s a shell file consists of all the details that are needed to
run our code. And it also contains details about Linux platform and version
used).
 module unload camino
 cd monitor ( change directory to monitor)
 rm –rf i686-linux-rh4/ i686-linux-rh4/ has to be
 cd ifxdevlayout/ removed from both dir inorder
 rm –rf i686-linux-rh4/ to avoid clashes during each run.
 cd ..
 gmake
 cd ifxdevlayout/ i686-linux-rh4/ifxdevlayoutcds
 copy these executables to directory /oa/mypcell/.mgen/i386-linux/

 Run the following command to create skill code


oa/mypcell/.mgen/ifxdevlayoutcds/ -pcell oa/mypcell/.mgen/mypcell.mgen
<generator -name> <model-name> mypcell <library-name> <skill-file> model =
<model-name>

Ex: Oa/mypcell/.mgen/ifxdevlayoutcds/ -pcell oa/mypcell/.mgen/mypcell.mgen


mostran nchCCTech mypcell nch nch.il model = nchCCTech
 To update or view Mgen Tech file
 cdunit
 cd oa/mypcell/.mgen/
 gvim mypcell.mgen&

1.4 GENERAL CONCEPTS

 . /SRC contains ifxdevlayout which has all the source files written in C++. (Ex:
Resistor.C )
 All the required headerfiles are located in ifxdevlayout_h.
(Ex: Resistor.h)
 ./src/ifxdevlayout/i686-linux-rh4/ consists of all executable files generated after
compilation. (Ex: Resistor.o)

SJCE, MYSURU Page 4


C++ LAYOUT GENERATOR BASED ON MGEN 2015

 For each run we need to copy the executables (ifxdevlayoutcds) to


/oa/mypcell/.mgen/i386-linux
(cp –rf /home/tptest/CCtech_v040_TPdev_cam130/nodm
/CCtech_v040_TPdev_cam130/units/hammigi/svn/mgen/trunk/src/ifxdevlayout/i686-
linux-rh4/ ifxdevlayoutcds oa/mypcell/.mgen/i386-linux)

SJCE, MYSURU Page 5


C++ LAYOUT GENERATOR BASED ON MGEN 2015

CHAPTER 2
LITERATURE SURVEY

[1]. MGEN programmers guide. Revision 2.0.1 (December 2005).


[2]. Adapting C++ based pcells to open access, Andreas Muller Infineon technologies

Munich Germany.

[3]. MGEN source code and documentation. http://sourceforge.net/projects.

[4]. C++ OA API documentation 2004.

[5]. Using Cadence Virtuoso, a UNIX based OrCAD PSpice like program,
Remotely on a Windows Machine.

[6]. Skill language user guide.

[7]. Virtuoso Layout Editor UMBC Tutorial Ekarat Laohavaleeso Chintan Patel.

SJCE, MYSURU Page 6


C++ LAYOUT GENERATOR BASED ON MGEN 2015

CHAPTER 3

OBJECTIVE
Main objective of the training includes

 To understand architecture of the MGEN system.


 To study how the concepts of object oriented approach are used in the layout
generators.
 To analyse the relationship between the MGEN tech file and the C++ source file.
 To learn the types and hierarchy objects of MGEN.
 To understand how the inheritance of OOP is incorporated in the MGEN file
structure.

SJCE, MYSURU Page 7


C++ LAYOUT GENERATOR BASED ON MGEN 2015

CHAPTER 4
MGEN LIBRARY

MGEN library includes basic functionality to create and manipulate layout data.
Generator environment in the MGEN consists of process description of underlying process
and the functionality to manage the layout cells created during the run.in MGEN only the
basic elements of the process description such as the resolution factor, process grid and
process name are supported as global variables in MGEN environment. The other parts of the
process description such as layer definition and design rules are fully user definable. It’s
recommended to store the design and layer rule definition in a single header file per process

and include this in all generator modules.

4.1 STRUCTURE OF MGEN TECH FILE

MGEN tech file follows one of the object oriented approach INHERITANCE. There
exists parent and child relationship between each generator. MGEN tech file consists of
following sections:

 LAYERS
 LAYER MAP
 GLOBAL
 DESIGN RULES
 DESIGN RULES (RECOMMENDED RULES)
 GENERATOR

In Layers section individual layers which are needed to generate the specific polygons
are defined.

In layer map each layer defined is mapped as MGEN layer name to Actual layer.

In Global section common parameters are defined such as grid, resolution and text
size which are common to all generators.

In Design rule constraints are specified with respect to each layer such as minimum
and maximum width of the layers, minimum distance between layers, minimum area and
overhang. This section will be general to all generators later each generator can have a
different design rule section.

SJCE, MYSURU Page 8


C++ LAYOUT GENERATOR BASED ON MGEN 2015

Generator section consists of generator name, model, parameter and design rules. The
generator can inherit global design rules or else locally defined design rules. Model will also
consist of parameters; priority will be given to parameters of model than generator.

Layers which we use to build generator must be defined in MGEN tech file and have
to be mapped.

MGEN TECH FILE

LAYER DESIGN RECOM GENERATO


LAYERS
MAP RULES RULES R

MODEL PARAM RULES

FIGURE 4.1: MGEN TECH FILE STRUCTURE

MGEN tech file also consists of parameter declarations. MGEN file parameters are
objects of type ParamDeclaration. We declare a new MGEN parameter by creating a
ParamDeclaration object in the declareParameters function of the relevant generator. In order
to access this ParamDeclaration object inside generator class, we need to define it as a
protected class member variable. This is done in the header file of the generator which is
located in ./src/ifxdevlaout/ifxdevlayout_h/.

Type of the MGEN file parameter can be either

 ParameterValueBase :: RULE
 ParameterValueBase :: LAYER
 ParameterValueBase :: STRING
 ParameterValueBase :: NUMBER
 ParameterValueBase :: LIST

SJCE, MYSURU Page 9


C++ LAYOUT GENERATOR BASED ON MGEN 2015

CHAPTER 5
TASKS ASSIGNED
1. Generate a simple MOSFET using C++ object oriented Programming approach with
MGEN tech file.
Files to be created:
 C++ source file
 MGEN tech file
 Header file

The C++ code is divided into a number of classes. Each class is responsible for
generating the geometry for a specific class of devices. For example, the mostran generator
generates the geometry for the transistor devices.

 Every time whenever we want to write a C++ code to generate geometry, we need to
update two following files
 Generators.C
 Makefile

In the Generators.C add the corresponding headerfile of the C++ code and register the
new generator in the registerGenerator function. In the Makefile add the
corresponding executable file.

 To create a new generator I need 3 files to be written :


 Mgen techfile
 C++ source code file
 Header file ( .h extension )

MGEN TECHFILE:

 In the techfile a new generator has to be created according to the structure as


mentioned in the Figure 4

 All the parameters declared in the declareParameter () function of the C++ file has to
be declared in the header file as ParamDeclaration and also has to be mapped in
techfile Parameter section.

SJCE, MYSURU Page 10


C++ LAYOUT GENERATOR BASED ON MGEN 2015

 Inorder to build Mosfet I need diffusion, poly layer. These layers have to be mapped
to the MGEN techfile layers.

 And they are accessed by C++ file using

const Layer *diffLayer = mpDiffLayer->layerValue()

 And finally the core geometry will be built. Output will be viewed in the Virtuoso.

 Width and length can be changed using parameter option in the virtuoso.

C++ SOURCE FILE:

This file consists of definitions of the variables and functions that are referenced. A
definition actually allocates storage for a variable or says what a function does.

Data hiding is one of the important features of Object Oriented Programming which
allows preventing the functions of a program to access directly the internal representation of a
class type. Restriction to the class members is specified by the public, private, and protected
sections within the class body. The keywords public, private, and protected are called access
specifiers.

PUBLIC:
A public member is accessible from anywhere outside the class but within a
program. You can set and get the value of public variables.

PRIVATE:
A private member variable or function cannot be accessed, or even viewed from
outside the class. Only the class and friend functions can access private members.

PROTECTED:
A protected member variable or function is very similar to a private member but
it provided one additional benefit that they can be accessed in child classes which are
called derived classes.

SJCE, MYSURU Page 11


C++ LAYOUT GENERATOR BASED ON MGEN 2015

Here in my task C++ file consists of following functions:

 declareParameters ()
 clearCell ()
 generate ()
 varifyUserParams ()
 buildMygen ()

declareParameters () :
This function contains all the declarations of the mgen tech file parameters and
cdf parameters. Ex-diffLayer,PolyLayers are declared here.
Demo=NewParamDeclaration(“<parametername>",
<type>,
<generatorContext>,
<mpParamDeclPool>,
[<optional flag> [, <default value>]]);
 <Parameter name>: name of parameter as it has to appear in the techfile.
 <generatorContext>: context of generator, stored in current generator as member
variable ‘mpContext’
 <mpParamDeclPool>: pool of defined parameters, stored in current generator as
member variable ‘mpParamDeclPool’
 <optional flag>: optional, default is ‘false’, parameter is optional if ‘true’ else
mandatory
 default value>: optional, default value of optional parameters, value must be a
ParameterValueBase object, e.g. ‘new NumberValue(5.5)’, ‘new
StringValue(“default”)’
 <type>

generate ():
This function generates the layout by taking user specified parameters and stores
them. generate function takes parameter width and length to generate a layout.

buildMygen ():
This function helps in building the core geometry.

SJCE, MYSURU Page 12


C++ LAYOUT GENERATOR BASED ON MGEN 2015

verifyUserParams ():
This function Verify if the user specified parameter values for top level transistors
violate design rules.
clearCell ():
This function clears the generator internal data structure for new layout
generation run.

C++ HEADERFILE

As programs grow larger and include more files, it becomes increasingly tedious to
have to forward declare every function I want to use that resides in a different file. So its
good practice to put all declarations in one place. And this is done using header files.

Header files typically only contain declarations. They do not define how it is
implemented. Here in my task, so if diffLayer is only declared in the “Mygen” header file, it
is implemented in the C++ runtime support library, which is automatically linked into my
program during the link phase.

Header file has all three sections public, private and protected. Each functions and
data defined in the C++ file are to be declared here. It is just a prototyping. All the functions
which I explained above in the C++ source file must be declared in the corresponding header
file (Mygen.h).

Consider what would happen if the Mygen header did not exist. Wherever I used
diffLayer, I would have to manually copy in all of the declarations related to diffLayer into
the top of each file that used it!!

A header file only has to be written once, and it can be included in as many files as
needed. This also helps with maintenance by minimizing the number of changes that need to
be made if a function prototype ever changes (eg. by adding a new parameter).

When the compiler compiles the #include "Sub.h" line, it copies the contents of Sub.h
into the current file at that point. Because our Sub.h contains a function prototype for sub (),
this prototype is now being used as a forward declaration of sub ().

SJCE, MYSURU Page 13


C++ LAYOUT GENERATOR BASED ON MGEN 2015

OUTPUT

Input will be the two cdf (component description format) parameters length and
width. And layers are directly mapped from the MGEN tech file (referred as Techfile
parameters).

FIGURE 5.1: MOSFET

2. Generate the enclosing layers around the Mosfet (TASK-1)

 Enclosing layers are well layers which enclose a layout device. Usually there
exists overhang rules related to the base device. These rules can be put in a list
structure in order to describe the complete enclosing layers set with only one
parameter.
 In order to draw enclosing layer, I need to modify both C++ and MGEN techfile.
Enclosing Layers has to be declared in the declareParameter(). Corresponding
well or the implant layer has to be mentioned in the MGEN techfile as

enclosingLayers = ((nwLayer GATE)(implantLayer OD)(ppLayer PO) )

 The NWell layer encloses the Gate layer, N-implantLayer encloses diffLayer and
P-implantLayer encloses polyLayer. There is an explicit rule for minimum for the
overhang NWell over Gate, NP over Diffusion and PP over Poly specified. By this

SJCE, MYSURU Page 14


C++ LAYOUT GENERATOR BASED ON MGEN 2015

kind of representation these values are taken implicitely from the techfiles design
rules section.
 Instead of using explicit Overhang rule set I can directly use the following to draw
the same:
enclosingLayers = ((nwLayer GATE [0] ) (implantLayer OD [200] [400] )

In general

 Define the list set


 In the generator method call:
buildEnclosingLayers(<target cell>, <list parameter decl>);
 buildEnclosingLayers can be used multiple time in generator

Files created:
 C++ source file
 Headerfile
 Techfile

OUTPUT

FIGURE 5.2: ENCLOSING LAYERS

SJCE, MYSURU Page 15


C++ LAYOUT GENERATOR BASED ON MGEN 2015

3. Generate guard ring around the MOSET with the specified design rules.
 Guard rings are used in order prevent the leakage of current and also to reduce
the resistance so that speed of the MODFET will be increased.
 To avoid disturbances caused by the minority charge carriers.
 To minimize stay electrons and holes from affecting critical transistors.

To build the guard ring I need three main layers CO_GUARD, Metal layer and
diffusion layer which will be accessed from mgen tech file by specifying it in a C++ source
code.

To draw guard ring I need to make use of a sub generator called GUARDRING which
will be defined in the MGEN file. And will be called in the MYGEN generator.

In C++ file I need to define a function to place guard ring. Even I need to add the
argument in the argument vector table to provide option in the parameter list to ON and OFF
the guard ring. If the sub generator exists then the guard ring cage will be placed else it will
not be placed. Necessary declarations are done in the header section which is included in the
C++ file. In additionally guard ring class has to be included.

OUTPUT

FIGURE 5.3: GUARD RING

SJCE, MYSURU Page 16


C++ LAYOUT GENERATOR BASED ON MGEN 2015

EXPERIENCE SO FAR

It’s a great opportunity to learn and gain knowledge from such a reputed and well
established company. The overall work culture is great here. I have a lot of opportunities and
challenges to work with and to enhance and groom our skills. Along with technicalities, many
extracurricular activities are also organized in the company so that I can even polish our skills
and other talents.

Work Culture
My Learning
Supportive
MGEN
Keen to help
C++ OO approach
Full of learning opportunities
PDK
Friendly Environment
SKILL and PERL

My Team Extra Activities


Friendly Nature Participated and got consolation prize
Helping Teammates in food festival group event
Good Quality Of Discussion Participated In Pictionary time Event

SJCE, MYSURU Page 17


C++ LAYOUT GENERATOR BASED ON MGEN 2015

CONCLUSION
 Reliability of the software written in the C++ is much better than the software written
in C because of strong type checking in C++.
 Vendor independent layout generator implementation  Layout generators can easily
be adapted to non-Cadence tools Better evaluation performance.
 Allows more freedom for generator implementation, e.g. usage of mask operations,
intermediate layers etc.
 Compiled language like C++ more appropriate for big software systems.
 Technology independent implementation.
 no fixed values in C++ code
 no fixed layers in C++ code
 use MGEN techfile parameters for layers and values
 concentrate on layout structure, device variants etc. are handled in techfile

MGEN file is used to create layout for different flavours of devices. The device
parameters in terms of the mask layout polygons’ length and width are varied to generate
devices of different dimensions and flavours. These polygon layers correspond to different
materials used in device fabrication that forms the device.

SJCE, MYSURU Page 18

You might also like