How are generics supported in HDL Coder?

33 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 20 de Dic. de 2017
Editada: MathWorks Support Team el 19 de Oct. de 2021
What are the different ways to use GENERIC parameters in HDL Coder?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 19 de Oct. de 2021
Editada: MathWorks Support Team el 19 de Oct. de 2021
HDL Coder generates parameterized VHDL/Verilog code in the following scenarios:
(1) Use of Model Arguments.
You can use model references and model arguments to generate generic parameters in the generated HDL code for Gain and Constant blocks. The model argument values should resolve to numeric data types at runtime.
(2) Use of Masked Subsystems.
You can generate reusable HDL code for subsystems that have the same tunable mask parameters, but with different values, by enabling 'MaskParameterAsGeneric':
(3) Use of Blackbox Generics.
If you are integrating legacy code using black box subsystem functionality, you can instantiate generic parameters in the module instance using the 'GenericList' parameter:
(4) Use of Address and Data width generics in RAM modules
RAMs are implemented using generic values for address and data widths.
See the attached PDF for an overview.

Más respuestas (1)

Kiran Kintali
Kiran Kintali el 14 de Feb. de 2018
>> web(fullfile(docroot, 'hdlcoder/ref/maskparameterasgeneric.html'))
Please check this page. You can use mask parameters in Gain, Constant blocks and use MaskParametersAsGeneric feature to generate generic parameters in the generated RTL.
If you are using blackbox subsystem functionality you can instantiate generic parameters in the module instance
web(fullfile(docroot, 'hdlcoder/ug/black-box-implementation-for-subsystem-blocks.html'))
In addition model block parameters and RAM instances can also generate generic parameters during code generation.
Please see attached document for details of these use cases.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by