Simulink.ModelReference.ProtectedModel.setPasswordForHDLCodeGeneration(model,password)
adds an encryption password for HDL code generation if you create a protected model. If you
use a protected model, the function provides the required password to generate code from the
model.
A protected model named hdlcoder_referenced_model_gain.slxp is
created that requires an encryption password for HDL code generation. To generate HDL
code for sldemo_mdlref_counter, set floating-point library to
Native Floating-Point and the Oversampling Factor to 14 in
HDL code generation configuration parameters.
Generate HDL Code from an Encrypted Protected Model
Use a protected model with encryption for HDL code generation.
Provide the encryption password required for HDL code generation from the protected
model.
Model name, specified as a string or character vector. It contains the name of a
model or the path name of a Model block that references the protected model.
password — Password for protected model code generation string or character vector
Password, specified as a string or character vector. If the protected model is
encrypted for code generation, the password is required.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.