Intro to GHDL command line enviroment with a few basic VHDL structures to use as templates.
sudo apt update
sudo apt install -y git make gnat zlib1g-dev
git clone https://github.com/ghdl/ghdl
cd ghdl
./configure --prefix=/usr/local
make
sudo make install
echo "$0: All done!"
sudo apt install gtkwave
git clone https://github.com/ErezBinyamin/MAC_Unit.git
cd MAC_Unit
make test TESTBENCH=./tst/BIST_MAC_TB.vhd
- N-bit adder:
make test TESTBENCH=./tst/Full_Adder_Nbit_TB.vhd
- N-bit Multiplier:
make test TESTBENCH=./tst/Multiplier_TB.vhd
- MAC unit:
make test TESTBENCH=./tst/MAC_TB.vhd
- BIST-MAC
make test TESTBENCH=./tst/BIST_MAC_TB.vhd
Auto RTL documentation using graphviz dot
- For each file with a corresponding entity declaration, will generate one block diagram with input/output ports
- Use
make rtl_template
to auto-gen a template file inout/rtl.dot
- Use
make rtl
to compileout/rtl.dot
intoout/rtl.png
andxdg-open
it with your default image viewer
tst - contains testbenches for each component
A_TB.vhd
B_TB.vhd
C_TB.vhd
work - contains project components/source-code organized in a dependency structure
A.vhd
B.vhd
[dependency]C.vhd
out - contains output artifacts from builds
tools - contains build scripts/tools
img - Images/gifs for github readme
- Put new source code in work
- Pus new testbenches in tst
- The Makefile
make all
rule will find all of the source files in work, syntax check themghdl -s
and compile them `ghdl -a - Dependency management between source files is resloved with a Makefile enforced Project Structure. All dependent source files must exist in subfolders beneath the higher level components that depend upon them
- The Makefile will call get_dep_list.sh to generate an ordered list of dependencies based upon the Project Structre and compile targets in the correct order.