Callback Functions for Custom Reference Design doesn't work
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
Define Custom Parameters and Callback Functions for Custom Reference Design described at link https://it.mathworks.com/help/hdlcoder/ug/define-custom-reference-design-with-custom-parameters-and-callback-functions.html works well only if the path has only one package folder (e.g. .../+my_ref_design/callback_CustomizeReferenceDesign.m)
function hRD = plugin_rd()
% ....
hRD.addParameter( ...
'ParameterID', 'param', ...
'DisplayName', 'DispName', ...
'DefaultValue', 'On', ...
'ParameterType', hdlcoder.ParameterType.Dropdown, ...
'Choice', {'On','Off'});
hRD.CustomizeReferenceDesignFcn =@my_ref_design.callback_CustomizeReferenceDesign;
end
if the board path is .../+my_board/+my_ref_design/ callback_CustomizeReferenceDesign.m
and
function hRD = plugin_rd()
% ....
hRD.addParameter( ...
'ParameterID', 'param', ...
'DisplayName', 'DispName', ...
'DefaultValue', 'On', ...
'ParameterType', hdlcoder.ParameterType.Dropdown, ...
'Choice', {'On','Off'});
hRD.CustomizeReferenceDesignFcn =@my_board.my_ref_design.callback_CustomizeReferenceDesign;
end
the hdl workflow advisor (1.1. Set Target Device and Synthesis Tool in) gives the following error
Warning: Invalid plugin "MyBoardRegistration.Vivado2021_2.plugin_rd" is detected with error message "Function
callback_CustomizeReferenceDesign does not exist.".
> In hdlturnkey.plugin/PluginListBase/reportInvalidPlugin
In hdlturnkey.plugin/ReferenceDesignList/buildRDList
In hdlturnkey.ip/IPDriver/initIPPlatform
In downstream.DownstreamIntegrationDriver/loadIPPlatform
In downstream.DownstreamIntegrationDriver/initBoard
In downstream.DownstreamIntegrationDriver/setBoardName
In downstream.DownstreamIntegrationDriver/setOptionValue
In downstream.DownstreamIntegrationDriver/set
In paramTargetDevice
In ModelAdvisor.Node/handleCheckEvent
surely the error is here
hRD.CustomizeReferenceDesignFcn =@my_board.my_ref_design.callback_CustomizeReferenceDesign;
but I don't know the right syntax
Risposta accettata
Wang Chen
il 25 Ago 2022
Hi borzack,
As you commented, this is likely caused by that MATLAB cannot find my_board.my_ref_design.callback_CustomizeReferenceDesign on MATLAB search path. rehash toolbox will refresh MATLAB search path and fix this issue.
Your syntax on the callback function specification is correct.
Thanks,
Wang
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!