What is the reason for error in HDL Coder and Cadence Stratus HLS tutorial?
Show older comments
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?
Answers (2)
Kiran Kintali
on 11 Jun 2024
0 votes
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 Comment
Kiran Kintali
on 12 Jun 2024
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 Comments
Eerik
on 13 Jun 2024
Kiran Kintali
on 13 Jun 2024
Edited: Kiran Kintali
on 13 Jun 2024
Thanks. I will bring this to Cadence team and post additional notes here.
Meanwhile can you create a MathWorks side tech support case with the following info?
INFO: Processing template tb.cc
FATAL ERROR: Unable to process template tb.cc
If you can zip up the folder with source MATLAB files, tutorial.prj and output files folders (which includes the resulting tb.cc file) it might contain some further clues to debug your environment setup.
Based on the information so far, the good news is that your MathWorks installation with HDL Coder is functional and you are getting SystemC files from the MATLAB code. We need to debug your Stratus environment and SystemC to RTL steps with Stratus workflows.
Kiran Kintali
on 14 Jun 2024
Can you check the availability of Cadence Stratus HLS license?
stratus_hls -V
What does this command return on your machine?
Thanks
Eerik
on 17 Jun 2024
Kiran Kintali
on 19 Jun 2024
Edited: Kiran Kintali
on 19 Jun 2024
We will setup a call with Stratus HLS team and post the update here.
Kiran Kintali
on 24 Jun 2024
Cadence team had a call with Eerik and looked at the setup and identifying the next steps on the Stratus side. The issue is specific to install setup at Eerik's end. Closing the thread from MathWorks support point of view and to be continued with Cadence/Stratus HLS team.
Eerik
on 25 Jun 2024
Kiran Kintali
on 25 Jun 2024
>> 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.
Categories
Find more on High-Level Synthesis Code Generation from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!