Chaitra Report
Chaitra Report
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
to interpret the binary format piped from the C++ generators and convert it to the
corresponding tool specific layout objects.
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 LIBRARY
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
C++ SOURCE
CODE (*.C)
C++ COMPILER
EXECUTABLES WILL
CREATE SKILL CODE
OUTPUT
(DESIRED
LAYOUT) Viewed in Virtuoso
. /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)
CHAPTER 2
LITERATURE SURVEY
Munich Germany.
[5]. Using Cadence Virtuoso, a UNIX based OrCAD PSpice like program,
Remotely on a Windows Machine.
[7]. Virtuoso Layout Editor UMBC Tutorial Ekarat Laohavaleeso Chintan Patel.
CHAPTER 3
OBJECTIVE
Main objective of the training includes
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
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.
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 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/.
ParameterValueBase :: RULE
ParameterValueBase :: LAYER
ParameterValueBase :: STRING
ParameterValueBase :: NUMBER
ParameterValueBase :: LIST
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.
MGEN TECHFILE:
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.
Inorder to build Mosfet I need diffusion, poly layer. These layers have to be mapped
to the MGEN techfile layers.
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.
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.
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.
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 ().
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).
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
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
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
Files created:
C++ source file
Headerfile
Techfile
OUTPUT
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
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
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.