run Simscape HDL Workflow Advisor from script
    12 ビュー (過去 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!