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:
- Open the file in a text editor.
- Type
protectabove the data you want to protect. - Type
unprotectafter the last line of the data you want to protect. You must use theprotectandunprotectkeywords in pairs.
You use the
protectandunprotectkeywords 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
endsFor more information and examples, see "Encryption" in the Spectre Circuit Simulator and Accelerated Parallel Simulator User Guide.
- Save the netlist.
- Run
spectre_encrypton 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
|
|
The path and name of the file to be encrypted. If you do not specify the input file, the standard input is encrypted. |
|
|
The path and name of a file to hold the encrypted model. The extension that you use for |
|
|
Encrypts the entire Spectre model file, ignoring any |
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.
