Basic knowledge

LTspice-Encrypting SPICE model

This article details how to encrypt LTspice’s SPICE model.

Especially when distributing the SPICE model created by you to others, I think that it can be used when you do not want to disclose the contents of the netlist.

Encrypting SPICE Models Using the Command Prompt

SPICE model encryption is performed with the LTspice command using the Windows command prompt.

Originally, I think that there are many cases to encrypt the SPICE model made by myself.

In this article, I will try to encrypt the sub-circuit model of Analog Devices’ op amp “AD8610” used in the following article as a practice.

1

Start the command prompt from “Windows System Tools” of the start menu.

2

Change to the directory where LTspiceXVII is installed at the command prompt.

Enter “cd C:\Program Files\LTC\LTspiceXVII” and press “Enter” to execute.

ここにボックスタイトルを入力

cd C:\Program Files\LTC\LTspiceXVII

3

Because it is used for the command which encrypts the SPICE model, copy the path of the file of the SPICE model that you want to encrypt.

4

Execute the command “XVIIx64.exe -encrypt file path” to encrypt the SPICE model.

In this case, enter 「XVIIx64.exe -encrypt “C:\Users\USER\Documents\LTspiceXVII\lib\sub\Analog_Devices\ad8610.cir”」 and press “Enter”.

Command to encrypt SPICE model

XVIIx64.exe -encrypt “file path”

Example: XVIIx64.exe -encrypt “C:\Users\USER\Documents\LTspiceXVII\lib\sub\Analog_Devices\ad8610.cir”

If you execute the command to encrypt the SPICE model, the original file will be overwritten.

Make sure to back up before performing encryption, as the information in the original file will disappear completely.

5

The above screen appears and encryption starts. Depending on the size of the SPICE model and the environment of the PC used, the encryption time will take about 2 to 5 minutes.

6

When encryption is completed, the above screen appears. Click “OK” to complete all the work.

7

When you open the encrypted SPICE model file, you can see that it has been changed to a hexadecimal list.

Check in simulation

Just in case, let’s use the circuit created in the following article to see if the encrypted SPICE model can be simulated correctly.

1

Open “01_sample-tran-lt1028.asc”.

2

Delete the “LT1028” and place the encrypted SPICE model “AD8610”.

3

Click “Run” on the toolbar to run the simulation. The simulation time varies depending on the size of the circuit.

4

After simulation, as you move the cursor close to the schematic wiring, the cursor changes to “voltage probe”.

Click “Vin” and “OUTPUT” with the voltage probe.

5

The voltage waveforms of “Vin” and “OUTPUT” appear on the waveform display screen. You can see that the output signal is inverted and amplified at twice the input signal.

This confirms that the encrypted SPICE model can be simulated correctly.

Notes on encryption

Notes on encryption
  • The original data is overwritten when it is encrypted
  • Automatic creation of schematic symbols in the sub-circuit model is not possible
  • Can not append to data file with device model

The original data is overwritten when it is encrypted

As described in “Encrypting SPICE Models Using the Command Prompt”, when you execute a command to encrypt SPICE models, the original file is overwritten.

Make sure to back up before performing encryption, as the information in the original file will disappear completely.

Automatic creation of schematic symbols in the sub-circuit model is not possible

In the subcircuit model, it was possible to create a schematic symbol automatically.

However, after encryption, you will not be able to create schematic symbols automatically, and you will also lose pin information.

Therefore, if you distribute the encrypted SPICE model to others, I think that it is better to make a schematic symbol before encryption and let it pass together.

Can not append to data file with device model

In the following article, we explained how to add the device model to the LTspice data file.

However, of course, if you encrypt the SPICE model, all parameters will be encrypted and you will not be able to append to the data file.

Therefore, by saving the file of the device model in the sub folder, it will have to be added to LTspice.

Don`t copy text!