Languages

CommunityCategory: MODELZENGenerating models with multiple corner conditions with MODELZEN

MODELZEN

Generating models with multiple corner conditions with MODELZEN

SA Support Team Staff 2020-08-28

Currently, my technology configuration file (i.e., the tech_config.py file) assumes one particular corner for process, voltage, and temperature (PVT) conditions. Is there a way to define multiple corner conditions in the tech_config.py file and generate models that support multiple corner conditions with MODELZEN?

1 Answers
Best Answer
SA Support Team Staff 2020-08-28

Yes, you can define multiple corner conditions in a single technology configuration file and select one corner condition among them when running MODELZEN to generate the models. Currently, MODELZEN generates models assuming only one corner condition at a time and you can run MODELZEN multiple times to generate multiple sets of models each corresponding to a different corner condition.
You can define a set of corner conditions using two dictionary variables named 'dev_model' and 'dev_corner' in the technology configuration file.
The 'dev_model' dictionary defines a set of SPICE statements that include the SPICE model libraries and define voltage and temperature conditions for characterizing the devices or circuits with SPICE. For example, the example technology configuration file located in ${XMODEL_HOME}/etc/tech_config.py has the following entries for dev_model['hspice']. In the same file, you can also find the equivalent entries defined for dev_model['spectre'].

dev_model['hspice'] = {
  "default" : """
.lib "/cad/tech/cmos014/hspice/mosfet_model.lib" TT
.lib "/cad/tech/cmos014/hspice/passive_model.lib" typ
.temp 25
""",
}

Variables can be embedded in these statements so that the actual content used in the SPICE characterization decks can change depending on the values of these variables. For instance, the following example uses three embedded Python variables, proc1, proc2, and temp, each specifying the library names to include and temperature value, respectively. For more information on how to embed Python variables within a string, please refer to the EmPy documentation (link).

dev_model['hspice'] = {
  "default" : """
.lib "/cad/tech/cmos014/hspice/mosfet_model.lib" @proc1
.lib "/cad/tech/cmos014/hspice/passive_model.lib" @proc2
.temp @temp
""",
}

The 'dev_corner' dictionary defines the values of these variables. The example below defines the values of the variables proc1, proc2, and temp as 'TT', 'typ', and 25, respectively, so that it has the same effect as the first example without the embedded variables.

dev_corner['hspice'] = {
  "default"  : dict(proc1='TT', proc2='typ', temp=25),
}

It is also possible for the 'dev_corner' dictionary to define multiple sets of the variable values, each indexed by a user-defined corner name. For instance, the example below defines three corner conditions, 'TYPICAL', 'FAST' and 'SLOW', in addition to the default corner 'default'. And for each corner condition, the variables proc1, proc2, and temp have different values. For example, for a corner named 'FAST', the values of proc1, proc2, and temp are 'FF', 'best', and -30, respectively.

dev_corner['hspice'] = {
  "default"  : dict(proc1='TT', proc2='typ', temp=25),
  "TYPICAL"  : dict(proc1='TT', proc2='typ', temp=25),
  "FAST"     : dict(proc1='FF', proc2='best', temp=-30),
  "SLOW"     : dict(proc1='SS', proc2='worst', temp=125),
}

You can select the desired corner condition among the ones defined within the technology configuration file by using the '--corner' option on the command line or defining the 'Simulation Corner' option located in the 'Simulation' tab of the MODELZEN's GUI dialog window.

$ modelzen circuit.sp -c tech_config.py -o model.sv --corner FAST


When you don't explicitly specify the corner condition, MODELZEN assumes a corner named 'default'. The example below shows a way to make one of the user-defined corner conditions the default one. Since MODELZEN's technology configuration file uses the flexible Python syntax to define the options, there are multiple ways to achieve the same results.

# user-defined corner conditions
dev_corner['hspice'] = {
  "TYPICAL"  : dict(proc1='TT', proc2='typ', temp=25),
  "FAST"     : dict(proc1='FF', proc2='best', temp=-30),
  "SLOW"     : dict(proc1='SS', proc2='worst', temp=125),
}

# default corner condition
dev_corner['hspice']['default'] = dev_corner['hspice']['FAST']

MODELZEN

MODELZEN에서 복수 코너 조건을 가진 모델 생성

