run Simscape HDL Workflow Advisor from script
2 views (last 30 days)
Show older comments
Hi
I am currently working on automating my workflow with Simscape and the HDL Coder. Unfortunately, I cannot find an option to run and configure the Simscape HDL Workflow Advisor (sschdladvisor) from the command line. Is there any way to do this?
Thanks
Marco
0 Comments
Answers (2)
Kiran Kintali
on 8 Sep 2022
Edited: Kiran Kintali
on 26 Jan 2025
Strarting R2025a pre-release Simscape HDL generates both floating-point and fixed-point enabled code generation from Simscape models suitable for FPGA/HIL workflows.
matlab/toolbox/hdlcoder/hdldesignpatterns/rcphil/getFPGAHILSynthesisResults.m
For fixed-point 32 bit, you need to pass dataType attribute to the function as
numerictype(0,32)
Suppose your model has two simscape networks, you need to make a DUT1, DUT2 subsystems for them and then can call the function as follows:
getFPGAHILSynthesisResults ({model/DUT1,model/DUT2'}, datatype, excelSheet, synthesisToolParams)
Here is the help text for the function parameters
function getFPGAHILSynthesisResults (models, datatype, excelSheet, synthesisToolParams)
% getFPGAHILSynthesisResults : This function takes simscape model/subsystem
% names, datatype, name of excel sheet and synthesis tool parameters as
% inputs, goes through Simscape to HDL workflow, HDL code generation,
% Synthesis and stores the synthesis results along with achievable time
% step to the excel sheet.
% models: this input expects a cell array of model/ subsystem names
% which are present in current directory or accessible on path. Eg:
% models = {'sschdlexBoostConverterModel', 'BridgeRectifier/Subsystem'};
% datatype: this input expects a numerictype object of either single,
% double or fixed point. Eg:
% datatype = numerictype('Double');
% datatype = numerictype(0,32);
% by default, we set datatype to numerictype('Single')
% excelSheet: this input expects a string/character array which
% indicates the name of the excel file where the results will be
% stored. Eg:
% excelSheet = 'SynthesisResults.xlsx'
% excelSheet = 'ResultsData'
% by default, we assign 'FPGAHILSynthesisResults.xls' as the name of
% excel sheet.
% synthesisToolParams: this input expects a struct which contains the
% information about synthesis tool parameters. by default, we set it to
% synthesisToolParams = struct('SynthesisTool', 'Xilinx Vivado',...
%'SynthesisToolChipFamily', 'Kintex7',...
%'SynthesisToolDeviceName', 'xc7k325t',...
%'SynthesisToolPackageName', 'fbg676',...
%'SynthesisToolSpeedValue' , '-1',...
%'TargetFrequency', 100);
1 Comment
TuttoAlDoc
on 28 Jan 2025
Thank you for you message. We will check it. Having to update Mathlab we would like to proceed step by step to not hit compatibility issues.
thanks
Michele
TuttoAlDoc
on 24 Jan 2025
Hi,
I tried to use your script to automatize the simscape hdl workflow advisor process. I have a couple of questions:
- I need to specify that I want a fixedpoint implementation in 32 bit. Is there a way?
- I have 2 simscape networks in my model and I need to separately launch the script for each of them. Is it possible? Is it possible to force the name of the folder that mathlab will use to place the generated files?
thanks
Michele
0 Comments
See Also
Categories
Find more on Simscape Hardware-in-the-Loop Workflow 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!