Title | complexpack (VHDL complex arithmetic package). |
Author | Nikolaos Kavvadias 2009, 2010, 2011, 2012, 2013, 2014 |
Contact | nikos@nkavvadias.com |
Website | http://www.nkavvadias.com |
Release Date | 24 February 2014 |
Version | 0.0.1 |
Rev. history | |
v0.0.1 | 2014-02-24 Changed documentation format to RestructuredText. Code has been reorganized into new directory structure. |
v0.0.0 | 2009-10-02 First public release. |
complexpack is a simple complex arithmetic package written in VHDL. It is based ona code example present in the RASSP series of VHDL lectures. Compared to the RASSP version, the following have beed added:
A complex number is defined by the pair (real-part, imaginary-part) where both items of the pair are numbers. A common algebraic representation for complex numbers is:
where:
Currently, the complexpack package implements the following:
All of the above functions return an item of the complex data type.
complexpack is distributed along with a simple VHDL testbench exercising basic functionalities.
The complexpack distribution includes the following files:
/complexpack | Top-level directory |
/bench/vhdl | Benchmarks VHDL directory |
complexpack_tb.vhd | A simple testbench. |
/doc | Documentation directory |
AUTHORS | List of complexpack authors. |
BUGS | Bug list. |
ChangeLog | A log for code changes. |
COPYING | The LGPL, version 3, governs complexpack. |
README | This file. |
README.html | HTML version of README. |
README.pdf | PDF version of README. |
rst2docs.sh | Bash script for generating the HTML and PDF versions. |
THANKS | Acknowledgements. |
TODO | A list of future enhancements. |
VERSION | Current version of the project sources. |
/rtl/vhdl | RTL source code directory for the package |
complexpack.vhd | The complex arithmetic package. |
/sim/rtl_sim | RTL simulation files directory |
/sim/rtl_sim/out | RTL simulation output files directory |
complexpack_results- .txt | Output generated by the complexpack_tb.vhd test. |
/sim/rtl_sim/run | RTL simulation run scripts directory |
complexpack.mk | GNU Makefile for running GHDL simulations. |
run.sh | A bash script for running the GNU Makefile for GHDL. |
The complexpack package test script can be used as follows:
as run from within the ./sim/rtl_sim/run subdirectory.
After this process, the complexpack_results.txt file is generated containing simulation results.
Standard UNIX-based tools (tested on cygwin/x86 and MinGW/x86 and MinGW/x64)
GHDL simulator (http://ghdl.free.fr)
Provides the "ghdl" executable and corresponding simulation environment. Versions throughtout 0.26 to 0.31 (mcode) have been used for testing.