MATLAB: How to add multiple AXI4 Master Interfaces to a reference design in HDL Coder

axiaxi4designHDL Codermastermultiplereference

How do I add multiple AXI4 Master Interfaces to a reference design in HDL Coder?

Best Answer

To add multiple AXI4 Master interfaces, add multiple calls of 'addAXI4MasterInterface' to the reference design definition file (plugin_rd.m). For example:
hRD.addAXI4MasterInterface(...
'InterfaceID', 'AXI4 Master 1', ...
'ReadSupport', true, ...
'WriteSupport', true, ...
'MaxDataWidth', 128, ...
'AddrWidth', 32, ...
'InterfaceConnection', 'axi_interconnect_1/S01_AXI',...
'TargetAddressSegments', {{'mig_7series_0/memmap/memaddr',2*1024^3,2*1024^3}});
hRD.addAXI4MasterInterface(...
'InterfaceID', 'AXI4 Master 2', ...
'ReadSupport', true, ...
'WriteSupport', true, ...
'MaxDataWidth', 128, ...
'AddrWidth', 32, ...
'InterfaceConnection', 'axi_interconnect_1/S02_AXI',...
'TargetAddressSegments', {{'mig_7series_0/memmap/memaddr',2*1024^3,2*1024^3}});
To learn more about 'addAXI4MasterInterface', please refer the link below: