problems with HDL coder

2 views (last 30 days)
Louis
Louis on 13 Aug 2014
Answered: Tim McBrayer on 25 Aug 2014
Hi,
I try to convert a matlab program to HDL with HDL coder. I created two files, one with the main function (lorenzRK4) and another(the test bench, TBlorenzRK4) where there is just the name of the function.
But when I am at the the step "Define Input Types" I click on Run and I have several errors which all are "Undifined function or variable "X". The first assignement to a local variable determines its claas."
I know that my variables are not define but I don't know how to do this, I thought in Matlab we don't have to do this.

Answers (1)

Tim McBrayer
Tim McBrayer on 25 Aug 2014
You need to write each variable before reading it. Is this occurring? HDL Coder requires some sort of typing information in order to determine what HDL to generate. The HDL Coder flow handles defining the data types of the inputs to your design. All other types must either be defined internally, or be determinable via MATLAB's type propagation rules.

Products

Community Treasure Hunt

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

Start Hunting!