Issue creating symbol from encrypted netlist in QSPICE

Hi all,

I’m encountering an issue when trying to create a symbol from an encrypted netlist file, and I’m not sure if this is user error or a possible bug.

When using an unencrypted netlist, everything works perfectly. However, after creating a symbol from the encrypted netlist, I receive the following error when trying to run a simulation: “Fatal error: Error: too few nodes”

Steps I followed:

  1. Generated the Netlist Subcircuit text from the parent hierarchical schematic and saved it into two files. Then added “.protect” and “.unprotect” after the start of the subcircuit and before it ends:
    .protect" :

    • MyNetlist.txt (original)
    • MyNetlist_Encrypted.txt (ready for encryption)

Example content for MyNetlist_Encrypted.txt :

.subckt MyBlock IN OUT VCC GND
.protect
* internal netlist here...
.unprotect
.ends MyBlock
  1. Successfully encrypted the netlist (MyNetlist_Encrypted.txt) by running the following command in the terminal:
C:\Users\USER\QSPICE\QSPICE64.exe -ProtectSelections MyNetlist_Encrypted.txt
  1. Tested the original unencrypted netlist (MyNetlist.txt):

    • Successfully generated a symbol and placed it in my test bench schematic in QSPICE.
    • Then ran simulation in my test bench schematic without issues, and the waveform data window displayed correctly.
  2. Tested the encrypted version (MyNetlist_Encrypted.txt)

    • Successfully generated the symbol as well, and placed it in the same test bench schematic as before.
    • It unfortunately does not run successfully, and the following error message appears in the output window:
Fatal error: Error: too few nodes: ã˜â´x9 â«vcciâ´d vccpâ´d aresetb_slice0â´bâ» â«porb_vddiâ´b porb_combâ´bâ» â«vssâ» por

Some questions about this issue;

  • Is there a specific procedure for encrypting netlists with hierarchical schematics and .dll files?
  • Are there format requirements for creating a symbol from encrypted netlists that I might be missing?
  • Has anyone encountered similar “too few nodes” errors with encrypted subcircuits? What could it refer to, other than supposedly not enough pins?
  • Could this be an encoding issue during the encryption process?

Any help to resolve this issue would be greatly appreciated!
-JMT

Based on the error message, my assumption is that when you copy the netlist and paste it into a text document, the document is encoded in UTF-8 format. Qspice utilizes special characters to represent devices (e.g., Ø), and it reads netlist files in ANSI format. Consequently, a UTF-8 encoded document will return mismatch characters when read as ANSI.
I recommend using Notepad++ to convert the document to ANSI format. And protection command should be run with an ANSI text format file.

1 Like

Thank you so much!!! This seems to have resolved the issue. The new symbol, made from the encrypted netlist (in ANSI text format file), successfully runs in my testbench.

BR,
JMT

1 Like