项目作者: ehw-fit

项目描述 :
Library of approximate arithmetic circuits
高级语言: Verilog
项目地址: git://github.com/ehw-fit/evoapproxlib.git
创建时间: 2018-12-20T11:37:22Z
项目社区:https://github.com/ehw-fit/evoapproxlib

开源协议:MIT License

下载


EvoApproxLib

New version was published: see branch v2022

library of approximate arithmetic circuits

This is a GitHub repository of EvoApproxLib LITE version. The library consists of hardware and software models of approximate circuits that are designed to be easily used in arbitrary application. Web-based GUI and the full version of EvoApproxLib can be found on our websites

Library usage

Reference

This library is licenced under MIT licence. If you use the library in your research, please refer the following paper:

V. Mrazek, R. Hrbacek, Z. Vasicek and L. Sekanina, EvoApprox8b: Library of approximate adders and multipliers for circuit design and benchmarking of approximation methods. Design, Automation & Test in Europe Conference & Exhibition (DATE), 2017, Lausanne, 2017, pp. 258-261. doi: 10.23919/DATE.2017.7926993

  1. @INPROCEEDINGS{evoapprox16,
  2. author={V. Mrazek and R. Hrbacek and Z. Vasicek and L. Sekanina},
  3. booktitle={Design, Automation Test in Europe Conference Exhibition (DATE), 2017},
  4. title={EvoApprox8b: Library of approximate adders and multipliers for circuit design and benchmarking of approximation methods},
  5. year={2017},
  6. volume={},
  7. number={},
  8. pages={258-261},
  9. doi={10.23919/DATE.2017.7926993},
  10. ISSN={1558-1101},
  11. month={March},}

The library is a collection of circuits published in the following papers:

  • V. Mrazek, Z. Vasicek and R. Hrbacek, “Role of circuit representation in evolutionary design of energy-efficient approximate circuits” in IET Computers & Digital Techniques, vol. 12, no. 4, pp. 139-149, 7 2018. doi: 10.1049/iet-cdt.2017.0188
  • V. Mrazek, R. Hrbacek, Z. Vasicek and L. Sekanina, “EvoApprox8b: Library of approximate adders and multipliers for circuit design and benchmarking of approximation methods”. Design, Automation & Test in Europe Conference & Exhibition (DATE), 2017, Lausanne, 2017, pp. 258-261. doi: 10.23919/DATE.2017.7926993
  • V. Mrazek, L. Sekanina, Z. Vasicek “Libraries of Approximate Circuits: Automated Design and Application in CNN Accelerators” IEEE Journal on Emerging and Selected Topics in Circuits and Systems, Vol 10, No 4, 2020
  • V. Mrazek, S. S. Sarwar, L. Sekanina, Z. Vasicek and K. Roy, “Design of power-efficient approximate multipliers for approximate artificial neural networks,” 2016 IEEE/ACM International Conference on Computer-Aided Design (ICCAD), Austin, TX, 2016, pp. 1-7. doi: 10.1145/2966986.2967021
  • V. Mrazek, Z. Vasicek, L. Sekanina, H. Jiang and J. Han, “Scalable Construction of Approximate Multipliers With Formally Guaranteed Worst Case Error” in IEEE Transactions on Very Large Scale Integration (VLSI) Systems, vol. 26, no. 11, pp. 2572-2576, Nov. 2018. doi: 10.1109/TVLSI.2018.2856362
  • Z. Vasicek and L. Sekanina, “Evolutionary Approach to Approximate Digital Circuits Design” in IEEE Transactions on Evolutionary Computation, vol. 19, no. 3, pp. 432-444, June 2015. doi: 10.1109/TEVC.2014.2336175

Usage in Python

To use the models from Python, it is possible to generate and compile binary extensions using cython.

  1. Make sure cython is installed

    1. pip install --user cython
  2. Generate cython sources (creates cython directory):

    1. python3 make_cython.py
  3. Compile and install binary extensions (*.so on linux, *.pyd on Windows):

    1. cd cython
    2. python3 setup.py build_ext
    3. python3 setup.py install --user
  4. Finally, the extension can be used in a Python script as follows:
    ```python
    import evoapproxlib as eal

e = 0
for i in range(0, 28):
for j in range(0, 2
8):
e += abs(eal.add8u_0FP.calc(i, j) - (i+j))

print(‘MAE calculated’, e / (2*(28)))
print(‘MAE from lib’, eal.add8u_0FP.MAE)

  1. Each circuit is implemented as single binary module, providing the `calc(a, b)` function and various paremeters. The `evoapproxlib` module also contains dictionaries `eal.adders` and `eal.multipliers` with references to all circuits, grouped by their data type, for easier iteration:
  2. ```python
  3. import evoapproxlib as eal
  4. for name, module in eal.adders['8_unsigned'].items():
  5. print(name, module.MAE, module.WCE)
  6. for name, module in eal.multiplers['16x16_signed'].items():
  7. print(name, module.MAE, module.WCE)

Circuits

Adders (unsigned)