Product Documentation
Spectre AMS Designer and Xcelium Simulator Mixed-Signal User Guide
Product Version 22.09, September 2022

Using spectre_encrypt for Source Protection

spectre_encrypt is a standalone encryptor that you can use to encrypt Spectre model files. Encryption enables you to protect your proprietary parameters, subcircuits, models, netlists, and release your libraries to your customers without revealing sensitive information.

To encrypt part or all of a Spectre model file, do the following:

  1. Open the file in a text editor.
  2. Type protect above the data you want to protect.
  3. Type unprotect after the last line of the data you want to protect. You must use the protect and unprotect keywords in pairs.

    You use the protect and unprotect keywords to mark regions for protection in Spectre model files. For example, the following code leaves the name and I/O pins public.

    subckt inv out in protect
    parameters wi=1u le=3u
    mp1 mid in vd vd pmos w=wi l=le
    mn1 mid in 0 0 nmos w=wi l=le
    r1 mid out resistor r=2k
    model pmos bsim3v3 type=p tnom=27.0 tox=2.9e-09
    model nmos bsim3v3 type=n tnom=27.0 tox=2.8e-09
    unprotect
    ends

    For more information and examples, see "Encryption" in the Spectre Circuit Simulator and Accelerated Parallel Simulator User Guide.

  4. Save the netlist.
  5. Run spectre_encrypt on the input files containing the regions to be protected.

xrun can process design files that contain models encrypted using spectre_encrypt (when subcircuit boundaries are not encrypted). xrun cannot process subcircuits or SPICE-in-the-middle constructs encrypted using spectre_encrypt because of the encrypted boundaries.

The spectre_encrypt Command

Although the protect and unprotect keywords mark the regions of a Spectre model file that are to be protected, encryption actually occurs when you run the spectre_encrypt command on the source files.

Syntax

spectre_encrypt [-i input_file ][-o output_file ][-all]

where

input_file

The path and name of the file to be encrypted. If you do not specify the input file, the standard input is encrypted.

output_file

The path and name of a file to hold the encrypted model. The extension that you use for output_file must be the same extension used on input_file. If you do not specify the output file, the encrypted model is displayed as standard output in the terminal window.

-all

Encrypts the entire Spectre model file, ignoring any protect and unprotect keywords.

When you run spectre_encrypt, the protect and unprotect keywords are replaced with pragma statements in the output file. The pragma statements contain important information about encryption such as the method used, the key name, and the beginning and end of the encrypted block. The AMS Designer simulator uses this information while decrypting the netlist, so do not modify any pragma statements or the encrypted text between the pragma statements in the output file.

Related Topics



 ⠀
X