run Simscape HDL Workflow Advisor from script
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(2 个)
Kiran Kintali
2022-9-8
编辑:Kiran Kintali
2025-1-26
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 个评论
TuttoAlDoc
2025-1-28
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
2025-1-24
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simscape Hardware-in-the-Loop Workflow 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!