HDL Coder Java null pointer exception during automatic Fixed-Point conversion
이전 댓글 표시
I was testing a design with HDL Coder and kept running into a Java NullPointerException. To debug the issue, I created several simple tests each involving matrix-wise power, matrix transpose, and complex numbers, HDL Coder still reports basically same errors for these operations.
Error code:
Exception in thread "AWT-EventQueue-0": java.lang.NullPointerException
at com.mathworks.toolbox.coder.model.MetadataTree.getFunctionNode(MetadataTree.java:59)
at com.mathworks.toolbox.coder.model.MetadataTree.getNode(MetadataTree.java:44)
at com.mathworks.toolbox.coder.model.MetadataTree.put(MetadataTree.java:27)
at com.mathworks.toolbox.coder.mi.ConversionUtils.convertRangesAndTypes(ConversionUtils.java:562)
at com.mathworks.toolbox.coder.mi.ConversionUtils.convertRangesAndTypes(ConversionUtils.java:500)
at com.mathworks.toolbox.coder.fixedpoint.FixedPointController.handleSimulationResults(FixedPointController.java:690)
at com.mathworks.toolbox.coder.fixedpoint.FixedPointController.access$1100(FixedPointController.java:71)
at com.mathworks.toolbox.coder.fixedpoint.FixedPointController$11.handleResult(FixedPointController.java:506)
at com.mathworks.toolbox.coder.mi.FevalCommand$1.run(FevalCommand.java:119)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
채택된 답변
추가 답변 (1개)
Navan Ruthramoorthy
2026년 1월 28일
1 개 추천
Hi Xiaotong,
Your test bench files do not seem to be calling the design files you have attached. For example, the function tb_hdl_matrix_power calls hdl_matrix_power which is not attached. But you have attached hdl_array_power.m.
Could you share which release you are using?
To see a working example you can type
>> mlhdlc_demo_setup sfir
This will create a temporary folder with sample design and testbench. You can use the files mlhdlc_sfir (design) and mlhdlc_sfir_tb (test bench) from the temporary directory that got created and try HDL code generation.
카테고리
도움말 센터 및 File Exchange에서 Code Generation에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!