Code and Bugs

Coding things

Tag: Makefile

Doxygen to the rescue

I was writing a homework from the Computer Graphics Course in C++ these days. Nearly 3000 lines of code and not all of the wanted by myself features included. The only problem was navigating through the many classes I have created (I rember that at one point I was thinking that I was using one kind of Object but this was not real).

Hopefully, I knew that doxygen can generate graphical views of the documentation. So, I’ve used another rule of my standard makefile and voila, just by using the images alone, I was able to understand where I was mistaken.

Here is one result generated by doxygen (reduced to thumbnail because of the size).

class Universe coll graph

VHDL Makefile

Here is a short example for the Makefile I’m currently using to compile and test my VHDL project:

.PHONY: all clean testbench
DEBUG = --vcd=$(VCDFILE) --stop-time=$(STOPTIME)
OBJS = clock.o
        make test
        ghdl --clean
        ghdl -m $(TARGET)
        ghdl -r $(TARGET) $(DEBUG)
        gtkwave $(VCDFILE)

Which is used in a terminal (providing you have gtkwave and ghdl installed) as follows:

$ make testbench TARGET=Chien_tb

Hoping to be useful, I’ll retire. I’ll be back in a few weeks with more details.

Verilog and VHDL on Linux (Ubuntu)

For those interested in programming electronic components there is always the possibility to use Xilinx if you are on Windows. Of course, there is a Xilinx port for Linux but it is buggy application and a very large download. This article aims to give an alternative to this application. One that will need only a few KB of download from an apt-get source.

Read the rest of this entry »

Using makefiles for regression testing

Sometimes, I found myself starting a large coding project (more than 100-150 lines) with many complex tests. In this case, I start the development phase by first creating a makefile to build all the sources along with creating a svn repository for them, even if this repository is to be kept locally. Exactly like everyone else.

Read the rest of this entry »


Get every new post delivered to your Inbox.