---------------------------------------------------------------------------------------
-- These files, developed by Joshua Mack, Sam Bellestri, and Nia Simmonds 
-- as part of the IREECE 2015, are licensed under the GNU General Public License (GPL).
-- It may be freely copied and/or distributed at no cost. You can also
-- redistribute it and/or modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation. 
-- Any persons using the files for any purpose do so at their own risk,
-- and are responsible for the results of such use.
-- It is not guaranteed that this file is complete, correct, or fit for any particular purpose.
-- NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED
---------------------------------------------------------------------------------------

Joshua Mack, Sam Bellestri, Nia Simmonds, IREECE 2015
Matlab Files Directory:

This folder contains all of the accompanying Matlab scripts used in automating the testing and analysis of the VHDL architectures. Specifically, there is a general pattern for each VHDL architecture tested of having a certain set of files and folders associated with it.

For example, for the floating-point e^x architecture, the basic testing methodology would be the following:

(1) Use FloP_eToTheX_Generic_tb.m to generate a testbench file and import it/replace the existing testbench in the eToTheX Vivado project.
(2) Use generateLUTs.m to generate the CORDIC lookup-tables necessary for the simulation to run, and place those in the same directory as the LUT VHDL file.
(3) Run the simulation and copy the results text files back to your MATLAB working directory into the "FloP_eToTheX_VivadoResults" folder
(4) Run convertPlotAndPSNR_eToTheX.m to convert the text files, (possibly) plot them if you desire by tweaking a few lines of the code, and calculating the PSNR of the simulation results when compared to reference MATLAB values

On a high level, executing those four steps repeatedly is exactly what the "UltimateTestScript_eToTheX.m" testscript does -- and it's automated.

To use this general routine for testing any of the other floating-point architectures, simply replace "eToTheX" with, say, "NaturalLogX" or "xToTheY" in all of the steps above. We tried to keep things consistent in that way. To test the fixed point architectures, instead, change the "FloP" to "Fixed", use "generateFixedLUTs.m" instead of "generateLUTs.m", and add a "_Fixed" onto the end of your "convertPlotAndPSNR_*.m" script name.

Description of the different provided folders:
(1) CORDIC_Models: MATLAB models of the CORDIC algorithm used early in the design process to simply understand the algorithm.
(2) "*_*_VivadoResults": Each "VivadoResults" folder is simply where to store the corresponding output text files from the Vivado simulator, as the convertPlotAndPSNR scripts look in these folders for their files.
(3) PSNR_Output: The folder where the end results of an "UltimateTestScript" execution go
(4) TCL_Files: A folder containing all of the TCL scripts needed to execute the Vivado simulations. They, too, are going to need to be updated manually to point to the correct path (if you want to use the UltimateTestScript)