
%

%   Copyright 2015-2016 The MathWorks, Inc.

classdef (Abstract) Plugin_Tcl_ISE < handle
    % ISE Tcl generation functions
    
    %% all functions are required to be implemented in plugin folder
    methods (Abstract, Static)
        
        
    end
    
    %-------------------READ BEFORE MODIFYING BELOW------------------------
    % To change these methods in future releases, first move the method you
    % wish to move into the version specific child classes and then modify
    % this method in the current version only. This will help maintain
    % backward compatibility with previous Quartus/Qsys tools that are no
    % longer tested in BaT
    %----------------------------------------------------------------------
    methods( Static )
        
         function getTclCreateClockConstraint(fid, clkName,clkFreq)
            % generate a clock constraint
            clockGroupName = sprintf('TN_%s', clkName);
            timeSpecName   = sprintf('TS_%s', 'FPGA_CLK'); %changed to 'FPGA_CLK' for ucf multicycle constraints
            
            fprintf(fid, 'NET "%s" TNM_NET = "%s";\n', clkName,clockGroupName); 
            fprintf(fid, 'TIMESPEC "%s" = PERIOD "%s" %d MHz;\n', timeSpecName, clockGroupName, clkFreq);
            
            				
        end        
    end
    
end

% LocalWords:  HDLCODERIPINST IPCORE RESETN CLKOUT intf ACLK ARESETN filesets
% LocalWords:  fileset TNM
