HDL Coder Error: BITAND/BITOR/BITXOR must have matching operand types
1 回表示 (過去 30 日間)
古いコメントを表示
I built a block diagram that I am trying to export to VHDL using the Simulink HDL Coder.
(right click -> HDL Code -> Generate HDL for Subsystem)
However, I get the following Error message in the report.html
Compilation errors when generating code for: simulink_dds_interpol/interpolation_1//2_compressed1/sin cos LUT 1//2 compressed1\LUT COS_half Error during MATLAB code compilation: Error Path: /shared/eda/lnx_exe/mathworks/mathworks_matlab_r2020b/toolbox/eml/lib/fixedpoint/@embedded/@fi/bitand.m Error Location: (@Row: --> 55 @Column: --> 27) BITAND/BITOR/BITXOR must have matching operand types. Internal Error: This error occurred inside a MathWorks function.
The error appears for the following XOR Block.
In my understanding, both the inputs and the output are boolean. Same Datatype. So what is the operand type then?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/435333/image.png)
0 件のコメント
採用された回答
Kiran Kintali
2020 年 11 月 30 日
HDL Coder team believes this issue has been resolved in the latest releases. Can you share a sample model? We can double check and confirm this and provide a workaround if possible. Feel free to reach out to support@mathworks.com
Output type of Ufix1_E5 or Ufix1_E4 looks suspicious and one would expect ufix1 in the case. Not knowing the full context here but accessing MSB or a bit in the word should result in Ufix1 type. Please check the extract bit block output type settings if this something that may need to be addressed independently. You may also consider BitSlice block to access a bit or set of bits.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で HDL Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!