ASIC/FPGA Design and Verification Out Source Services
FFT system C project - 8 point FFT using DIT algorithm.
- The design is written in system C. This allows me to use the free OSCI tool and simulate my design.
- For compiling the design, into an executable, to be later run for simulation, the following make files are used: Makefile.defs and Makefile.osci
- This files comes in the examples of the OSCI. I have only changed the line that points to installation location:
## Variable that points to SystemC installation path
# You NEED to set this variable to your own SystemC intallation path
SYSTEMC = /mnt/Home/pini/Home_1/pini/systemc_2.2.0
## Variable indicating the targeted architecture. MODIFY to suit your requirements
TARGET_ARCH = linux
#TARGET_ARCH = gccsparcOS5
#TARGET_ARCH = cygwin
#TARGET_ARCH = gcchpux11
INCDIR = -I. -I.. -I$(SYSTEMC)/include
LIBDIR = -L. -L.. -L$(SYSTEMC)/lib-$(TARGET_ARCH)
LIBS = -lsystemc -lm $(EXTRA_LIBS)
EXE = $(MODULE).exe
.SUFFIXES: .cc .cpp .o .x
$(EXE): $(OBJS) $(SYSTEMC)/lib-$(TARGET_ARCH)/libsystemc.a
$(CC) $(DEBUG) $(CFLAGS) $(INCDIR) $(LIBDIR) -o $@ $(OBJS) $(LIBS) 2>&1 | c++filt
all: $(EXE)
.cpp.o:
$(CC) $(DEBUG) $(CFLAGS) $(INCDIR) -c $<
.cc.o:
$(CC) $(DEBUG) $(CFLAGS) $(INCDIR) -c $<
clean::
rm -f $(OBJS) *~ $(EXE) core
ultraclean: clean
rm -f Makefile.deps
Makefile.deps:
# $(CC) $(DEBUG) $(CFLAGS) $(INCDIR) -M $(SRCS) >> Makefile.deps
#include Makefile.deps
- The second file namely, Makefile.osci, is merely flags and files for compilation:
CC = g++
OPT = -O3
DEBUG = -g
OTHER = -Wall
CFLAGS = $(OPT) $(OTHER) -Wno-deprecated
# CFLAGS = $(DEBUG) $(OTHER)
MODULE = run
SRCS = fft_tsb.cpp
OBJS = $(SRCS:.cpp=.o)
include Makefile.defs
- Note: since I am not an expert in make files, the make file is only sensitive to the test-bench changes. If the design is modified, I use the command touch to change the date of the test-bench.
- To run the simulation, I find it convenient to run: clear;./run.exe | tee run.log.
- Return to the FFT main page. FFT main page .
Please let me know what you think on this FFT work.
Contact me now at: |