Callback Functions for Custom Reference Design doesn't work

3 ビュー (過去 30 日間)
borzack
borzack 2022 年 6 月 11 日
回答済み: Wang Chen 2022 年 8 月 25 日
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

採用された回答

Wang Chen
Wang Chen 2022 年 8 月 25 日
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 件)

カテゴリ

Help Center および File ExchangeHDL Coder についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by