function c = emblibhdlblks_control
%% HDL implementation information for emblib blocks
% This file specifies HDL implementation information for each of the blocks
% shipped under emblib. The implementations for all such blocks should be
% placed under '@emblibhdl' and an entry should be added here.

% Copyright 2019 The MathWorks, Inc.

% Instructions to add HDL implementation for a new block:
% 1) Add an entry to this file, where you need to specify the class name of
% your block and give its path. At present, all blocks have their classes
% defined under emblibhdl. Make sure your blocks do not have special
% characters (including newline characters) in their names.
%
% 2) Under your chosen class folder (emblibhdl, for example), create a new
% folder for the class you specify in this file. For example, the 'Real
% Burst QR Decomposition' block has the class 'emblibhdl.RealBurstQR',
% which is defined under
% toolbox/fixedpoint/embeddedlib/@emblibhdl/@RealBurstQR.
%
% 3) Inside this folder, you will need to create four files with mostly
% boilerplate stuff, see @RealBurstQR for example. The only file with some
% logic that needs consideration is validateBlock.m. At present, this file
% is used to determine if floating-point inputs/outputs are being used
% anywhere in the block (and error out if they are).

c = hdlnewcontrol(mfilename);

% UPDATE:
% It turns out that introducing HDL implementations for library blocks can
% result in assertions when such library blocks are used with
% DefaultParameterBehavior set to 'Inlined', which is a very common (and
% default) setting. This was documented in g2022139 and g2042739.
%
% As a way around it, we add these HDL implementations but do not register
% them with the HDL infrastructure - this gives us the advantages of the
% classes (no unnecessary local optimization options), but also takes the
% ability to add custom error messages for. Since this is an acceptable
% trade-off (for now), we decided to comment out the section below where
% we register these classes.
%
% See g2085175 for details.


% % Burst QR decomposition
% c.defaultFor( ...
%     'embmatrixops/Real Burst QR Decomposition', {}, ...
%     'emblibhdl.RealBurstQR');
% 
% c.defaultFor( ...
%     'embmatrixops/Complex Burst QR Decomposition', {}, ...
%     'emblibhdl.ComplexBurstQR');
% 
% % Burst matrix solve using QR decomposition
% c.defaultFor( ...
%     'embmatrixops/Real Burst Matrix Solve Using QR Decomposition', {}, ...
%     'emblibhdl.RealBurstQRMatrixSolve');
% 
% c.defaultFor( ...
%     'embmatrixops/Complex Burst Matrix Solve Using QR Decomposition', {}, ...
%     'emblibhdl.ComplexBurstQRMatrixSolve');
% 
% % Normalizer
% c.defaultFor( ...
%     'embreciprocals/Real Normalizer HDL Optimized', {}, ...
%     'emblibhdl.RealNormalizer');
% 
% c.defaultFor( ...
%     'embreciprocals/Positive Real Normalizer HDL Optimized', {}, ...
%     'emblibhdl.PositiveRealNormalizer');
% 
% % Reciprocal
% c.defaultFor( ...
%     'embreciprocals/Normalized Reciprocal HDL Optimized', {}, ...
%     'emblibhdl.NormalizedReciprocal');
% 
% c.defaultFor( ...
%     'embreciprocals/Positive Normalized Reciprocal HDL Optimized', {}, ...
%     'emblibhdl.PositiveNormalizedReciprocal');
