# VHDL Codes

	- Contain Python scripts which generate VHDL codes and testbenches for 8x8, 16x16 and 32x32 using 4x4 multipliers and a few more 8x8 modules present in the folder upon execution
	- The filenames contain a combination of "Acc", "a", "d" and "o" - Accurate, Approx 1, 2 and 3 designs - according to their order in the 4 multiplier instances
	- These names can be edited according to user's multiplier designs and modules accordingly
	- The folder contains filenames such as 8x8_mult_gen and 8x8_mult_gen_acc - The first file creates VHDL codes for 8x8 multiplier through usage of an approximate adder
	  while the file with "_acc" uses an accurate adder for accumulation of partial products which is present in the file adder_acc.vhd
	- The folder also contains files like mult_approx_a4, mult_approx_d4, mult_approxo4 - these are 4x4 multipliers designed using Approx 1, 2 and 3 methods
	- The folder contains mult_approx_a8, mult_approx_d8, mult_approxo - these are 8x8 multipliers which use Approx 1, 2 and 3 respectively, on both layers of 4 partial product rows
	- The folder contains mult_approx_aacc8, mult_approx_dacc8, mult_approx_oacc8 - these are 8x8 multipliers which use Approx 1, 2 and 3 respectively, on only the top layer with
	  bottom layer using accurate multiplier architecture

# Simulation_outputs_x

	- Contains design space of SMApprox's 8x8 multipliers
	- These are .txt files which are outputs of simulation in Vivado 17.1 for Virtex-7 series, which perform multiplication on all combinations of multiplier and multiplicand
	- There are 2 formats - one has the outputs in binary and another file has the same values in decimal format (file names having "_decimal")
	- These files are used as inputs to behavioral model scripts.
	- For behavioral testing, please place all .txt files from "Simulation_outputs_x" folders into one single folder.

# Behavioral Module Codes

	- Contains 2 Python scripts as behavioral modules for 4x4 and 8x8 multipliers
	- Takes the simulation output of multiplication for all possible input combinations and creates a behavioral module for that particular multiplier
	- The scripts are generic in nature. The filenames of input and output files need to be changed appropriately.


Please cite our following paper if you find the material useful:

Salim Ullah, Sanjeev Sripadraj Murthy, and Akash Kumar. 2018. SMApproxlib: library of FPGA-based approximate multipliers. In Proceedings of the 55th Annual Design Automation Conference (DAC '18). ACM, New York, NY, USA, Article 157, 6 pages. DOI: https://doi.org/10.1145/3195970.3196115

==================================================================================================================================
	For questions/suggestions please email Dr. Akash Kumar (akash.kumar@tu-dresden.de) and Salim Ullah (salim.ullah@tu-dresden.de)
==================================================================================================================================
