![]() Advanced SIMPLIS Training
|
To download the examples for Module 4, click Module_4_Examples.zip
In this Topic Hide
Models can be encrypted for delivery to customers without releasing your IP.
How to easily convert a hierarchical schematic design to use an ASCII or encrypted ASCII model.
How the POP Trigger gate can be inside the ASCII or encrypted ASCII model.
A set of ASCII model library creation scripts have been incorporated into SIMetrix/SIMPLIS release 7.20d. These scripts reduce the effort required to create ASCII model libraries to a single click operation. In this topic you will create ASCII and encrypted ASCII model libraries for two Schematic Component files, create their associated symbols, and convert the schematic over to use the ASCII models.
Open the schematic 4.2_LLC_Closed_Loop.sxsch.
Select U2, the optocoupler defined by the schematic component Gen_Opto.sxcmp.
Right click to bring up the context menu, and execute the menu
option: Create ASCII Model from .sxcmp.
Result: A new schematic briefly appears,
and is closed. Behind the scenes SIMetrix/SIMPLIS has created a plain
text model library file, then encrypted that model library file, outputting
a second model library text file. The two files which are created
are:
The following two messages are output to the shell:
Open the ASCII plain text model library Gen_Opto.lb in Notepad++.
Right click on the schematic tab:
Select the Open Containing
Folder menu option.
Result: a Windows Explorer window opens
to the schematic directory.
Right click on the Gen_Opto.lb
file and execute the context menu Edit
with Notepad++.
Result: The ASCII model library Gen_Opto.lb opens in Notepad++:
Press Ctrl+O and open
the Gen_Opto_encrypted.lb
file.
Result: The encrypted model for the Gen_Opto.sxcmp
schematic component opens in Notepad++.
Note the files are identical up line #20 where the encryption start tag is located. The encryptor reads the plain text Gen_Opto.lb library file and encrypts all text between the start and end tags, generating the encrypted model library file Gen_Opto_encrypted.lb.
In the Getting Started section you created ASCII text versions of the Gen_Opto Schematic Component file. The resulting ASCII text models are exact replicas of the model described by the schematic, including any parameterization. Also, these ASCII text models are significantly more robust than a Schematic Component based model, especially if the encrypted version is used. For these reasons, plain or encrypted ASCII text models are used for distribution to a wide audience.
The ASCII model generation scripts automatically add the encryption start tag (lines 19-21 above) and end tag to the plain text model library. Once the encryption tags are added, the model is ready for encryption, and as the tags are comments, the plain text library file is also simulation ready. In the final step of ASCII model generation, the stand-alone AES encryptor is called on the plain text library file to generate an encrypted library file. The entire process takes at most a few seconds, and your intellectual property never leaves your computer.
SIMPLIS supports several encryption schemes. The stand-alone AES encryptor is a command line executable utility located in the bin directory of your SIMetrix/SIMPLIS installation. You used this encryptor in the Getting Started section of this topic. Another encryption scheme is used for the private label SIMetrix/SIMPLIS products, such as EE-Sim. These models are encrypted by SIMPLIS technologies from the same plain text source file created in the Getting Started section.
Modifying schematics to use ASCII models is easy with the new ASCII model creation menu items. In the following exercises, you will create both ASCII model libraries and symbols which call those ASCII models.
In this exercise, you will create the ASCII model library and a symbol which calls the ASCII model for the optocoupler U2.
Open the schematic 4.2_LLC_Closed_Loop.sxsch, if its closed.
Select U2, the optocoupler defined by the schematic component Gen_Opto.sxcmp.
Right click to bring up the context menu, and execute the menu
option: Create ASCII Model and Symbol
from .sxcmp.
Result: As in the Getting
Started section, the program creates the ASCII model; however,
an additional step creates a copy of the symbol contained in the Schematic
Component file and after modifying the symbol to call the ASCII model,
saves the symbol to a symbol library file. A pop-up dialog asks you
if you want to install the newly created symbol library: You need
to install the library to use a keyboard shortcut to place the new
symbol.
Click on the Yes button
to install the symbol library file.
Result: SIMetrix/SIMPLIS installs the symbol
library file and reports to the shell what actions have been completed,
and what the next steps are:
Created ASCII plain text library file:
C:\Training\Module_4_Examples\Gen_Opto.lb
Created ASCII encrypted text library file:
C:\Training\Module_4_Examples\Gen_Opto_encrypted.lb
Saved the symbol to the symbol library file:
C:\Training\Module_4_Examples\Gen_Opto.sxslb
And installed the symbol library file.
To use the newly created ASCII definition:
1) On the current schematic, execute the menu : File->Save As... and choose a new file name. You will then modify this schematic to use the ASCII model library.
2) On the newly saved schematic, delete the original hierarchical symbol for U2, and press Q to replace the symbol with the ASCII model library version.
3) Include the ASCII model library in the simulation. One easy way to do this is with a .include statement.
Copy one of the following and paste into the F11 window after the .SIMULATOR DEFAULT statement.
To use the plain ASCII text version,
.include Gen_Opto.lb
To use the encrypted ASCII text version,
.include Gen_Opto_encrypted.lb
In the first exercise you created a symbol and two ASCII text model library files; however, the scripts do not change the actual schematic. In this exercise you will configure the schematic to use the new optocoupler symbol which calls the encrypted ASCII text model library.
From the schematic menu, select File ▶ Save As..., and save the file to 4.3_LLC_Closed_Loop_ASCII.sxsch, in the same directory: C:\Training\Module_4_Examples\.
First, you need to replace the symbol for U2. The existing symbol calls the Schematic Component file Gen_Opto.sxcmp, whereas you need a symbol which calls the ASCII model.
Press the Del key to delete U2.
Press Q to place the new symbol. Move the mouse cursor to the location where the previous symbol for U2 was located.
Click the left mouse button to place the new symbol
in the exact location where the old optocoupler symbol was located.
Result: The newly placed symbol calls
the ASCII model when the design is simulated.
Second, you need to make the ASCII model available to the simulator.
Copy the text from the text from the SIMetrix/SIMPLIS command shell:
Press F11 to open the command (F11) window.
Paste the copied text in the command (F11) window below
the .SIMULATOR
DEFAULT statement: As there are variables
in the F11 window, you can paste this line at the very bottom
of the command (F11) window.
Run the simulation by pressing F9.
Result: The simulation runs, using the
encrypted ASCII model.
Verify the deck file has the encrypted model content:
From the command shell menu, select SIMPLIS
▶ Edit Netlist (after preprocess).
Result: The deck file opens in Notepad++.
Use the shortcut key Ctrl+F to open the search dialog.
Type Gen_Opto in the search box.
Click on the Find
Next button.
Result: The document scrolls to line
#110 where the instantiation line for U2 is located. The encrypted
subcircuit definition is below, starting with the comment line
on line #113.
In this exercise you will repeat the ASCII model/symbol creation process for the LLC Modulator block. You will see an additional step is be required to prepare the ASCII schematic to run.
Select U1, the LLC Modulator defined by the schematic component LLC_Modulator_Closed_Loop.sxcmp.
Right click to bring up the context menu, and execute the menu
option: Create ASCII Model and Symbol
from .sxcmp.
Result: As in the first exercise, the ASCII
model libraries and the symbol are created. A pop-up dialog asks you
if you want to install the newly created symbol library: You need
to install the library to use a keyboard shortcut to place the new
symbol.
Click on the Yes button
to install the symbol library file.
Result: SIMetrix/SIMPLIS installs the symbol
library file and reports to the shell what actions have been completed,
and what the next steps are.
Replace the symbol for U1 with the same procedure as with the optocoupler, U2.
Press the Del key to delete U1.
Press Q to place the new symbol. Move the mouse cursor to the location where the previous symbol for U1 was located.
Click the left mouse button to place the new symbol
in the exact location where the old LLC Modulator symbol was located.
Result: The newly placed symbol calls
the ASCII model when the design is simulated.
Make the plain text ASCII model available to the simulator.
Copy the text from the text from the SIMetrix/SIMPLIS command shell:
Press F11 to open the command (F11) window.
Paste the copied text in the command (F11) window
below the .include
Gen_Opto_encrypted.lb statement you added
in the second exercise.
Run the simulation by pressing F9.
Result: The simulation fails because the
design has no POP Trigger schematic device. In the process of converting
the LLC Modulator block to an ASCII model, the schematic POP Trigger
device was also converted to ASCII text. As a result, the program
cannot find the POP Trigger schematic device (a symbol) and the following
error message opens:
In the next exercise you will identify the correct POP Trigger gate - this gate is located in the ASCII model for the LLC Modulator.
When the ASCII model for the LLC Modulator was created in the third exercise, the program searched out the POP Trigger gate information and placed the trigger gate information in the library file as a comment. In this exercise you will copy that information and change the POP Analysis to use this fixed trigger gate.
Open the ASCII plain text model library LLC_Modulator_Closed_Loop.lb in Notepad++.
Right click on the schematic tab:
Select the Open Containing
Folder menu option.
Result: a Windows Explorer window opens
to the schematic directory.
Right click on the LLC_Modulator_Closed_Loop.lb
file and execute the context menu Edit
with Notepad++.
Result: The ASCII model library LLC_Modulator_Closed_Loop.lb opens in Notepad++:
Copy the trigger gate information from the model library. The trigger gate information is X$U1.X1.!D_CYCLE, as highlighted above.
Navigate to the SIMetrix/SIMPLIS schematic window.
Press F8 or execute the schematic menu: Simulator ▶ Choose Analysis... to open the Choose SIMPLIS Analysis Dialog.
On the POP tab, Uncheck the Use "POP Trigger" schematic device check box.
Paste the trigger gate information into the Trigger
gate field.
Result: The modified dialog should appear
as follows:
Click on the Run button.
Result: The simulation executes using the
encrypted ASCII text models for the LLC Modulator and the optocoupler.
There are several ways to wrap up a model for distribution to customers. In the exercises you used a .include statement to include the model library file in the simulation. The netlist preprocessor will insert the entire model library file into the netlist when the design is run. You could also simply copy and paste the model text into the F11 window in place on the .include statement, as discussed in Including_Models_in_the_Command__F11__Window. This will reduce the design to just the single top level test schematic, in this case, the file you created: 4.3_LLC_Closed_Loop_ASCII.sxsch. This is a common way to distribute models.
Symbol libraries were created for the LLC Modulator and the optocoupler blocks during the exercises. When you placed the symbols on the schematic using the keyboard shortcut Q, a copy of the symbol was made and placed in the schematic file. If you intend to distribute the design to individual customers, you will not need the symbol libraries; however, if the models and symbols are intended for general release in SIMetrix/SIMPLIS, the symbol libraries are required. You can collect individual symbols from the multiple symbol libraries using the symbol manager. The SIMetrix/SIMPLIS command shell menu File ▶ Symbol Editor ▶ Symbol Manager... will open the Symbol Manager. Also, its important to remember the symbol libraries were installed during the model creation process. You can remove the symbol libraries when they are no longer needed with the Symbol Manager. See also: Installing_and_Removing_Symbol_Libraries.
As with the symbol libraries, you will only need the model library files to include in the simulation using the .include statement, or for general release in SIMetrix/SIMPLIS. The ASCII model creation scripts create a single file per model, you can manually collect the individual models to a single model library file for general release.
Converting models to ASCII text allows the models to be encrypted for delivery to customers without releasing your IP.
The Create ASCII Model and Symbol from .sxcmp menu item converts a hierarchical schematic design to a plain text ASCII and encrypted text ASCII model and creates a symbol to call either text-based model.
The POP Trigger gate can be inside the ASCII or encrypted ASCII model. You can explicitly define the POP trigger gate on the Choose SIMPLIS Analysis dialog.
|
© 2015 simplistechnologies.com | All Rights Reserved