Languages

CommunityCategory: MODELZENMODELZEN setup for Spectre

MODELZEN

MODELZEN setup for Spectre

SA Support Team Staff 2020-09-15

The example technology configuration files (tech_config.py) explained in the tutorials and documentations assume HSPICE as the default SPICE simulator. Can you show me the MODELZEN setup when using Spectre as the default SPICE simulator?

1 Answers
Best Answer
SA Support Team Staff 2020-09-15

Two setup files define the default netlist format and circuit simulator assumed by MODELZEN: .cdsinit and tech_config.py. The .cdsinit file is the initialization script loaded by Cadence Virtuoso and tech_config.py file is the technology configuration file for MODELZEN. The sample .cdsinit and tech_config.py files in case of assuming "spectre" as the default netlist format and "spectre" as the default circuit simulator are attached below.

If you want to try out the MODELZEN tutorial with Spectre instead of HSPICE, you can start with the following steps:

$ cp -R $XMODEL_HOME/tutorial/modelzen_basic
$ cd modelzen_basic
$ cp etc/spectre/* cadence/
$ source etc/setup.bashrc                 # source etc/setup.cshrc for csh
$ cd cadence
$ virtuoso &

The highlight line is the only change, which modifies the two setup files for Spectre.

Here is the description on the changes made on these setup files. First, the change made in the .cdsinit file is just this line:

modelzenDefaultNetlistSimulator = "spectre"

which changes the default format of the netlist to be extracted from schematics from "hspiceD" to "spectre".

Second, the changes made in the tech_config.py file are two folds. The first change instructs MODELZEN that the circuit netlist it is reading is in the Spectre format and preserves cases (unlike the 'hspiceD' format which converts all letters to lower cases):

devo_options['format'] = 'spectre'
devo_options['lowercase'] = False

And the second change instructs MODELZEN to use Spectre as the default circuit simulator characterizing the devices:

devo_options['simulator'] = 'spectre'

This is it!

There might be a few other use cases, though, due to the fact that Spectre can also read the HSPICE format netlists. For example, you may want to extract the "hspiceD"-format netlists from the schematics but use Spectre for device characterizations. In that case, the following line is the only change needed in the tech_config.py file:

devo_options['simulator'] = 'spectre'

And you don't need to make any changes to the .cdsinit file.

For another example, you may want to include the model libraries using the Spectre syntax instead of the HSPICE syntax. For your information, the Spectre syntax looks like this:

include "/tech/ptm045/models.lib" section=TT

whereas the equivalent line in HSPICE syntax looks like this:

.lib "/tech/ptm045/models.lib" TT

Spectre can accept the model statements in both formats, so if you already have the model statements in HSPICE syntax, you can use them as-is for Spectre as well. For example:

dev_model['spectre'] = {
  "default" : """
.lib "/tech/ptm045/models.lib" TT
.temp 27
""",
}

or if your tech_config.py file defines dev_model['hspice'] already, you can simply do:

dev_model['spectre'] = dev_model['hspice']

On the other hand, if you'd like to use the model statements in Spectre syntax, you need to add a "simulator lang=spectre" line at the beginning and "simulator lang=hspice" at the end. For example:

dev_model['spectre'] = {
  "default" : """
simulator lang=spectre
include "/tech/ptm045/models.lib" section=TT
simopts options temp=27
simulator lang=hspice
""",
}

The lines in red declare the changes in the language format. They are necessary because the SPICE decks produced by MODELZEN to run device characterizations are in HSPICE format even when Spectre is used as the simulator.


MODELZEN

Spectre 사용을 위한 MODELZEN 환경 셋업방법

SA Support Team Staff 2020-09-15

튜토리얼과 매뉴얼에 설명된 예제 technology configuration 파일들은 HSPICE를 디폴트 SPICE 시뮬레이터로 가정하고 있습니다. Spectre를 디폴트 SPICE 시뮬레이터로 사용할때의 셋업을 예시를 통해 알려주실 수 있을까요?

1 Answers
Best Answer
SA Support Team Staff 2020-09-15

Two setup files define the default netlist format and circuit simulator assumed by MODELZEN: .cdsinit and tech_config.py. The .cdsinit file is the initialization script loaded by Cadence Virtuoso and tech_config.py file is the technology configuration file for MODELZEN. The sample .cdsinit and tech_config.py files in case of assuming "spectre" as the default netlist format and "spectre" as the default circuit simulator are attached below.

If you want to try out the MODELZEN tutorial with Spectre instead of HSPICE, you can start with the following steps:

$ cp -R $XMODEL_HOME/tutorial/modelzen_basic
$ cd modelzen_basic
$ cp etc/spectre/* cadence/
$ source etc/setup.bashrc                 # source etc/setup.cshrc for csh
$ cd cadence
$ virtuoso &

The highlight line is the only change, which modifies the two setup files for Spectre.

Here is the description on the changes made on these setup files. First, the change made in the .cdsinit file is just this line:

modelzenDefaultNetlistSimulator = "spectre"

which changes the default format of the netlist to be extracted from schematics from "hspiceD" to "spectre".

Second, the changes made in the tech_config.py file are two folds. The first change instructs MODELZEN that the circuit netlist it is reading is in the Spectre format and preserves cases (unlike the 'hspiceD' format which converts all letters to lower cases):

devo_options['format'] = 'spectre'
devo_options['lowercase'] = False

And the second change instructs MODELZEN to use Spectre as the default circuit simulator characterizing the devices:

devo_options['simulator'] = 'spectre'

This is it!

There might be a few other use cases, though, due to the fact that Spectre can also read the HSPICE format netlists. For example, you may want to extract the "hspiceD"-format netlists from the schematics but use Spectre for device characterizations. In that case, the following line is the only change needed in the tech_config.py file:

devo_options['simulator'] = 'spectre'

And you don't need to make any changes to the .cdsinit file.

For another example, you may want to include the model libraries using the Spectre syntax instead of the HSPICE syntax. For your information, the Spectre syntax looks like this:

include "/tech/ptm045/models.lib" section=TT

whereas the equivalent line in HSPICE syntax looks like this:

.lib "/tech/ptm045/models.lib" TT

Spectre can accept the model statements in both formats, so if you already have the model statements in HSPICE syntax, you can use them as-is for Spectre as well. For example:

dev_model['spectre'] = {
  "default" : """
.lib "/tech/ptm045/models.lib" TT
.temp 27
""",
}

or if your tech_config.py file defines dev_model['hspice'] already, you can simply do:

dev_model['spectre'] = dev_model['hspice']

On the other hand, if you'd like to use the model statements in Spectre syntax, you need to add a "simulator lang=spectre" line at the beginning and "simulator lang=hspice" at the end. For example:

dev_model['spectre'] = {
  "default" : """
simulator lang=spectre
include "/tech/ptm045/models.lib" section=TT
simopts options temp=27
simulator lang=hspice
""",
}

The lines in red declare the changes in the language format. They are necessary because the SPICE decks produced by MODELZEN to run device characterizations are in HSPICE format even when Spectre is used as the simulator.