%--------------------------------------------------------------------------
% HDL Workflow Script
% Generated with MATLAB 9.8 (R2020a) at 11:08:51 on 09/12/2019
% This script was generated using the following parameter values:
%     Filename  :
%     '/mathworks/devel/sandbox/merickso/work/HDLV/HDLV_DEMOS/uvm20a_devel/demoAXI_framed/prm_uvmtb_hdlworkflow.m'
%     Overwrite : true
%     Comments  : true
%     Headers   : true
%     DUT       : 'prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar'
% To view changes after modifying the workflow, run the following command:
% >> hWC.export('DUT','prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar');
%--------------------------------------------------------------------------

%% Load the Model
load_system('prm_uvmtb');

%% Restore the Model to default HDL parameters
%hdlrestoreparams('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar');

%% Model HDL Parameters
%% Set Model 'prm_uvmtb' HDL parameters
hdlset_param('prm_uvmtb', 'AdaptivePipelining', 'off');
hdlset_param('prm_uvmtb', 'EnableTestpoints', 'on');
hdlset_param('prm_uvmtb', 'GenerateCoSimModel', 'ModelSim');
hdlset_param('prm_uvmtb', 'GenerateHDLTestBench', 'off');
hdlset_param('prm_uvmtb', 'HDLSubsystem', 'prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar');
hdlset_param('prm_uvmtb', 'OptimizationReport', 'on');
hdlset_param('prm_uvmtb', 'ReferenceDesign', 'Default system');
hdlset_param('prm_uvmtb', 'ResetType', 'Synchronous');
hdlset_param('prm_uvmtb', 'ResourceReport', 'on');
hdlset_param('prm_uvmtb', 'SynthesisTool', 'Xilinx Vivado');
hdlset_param('prm_uvmtb', 'SynthesisToolChipFamily', 'Zynq');
hdlset_param('prm_uvmtb', 'SynthesisToolDeviceName', 'xc7z020');
hdlset_param('prm_uvmtb', 'SynthesisToolPackageName', 'clg484');
hdlset_param('prm_uvmtb', 'SynthesisToolSpeedValue', '-1');
hdlset_param('prm_uvmtb', 'TargetDirectory', 'hdl_prj/hdlsrc');
hdlset_param('prm_uvmtb', 'TargetFrequency', 125);
hdlset_param('prm_uvmtb', 'TargetLanguage', 'Verilog');
hdlset_param('prm_uvmtb', 'TargetPlatform', 'Generic Xilinx Platform');
hdlset_param('prm_uvmtb', 'Workflow', 'IP Core Generation');

% Set SubSystem HDL parameters
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar', 'IPCoreName', 'PulseDetectorAXI_ip');
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar', 'ProcessorFPGASynchronization', 'Free running');

% Set Inport HDL parameters
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/coeff', 'IOInterface', 'AXI4-Lite');
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/coeff', 'IOInterfaceMapping', 'x"100"');

% Set Inport HDL parameters
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/data_in', 'IOInterface', 'AXI4-Stream Slave');
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/data_in', 'IOInterfaceMapping', 'Data');

% Set Inport HDL parameters
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/valid_in', 'IOInterface', 'AXI4-Stream Slave');
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/valid_in', 'IOInterfaceMapping', 'Valid');

% Set SubSystem HDL parameters
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/Detect Pulse/Compute Power', 'AdaptivePipelining', 'on');
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/Detect Pulse/Compute Power', 'InputPipeline', 1);
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/Detect Pulse/Compute Power', 'OutputPipeline', 1);

hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/Detect Pulse/Discrete FIR Filter', 'Architecture', 'Fully Parallel');
% Set DiscreteFir HDL parameters
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/Detect Pulse/Discrete FIR Filter', 'InputPipeline', 1);
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/Detect Pulse/Discrete FIR Filter', 'MultiplierInputPipeline', 1);
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/Detect Pulse/Discrete FIR Filter', 'MultiplierOutputPipeline', 1);
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/Detect Pulse/Discrete FIR Filter', 'OutputPipeline', 1);

% Set Outport HDL parameters
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/data_out', 'IOInterface', 'AXI4-Stream Master');
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/data_out', 'IOInterfaceMapping', 'Data');

% Set Outport HDL parameters
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/valid_out', 'IOInterface', 'AXI4-Stream Master');
hdlset_param('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar/valid_out', 'IOInterfaceMapping', 'Valid');


%% Workflow Configuration Settings
% Construct the Workflow Configuration Object with default settings
hWC = hdlcoder.WorkflowConfig('SynthesisTool','Xilinx Vivado','TargetWorkflow','IP Core Generation');

% Specify the top level project directory
hWC.ProjectFolder = 'hdl_prj';
hWC.ReferenceDesignToolVersion = '';
hWC.IgnoreToolVersionMismatch = false;

% Set Workflow tasks to run
hWC.RunTaskGenerateRTLCodeAndIPCore = true;
hWC.RunTaskCreateProject = false;
hWC.RunTaskGenerateSoftwareInterfaceModel = false;
hWC.RunTaskBuildFPGABitstream = false;
hWC.RunTaskProgramTargetDevice = false;

% Set properties related to 'RunTaskGenerateRTLCodeAndIPCore' Task
hWC.IPCoreRepository = '';
hWC.GenerateIPCoreReport = true;

% Set properties related to 'RunTaskCreateProject' Task
hWC.Objective = hdlcoder.Objective.None;
hWC.AdditionalProjectCreationTclFiles = '';
hWC.EnableIPCaching = false;

% Set properties related to 'RunTaskGenerateSoftwareInterfaceModel' Task
hWC.OperatingSystem = '';

% Set properties related to 'RunTaskBuildFPGABitstream' Task
hWC.RunExternalBuild = true;
hWC.TclFileForSynthesisBuild = hdlcoder.BuildOption.Default;
hWC.CustomBuildTclFile = '';

% Set properties related to 'RunTaskProgramTargetDevice' Task
hWC.ProgrammingMethod = hdlcoder.ProgrammingMethod.JTAG;

% Validate the Workflow Configuration Object
hWC.validate;

%% Run the workflow
hdlcoder.runWorkflow('prm_uvmtb/PulseDetector/PulseDetectorHDL/PulseDetectorScalar', hWC);
