Does anyone know about state variables in HDL Code Generation?

1 Ansicht (letzte 30 Tage)
Pablo Medina
Pablo Medina am 17 Nov. 2016
Beantwortet: Kiran Kintali am 16 Mär. 2017
I receive this error in the HDL Coder Genration stage: hdlcoder:pirudd:NonConstStateInInitialization: State variables must be initialized using constant values for HDL code generation. In file 'eml_fi_checkforntype' line 26, col 1, a non constant value is used for initialization

Antworten (1)

Kiran Kintali
Kiran Kintali am 16 Mär. 2017
Can you please share your design code?
One of the modes this error can popup is if you are using MATLAB code, persistent variables and initializing them with non-zero constant values or with input variables.
the persistent variables which map to flip-flops or RAMs on hardware should always be initialized with zeros.
Please reach out to mw-support related to this question. You can file a documentation and product related bug report here. https://www.mathworks.com/support/bugreports/
Thanks

Kategorien

Mehr zu Code Generation finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by