HDL Coder failing for single-precision

2 views (last 30 days)
I have a single-precision sub-module that is failing HDL generation when using the native floating point library with the following error in R2019b (both Update 4 and 6):
Compilation errors when generating code for: model/subsystem\reset_in Error during MATLAB code compilation: Error Path: /usr/local/MATLAB/R2019b/toolbox/hdlcoder/hdlcommon/emlauthoring/wireops/hdleml_switch_multiport.p Error Location: (@Row: --> 1 @Column: --> 1) This assignment writes a 'double' value into a 'single' type. Code generation does not support changing types through assignment. Check preceding assignments or input type specifications for type mismatches. Internal Error: This error occurred inside a MathWorks function.
I have a work-around so this isn't blocking me but can someone from Mathworks take a look "under the hood"?
Thanks,
Andy

Accepted Answer

Andrew Nicol
Andrew Nicol on 12 Nov 2020
Edited: Andrew Nicol on 12 Nov 2020
Adding more context: with a different model, I encountered this same issue. Interestingly, I can make it go away by unselecting the "Minimize intermediate signals" option. Hopefully that will help anyone else that gets hit by this...

More Answers (1)

Kiran Kintali
Kiran Kintali on 27 Aug 2020
Thank you for reporting this error. This is unexpected.
Can you share a reproduction model? It will help verify this issue is resolved and/or publish a workaround or patch for the OriginatedIn release.
  3 Comments
Kiran Kintali
Kiran Kintali on 27 Aug 2020
Thank you for the response.
You can share the following information to help the development team isolate the issue and make sure it is resolved in the 20a or one of the upcoming releases.
  1. Release you are into this issue (output of ver command)
  2. HDL Coder options used during code generaiton hdlsaveparams('model/path_to_dut')
  3. makehdl('model/path_to_dut', 'debug', 1/2/3/4) one of these debug levels sometimes isolates the issue and points to the block running into the issue.
  4. If you already have a work-around (such a block replaced) you can provide a sample model with just the block that got replaced etc., if it can reproduce the same issue.
You can reach out to me kiran.kintali@mathworks.com or support@mathworks.com for further assistance if any needed.
Andrew Nicol
Andrew Nicol on 27 Aug 2020
Hi Kiran - I sent you the log files via email. I'll close out this question and we can continue in email form :-)

Sign in to comment.

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!