HDL Coder: How to multiply floating point numbers in a stateflow project?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
When I use HDL coder to produce code for the following simulink model (using the altera mega functions library), I get a complicated VHDL program that is able to handle floating points.
When I use HDL coder on the following stateflow model (again using the altera mega functions library)
I the floating point "variable" is just multiplied with the hexadecimal representation of a the floating point "1.1"
Multiplying two floating point numbers as if they were fixed point numbers obviously doesn't produce the correct result.
Is this a bug in stateflow or am I just not configuring HDL Coder correctly?
How can I solve this?
Note: I would like to avoid being restricted to fixed point numbers...
0 comentarios
Respuestas (1)
Kiran Kintali
el 20 de Oct. de 2020
HDL Coder does not support Stateflow models with floating-point Math in actions. Please consider using MATLAB Function block with MALTAB data path architecture to model floating-point algorithms.
0 comentarios
Ver también
Categorías
Más información sobre HDL Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!