General Concept
This feature allows to build standalone libraries from eHS over Schematic Editor to protect your IP.
Usage
There are 2 ways to use the eHS export Protected Block feature. The first is simply to use the UI, and the second is more automation oriented, using scripts.
...
It will create the protected block in the current model.
...
eHS export Protected Block feature as a script
...
To facilitate the automation of the eHS export Protected Block feature, the Matlab Function that generates the protected block can be called manually inside a script to create a locked library file containing multiple different eHS Protected Blocks. Within the eFPGASIM product, this function is called: generateProtectedBlock.
The generateProtectedBlock function takes in input the Original eHS Block to export and the location where to output the resulting eHS Protected Block. The generateProtectedBlock function can be called multiple times, pointing to the same output file path, in order to create a library of many eHS Protected Blocks.
...
Matlab Function takes 4 inputs:
The file path of the Simulink Model in which the Original Block to be exported is located
The Block Path of the eHS Block to be exported
The output file path in which the eHS Protected Block is to be created
The name of the eHS Protected Block to be created
Behavior
If the output library does not exist, the script will automatically create it.
If the output library exists,
If the block already exists, it will be overwritten.
If the block does not exist, it will be added and properly positioned into the library after the last one.
Example
Take this model for example, an eHS Block situated on the desktop:
...
We want to create a library block called machineLibrary
in which this eHS Block will be exported as a eHS Protected Block. The generateProtectedBlock
function should be called with the following parameters:
Code Block |
---|
>> generateProtectedBlock('C:\Users\admin\Desktop\originalModel', ... 'untitled/eHS SE SFunction Drivers', ... 'C:\Users\admin\Desktop\machinesLibrary', ... 'My PMSM Protected Block'); |
IMPORTANT: Use backslashes ( '\' ) for the file path and forward slashes ( '/' ) for the block path.
...
Now machinesLibrary.slx will contain two eHS Protected Blocks: "My PMSM Protected Block" and "My Other PMSM Protected Block" for the user to use.
...
User Interface
Protected block are using an embedded UI in order to be used standalone.
...
The block may come with multiple setups (Hardware/firmware choice).
This way, you can choose the appropriate one for your own usage. The protected block creator is responsible to describe each setup to its client using the protected model.
In the previous example, Setup 1 matches its name in the Schematic Editor
...
The block can be loaded for any setup and will provide its associated build report in the dedicated tab section.
Limitations
The protected block is associated with the eFPGASIM version that has been used to generate it. This means that the protected block can only be used with an eFPGASIM installer that has the same major and minor number and a patch that is higher or equal to the one used for the generation. If it doesn’t, you won’t be able to build your model, and the following error message will be displayed :
...
To continue to use the protected block with the new version, it needs to be regenerated with the correct eFPGASIM version.