classdef NFPSparseConstMultiply < hdlimplbase.EmlImplBase
    %
    
    %   Copyright 2018-2023 The MathWorks, Inc.
    
    properties (Hidden)
        % developer flag to draw the block from PIR in the generated model
        %
        % = true    ->  generated model will show the internal blocks
        %
        % = false   ->  generated model will contain the original block
        %               with delays (default)
        drawBlockFromPIR = true;
    end
    
    methods
        
        function this = NFPSparseConstMultiply(block)
            supportedBlocks = {...
                'hdlssclib/NFPSparseConstMultiply', ...
                };
            
            if nargin == 0
                block = '';
            end
            
            desc = struct('ShortListing', 'Generate HDL Code for NFPSparseConstMultiply Block', ...
                'HelpText', 'HDL will be emitted for this NFPSparseConstMultiply block');
            
            this.init('SupportedBlocks', supportedBlocks, ...
                'Description', desc, ...
                'Block', block, ...
                'ArchitectureNames', 'Matrix vector product');
        end
    end
    
    methods (Hidden)
        
        hNewC = elaborate(this, hN, hC)
        
        stateInfo = getStateInfo(this, hC)
        [constMatrix,constMatrixType,matrixSource,sharingFactor,useRAM,matrixInputInfo] = getBlockInfo(this, slbh)
        [latency, fpDelays] = getscmLatency(this, hC, constMatrix, sharingFactor, nfpCustomLatency)
        
        v_settings = block_validate_settings(this, hC)
        v = validateBlock(this, hC)
        v = validatePortDatatypes(this, hC)
        
        registerImplParamInfo(this)
        v = validateImplParams(this, hC)
        nfpOptions = getNFPImplParamInfo(this)
        
        retval = allowElabModelGen(this, hN, hC)
        [hide, flatten] = hideElabNetworkinGM(this, hN, hC)
    end
    
end
