Callback Functions for Custom Reference Design doesn't work

조회 수: 4 (최근 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 CenterFile Exchange에서 HDL Coder에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by