What is the reason for error in HDL Coder and Cadence Stratus HLS tutorial?

조회 수: 10 (최근 30일)
Eerik
Eerik 2024년 6월 11일
댓글: Kiran Kintali 2024년 6월 25일
Hi all,
I'm trying to complete this tutorial https://se.mathworks.com/help/hdlcoder/ug/get-started-with-matlab-to-hls-workflow-using-hdl-coder-app.html but I get stuck in the Verification step in Workflow Advisor. I get this output in the Workflow Advisor window in Verification step (Verify with HLS Test Bench):
## Begin TestBench generation.
Code generation successful.
### Collecting data...
### Begin HDL test bench file generation with logged samples
### Generating test bench data file: x_in.dat.
### Generating test bench data file: y_out_expected.dat.
### Generating test bench data file: delayed_xout_expected.dat.
### Generating test bench file: mlhdlc_sfir_fixptClass_tb.hpp
### Running Stratus Importer on the generated testbench.
### Working on mlhdlc_sfir_fixpt_bdw_import_log.txt as mlhdlc_sfir_fixpt_bdw_import_log.txt.
Stratus Importer failed. See 'mlhdlc_sfir_fixpt_bdw_import_log.txt' for details.
Error in CadenceStratus>>generateBDWImportScripts at 0
Error in CadenceStratus>>postTBGen at 0
Error in HLSPostCodegenDriver>>postTBGen at 0
Error in Manager>>wfa_runHLSSimulation at 0
And following error message to Matlab Command window:
Error using emlhdlcoder.HLSDriver.Tools.CadenceStratus/generateBDWImportScripts
Stratus Importer failed. See 'mlhdlc_sfir_fixpt_bdw_import_log.txt' for
details.
Error in emlhdlcoder.HLSDriver.Tools.CadenceStratus/postTBGen
Error in emlhdlcoder.HLSDriver.HLSPostCodegenDriver/postTBGen
Error in emlhdlcoder.WorkFlow.Manager/wfa_runHLSSimulation
And here is the content of the 'mlhdlc_sfir_fixpt_bdw_import_log.txt' file is:
INFO: Searching /sw/rhel7/cadence/STRATUS2301 for template
WARNING: BDW_IMPORT_ML_CLOCK_FREQ = 0, using default 5.0.
INFO: Processing template tb.cc
FATAL ERROR: Unable to process template tb.cc
I'm using Matlab version R2024a and Cadence Stratus 23.01, but tested also with 22.01 which gave same error. What are the software versions that this tutorial is verified to work?

답변 (2개)

Kiran Kintali
Kiran Kintali 2024년 6월 11일
We are not aware of such issues with Stratus integration. The error seems to happen post MATLAB to SystemC translation during Stratus project creation time. Would you be able to share your MATLAB code and the project file or a runme file with the codegen command?
Typically the tool version is managed here... https://www.mathworks.com/help/hdlcoder/gs/language-and-tool-version-support.html. although the Stratus version looks not updated; I will check and get back to you.
  댓글 수: 1
Eerik
Eerik 2024년 6월 12일
편집: Eerik 2024년 6월 12일
Thanks for the answer. I use the example files from the tutorial without any edits, so I don't see reason to post them here. You can get the files by running the tutorial initalization command openExample('hdlcoder/GetStartedWithMATLABToSystemCWorkflowUsingHDLCoderAppExample'). I just copied the mlhdlc_sfir.m and mlhdlc_sfir_tb.m files to new folder and started to follow the instructions. My intent was to complete this example before doing any edits to verify that my environment is working. What I forgot to mention in my previous post is that the environment is running on linux if that have effect on something.
Here is screenshot of the step which fails and is described in original post.
What project file are you talking about? Do you mean the .prj file created by the Workflow Advisor? I'm not using the codegen API to complete this. I'm just using the Workflow Advisor UI so far.

댓글을 달려면 로그인하십시오.


Kiran Kintali
Kiran Kintali 2024년 6월 12일
openExample('hdlcoder/GetStartedWithMATLABToSystemCWorkflowUsingHDLCoderAppExample')
Cadence Stratus team has reported a limitation w.r.to spaces in the path. Can you please check MATLAB install path and Stratus path locations if they have any spaces? We are working with the Stratus team to resolve the issue and also emit a better error message in the interim in the MATLAB to SystemC/HLS workflows.
Confirming the following version information of MATLAB and Stratus HLS.
% The generated code will likely also work with later versions
% MATLAB R2024a --> Cadence Stratus 22.1 (Stratus team has tested with 23.1 and later releases).
% MATLAB R2024b pre-release --> Currently being tested with 24.1 (beta).
The R2024a and R2024b pre-release doc will be updated with this information shortly.
  댓글 수: 9
Eerik
Eerik 2024년 6월 25일
Yes, thank you for organizing the remote session. Even we couldn't get this issue resolved in the meeting it guided further investigation. Like Cadence's representative anticipated based on the error message in the log that it could be file permission issue. I did one more time testing with the environment and I can confirm that it is file permission issue. Once I created the project to location with different file permissions I was able to complete the tutorial. Most significant difference between directories is that ownership in working project directory is by default user:nobody instead of user:users, where user is replaced with my username. Whether different group ownership is the root cause for this or not, I'm not sure but cannot investigate this much more. I don't have elevated access to the system so I cannot alter the file owners and groups to confirm whether I could make tutorial working in directory tree where it was not working before.
Kiran Kintali
Kiran Kintali 2024년 6월 25일
>> summary from Eerik : I can now confirm that it is file permission/ownership related issue. I have a directory where we can store our projects and most notable difference is that it uses by default myusername:nobody ownership which made the difference for tutorial working. Directories that I previously used and had this issue used myusername:users kind of ownership.
That's great news. Thanks for the update.

댓글을 달려면 로그인하십시오.

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by