MATLAB: Error while converting Simulink model with lookup tableto VHDL using HDL coder

HDL Coderhdl coder error

While trying to convert to VHDL code from SImulink Model File(Which has a lookup table using the HDL coder,it is giving an error
"Double data type not supported on ports of the Lookup Table (n-D) block."
When the port data types are checked it is showing the input and output data types as Single and int8 respectively. Please help to resolve this problem

Best Answer

HDL Coder interprets both double and single MATLAB data types as double, emitting a message stating this fact. It does so because neither VHDL nor Verilog have a native representation corresponding to a 32-bit floating point value.
Floating point numbers are not in general synthesizable. Your best bet will be to convert your single values to an appropriately scaled fixed-point data type, and use that type instead of single in your model.
Related Question