Access IP-Core Report by script

1 visualizzazione (ultimi 30 giorni)
Tobias Schindler
Tobias Schindler il 21 Lug 2020
Risposto: Tobias Schindler il 11 Dic 2020
After generating an IP-Core by using the HDL-Coder (e. g. from Simulink), one can inspect the high-level ressource utilization and critical path estimation in an html file.
Is it possible to access this informatin (i.e. critical path, number of used multipier, etc.) by script? There is a .mat file 'hdlwfbuildstatus', but the ressources are not shown.
The information itself is in the .html files, but I would like to have it as a variable in the workspace, e.g. by using a command like:
report_data=generate_ip_core_report();

Risposte (2)

Aman Vyas
Aman Vyas il 27 Lug 2020
Hi,
IP Core Generation Workflow supports large number of properties as well as scripts . You can use scripts for various functionalities reporting like critical timing. For getting info on how to use scripts for IP Core Generation flow, refer to this documentation link.
Alternatively, you can use hdlcoder.WorkflowConfig class to use scripts for configuring and running various workflows like IP Core Generation, ASIC Workflow etc.
You can have a look at these example scripts and attempt to edit as per your functionality you want to obtain.
Hope it helps !
  1 Commento
Tobias Schindler
Tobias Schindler il 27 Lug 2020
Sorry I failed to specify clearly what my workflow is at the moment:
I already use script based IP-Core generation, but I want to access the report by script. The use case would be to run the IP-Core generation workflow multiple times with different settings (i.e. different streaming factor, different sharing factor) and compare the results - especially timing and ressources.
At the moment I have a hacked together script which reads the .html report and saves the timing & ressources back to the script sucht that I have a varible in the workspace which in turn can be further processed.
Take for example the example scripts of the thrid link:
% Export Workflow Configuration Script
% Generated with MATLAB 8.6 (R2015b) at 14:42:16 on 08/07/2015
% Parameter Values:
% Filename : 'S:\ip_core_gen_workflow_example.m'
% Overwrite : true
% Comments : true
% Headers : true
% DUT : 'hdlcoder_led_blinking/led_counter'
%% Load the Model
load_system('hdlcoder_led_blinking');
%% Model HDL Parameters
% Set Model HDL parameters
hdlset_param('hdlcoder_led_blinking', ...
'HDLSubsystem', 'hdlcoder_led_blinking/led_counter');
hdlset_param('hdlcoder_led_blinking', 'OptimizationReport', 'on');
hdlset_param('hdlcoder_led_blinking', ...
'ReferenceDesign', 'Default system (Qsys 14.0)');
hdlset_param('hdlcoder_led_blinking', 'ResetType', 'Synchronous');
hdlset_param('hdlcoder_led_blinking', 'ResourceReport', 'on');
hdlset_param('hdlcoder_led_blinking', 'SynthesisTool', 'Altera QUARTUS II');
hdlset_param('hdlcoder_led_blinking', 'SynthesisToolChipFamily', 'Cyclone V');
hdlset_param('hdlcoder_led_blinking', 'SynthesisToolDeviceName', '5CSXFC6D6F31C6');
hdlset_param('hdlcoder_led_blinking', 'TargetDirectory', 'hdl_prj\hdlsrc');
hdlset_param('hdlcoder_led_blinking', ...
'TargetPlatform', 'Altera Cyclone V SoC development kit - Rev.D');
hdlset_param('hdlcoder_led_blinking', 'Traceability', 'on');
hdlset_param('hdlcoder_led_blinking', 'Workflow', 'IP Core Generation');
% Set SubSystem HDL parameters
hdlset_param('hdlcoder_led_blinking/led_counter', ...
'ProcessorFPGASynchronization', 'Free running');
% Set Inport HDL parameters
hdlset_param('hdlcoder_led_blinking/led_counter/Blink_frequency', ...
'IOInterface', 'AXI4');
hdlset_param('hdlcoder_led_blinking/led_counter/Blink_frequency', ...
'IOInterfaceMapping', 'x"100"');
% Set Inport HDL parameters
hdlset_param('hdlcoder_led_blinking/led_counter/Blink_direction', ...
'IOInterface', 'AXI4');
hdlset_param('hdlcoder_led_blinking/led_counter/Blink_direction', ...
'IOInterfaceMapping', 'x"104"');
% Set Outport HDL parameters
hdlset_param('hdlcoder_led_blinking/led_counter/LED', 'IOInterface', 'External Port');
% Set Outport HDL parameters
hdlset_param('hdlcoder_led_blinking/led_counter/Read_back', 'IOInterface', 'AXI4');
hdlset_param('hdlcoder_led_blinking/led_counter/Read_back', ...
'IOInterfaceMapping', 'x"108"');
%% Workflow Configuration Settings
% Construct the Workflow Configuration Object with default settings
hWC = hdlcoder.WorkflowConfig('SynthesisTool','Altera QUARTUS II', ...
'TargetWorkflow','IP Core Generation');
% Specify the top level project directory
hWC.ProjectFolder = 'hdl_prj';
% Set Workflow tasks to run
hWC.RunTaskGenerateRTLCodeAndIPCore = true;
hWC.RunTaskCreateProject = true;
hWC.RunTaskGenerateSoftwareInterfaceModel = false;
hWC.RunTaskBuildFPGABitstream = true;
hWC.RunTaskProgramTargetDevice = false;
% Set Properties related to Generate RTL Code And IP Core Task
hWC.IPCoreRepository = '';
hWC.GenerateIPCoreReport = true;
% Set Properties related to Create Project Task
hWC.Objective = hdlcoder.Objective.AreaOptimized;
% Set Properties related to Generate Software Interface Model Task
hWC.OperatingSystem = '';
hWC.AddLinuxDeviceDriver = false;
% Set Properties related to Build FPGA Bitstream Task
hWC.RunExternalBuild = true;
hWC.TclFileForSynthesisBuild = hdlcoder.BuildOption.Default;
% Validate the Workflow Configuration Object
hWC.validate;
%% Run the workflow
hdlcoder.runWorkflow('hdlcoder_led_blinking/led_counter', hWC);
After the script is exectured, the IP-Core generation report is accessible by opening it with the matlab browser. However, I want to have the result of the report as a variable.
I tried to dig arround in the documentation but failed to find something that reports this back.

Accedi per commentare.


Tobias Schindler
Tobias Schindler il 11 Dic 2020
This is still relevant to me after upgrading to 2020b.
It is obviouse that the information that I want to access is avilable to Matlab before the HDL-Coder scripts write them into the html. I am still reading the data from the html file back to the Matlab workspace, which is just nonsensical (and not robust).
hdlcodergenstatus.mat and hdlwfbuildstatus.mat already have quite a lot of useful information, exept for the information that I look for. hdlcodergenstatus holds "Latency" as a variable, which is quite close ;)
I looked into hdlcoder.runworkflow but this calls a binary, so not luck there either.

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by