SA Support Team Staff 2020-08-28

MODELZEN으로 회로에서 모델을 생성하고 있습니다. 현재 제가 쓰고 있는 technology configuration 파일(이하 tech_config.py 파일)에서는 공정, 전압, 온도에 대해서 한가지 코너 조건만 정의하고 있는데요, 하나의 tech_config.py 파일 안에서 하나가 아닌 복수의 코너 조건을 정의하고, 각 코너 조건에 해당하는 모델을 생성하는 방법이 있나요?

1 Answers
Best Answer
SA Support Team Staff 2020-08-28

Yes, you can define multiple corner conditions in a single technology configuration file and select one corner condition among them when running MODELZEN to generate the models. Currently, MODELZEN generates models assuming only one corner condition at a time and you can run MODELZEN multiple times to generate multiple sets of models each corresponding to a different corner condition.
You can define a set of corner conditions using two dictionary variables named 'dev_model' and 'dev_corner' in the technology configuration file.
The 'dev_model' dictionary defines a set of SPICE statements that include the SPICE model libraries and define voltage and temperature conditions for characterizing the devices or circuits with SPICE. For example, the example technology configuration file located in ${XMODEL_HOME}/etc/tech_config.py has the following entries for dev_model['hspice']. In the same file, you can also find the equivalent entries defined for dev_model['spectre'].

dev_model['hspice'] = {
  "default" : """
.lib "/cad/tech/cmos014/hspice/mosfet_model.lib" TT
.lib "/cad/tech/cmos014/hspice/passive_model.lib" typ
.temp 25
""",
}

Variables can be embedded in these statements so that the actual content used in the SPICE characterization decks can change depending on the values of these variables. For instance, the following example uses three embedded Python variables, proc1, proc2, and temp, each specifying the library names to include and temperature value, respectively. For more information on how to embed Python variables within a string, please refer to the EmPy documentation (link).

dev_model['hspice'] = {
  "default" : """
.lib "/cad/tech/cmos014/hspice/mosfet_model.lib" @proc1
.lib "/cad/tech/cmos014/hspice/passive_model.lib" @proc2
.temp @temp
""",
}

The 'dev_corner' dictionary defines the values of these variables. The example below defines the values of the variables proc1, proc2, and temp as 'TT', 'typ', and 25, respectively, so that it has the same effect as the first example without the embedded variables.

dev_corner['hspice'] = {
  "default"  : dict(proc1='TT', proc2='typ', temp=25),
}

It is also possible for the 'dev_corner' dictionary to define multiple sets of the variable values, each indexed by a user-defined corner name. For instance, the example below defines three corner conditions, 'TYPICAL', 'FAST' and 'SLOW', in addition to the default corner 'default'. And for each corner condition, the variables proc1, proc2, and temp have different values. For example, for a corner named 'FAST', the values of proc1, proc2, and temp are 'FF', 'best', and -30, respectively.

dev_corner['hspice'] = {
  "default"  : dict(proc1='TT', proc2='typ', temp=25),
  "TYPICAL"  : dict(proc1='TT', proc2='typ', temp=25),
  "FAST"     : dict(proc1='FF', proc2='best', temp=-30),
  "SLOW"     : dict(proc1='SS', proc2='worst', temp=125),
}

You can select the desired corner condition among the ones defined within the technology configuration file by using the '--corner' option on the command line or defining the 'Simulation Corner' option located in the 'Simulation' tab of the MODELZEN's GUI dialog window.

$ modelzen circuit.sp -c tech_config.py -o model.sv --corner FAST


When you don't explicitly specify the corner condition, MODELZEN assumes a corner named 'default'. The example below shows a way to make one of the user-defined corner conditions the default one. Since MODELZEN's technology configuration file uses the flexible Python syntax to define the options, there are multiple ways to achieve the same results.

# user-defined corner conditions
dev_corner['hspice'] = {
  "TYPICAL"  : dict(proc1='TT', proc2='typ', temp=25),
  "FAST"     : dict(proc1='FF', proc2='best', temp=-30),
  "SLOW"     : dict(proc1='SS', proc2='worst', temp=125),
}

# default corner condition
dev_corner['hspice']['default'] = dev_corner['hspice']['FAST']