gusucode.com > target工具箱matlab源码程序 > target/codertarget/+coder/en/hardware.m
%CODER.HARDWARE Create a hardware configuration object for % Processor-in-the-Loop (PIL) simulation. % % CODER.HARDWARE(HARDWARENAME) returns the configuration object for the % hardware specified by HARDWARENAME. % % CODER.HARDWARE( ) returns a cell array of names of hardware supported by % installed hardware support packages. % % Note: If no hardware support packages are installed, CODER.HARDWARE( ) % returns an empty cell array. % % The following hardware support packages provide support for PIL % simulation with MATLAB Coder: % % <a href="matlab:hwconnectinstaller.launchInstaller('BaseCode',... % 'EC_BEAGLEBONE','StartAtStep','SelectPackage')">Embedded Coder Support Package for BeagleBone Black Hardware</a> % <a href="matlab:hwconnectinstaller.launchInstaller('BaseCode',... % 'ECZYNQ7000','StartAtStep','SelectPackage')">Embedded Coder Support Package for Xilinx Zynq-7000 Platform</a> % <a href="matlab:hwconnectinstaller.launchInstaller('BaseCode',... % 'EC_ALTERA_SOC','StartAtStep','SelectPackage')">Embedded Coder Support Package for Altera SoC Platform</a> % <a href="matlab:hwconnectinstaller.launchInstaller('BaseCode',... % 'ECCORTEXA','StartAtStep','SelectPackage')">Embedded Coder Support Package for ARM Cortex-A Processors</a> % <a href="matlab:hwconnectinstaller.launchInstaller('BaseCode',... % 'ECCORTEXM','StartAtStep','SelectPackage')">Embedded Coder Support Package for ARM Cortex-M Processors</a> % % Example: Construct and display a hardware configuration object for % BeagleBone Black hardware % % hwList = coder.hardware; % if ismember('BeagleBone Black',hwList) % hw = coder.hardware('BeagleBone Black'); % disp(hw) % end % % Example 1: Perform PIL simulation of the fft function on BeagleBone Black % hardware % % cfg = coder.config('lib','ecoder',true);; % cfg.VerificationMode = 'PIL'; % hw = coder.hardware('BeagleBone Black'); % cfg.Hardware = hw; % codegen('-config',cfg,'fft','-args',{zeros(1, 256)}); % x = rand([1,256]); % y = fft_pil(x); % % Example 2: Perform PIL simulation of the fft function on ARM Cortex-M3 (QEMU) % hardware % % cfg = coder.config('lib','ecoder',true);; % cfg.VerificationMode = 'PIL'; % cfg.StackUsageMax = 512; % hw = coder.hardware('ARM Cortex-M3 (QEMU)'); % cfg.Hardware = hw; % codegen('-config',cfg,'fft','-args',{zeros(1, 256)}); % x = rand([1,256]); % y = fft_pil(x); % % See also CODEGEN, coder.config, coder.EmbeddedCodeConfig. % Copyright 2015-2016 The MathWorks, Inc.