Commit a9fac6fc authored by Daniela Genius's avatar Daniela Genius
Browse files

debut d'arborescence pour systemc ams

parent 6a9e92e4
UNAME := $(shell uname -s)
CC = /usr/bin/gcc
#CC = test2.sh
#CC = /packages/gcc_3.2.2/bin/g++32
OPT = -O1 -pthread
# Solaris
#LOPT = -O1 -pthread -ldl -lnsl -lsocket
#Linux
LOPT_UNIX = -O1 -pthread -ldl -lrt
LOPT_MAC = -O1 -pthread -ldl
DEBUG = -g
OTHER = -Wall
TRY =
CFLAGS = $(OPT) $(OTHER) $(TRY)
LFLAGS_MAC = $(LOPT_MAC) $(OTHER) $(TRY)
LFLAGS_UNIX = $(LOPT_UNIX) $(OTHER) $(TRY)
# CFLAGS = $(DEBUG) $(OTHER)
OBJDIR = lib
MODULE = run
SRCS_generated_DIR = generated_src/
include Makefile.src
SRCS_base = src/request.c src/message.c src/myerrors.c src/debug.c src/syncchannel.c src/asyncchannel.c src/request_manager.c src/random.c src/mytimelib.c src/tracemanager.c
SRCS_base_DIR = .
SRCS_base_DIRSRC = src/
OBJS_executor = $(SRCS_base:%.c=lib/%.o)
OBJS = $(SRCS:%.c=lib/%.o)
include Makefile.defs
include Makefile.forsoclib
## Variable that points to SystemC installation path
INCDIR = -I. -I$(SRCS_base_DIR) -I$(SRCS_base_DIRSRC) -I$(SRCS_generated_DIR)
LIBDIR = -L. -L..
LIBS = -lm $(EXTRA_LIBS)
EXE = $(MODULE).x
.SUFFIXES: .c .o .x
$(EXE): makedir $(OBJS) $(OBJS_executor)
ifeq ($(UNAME),Darwin)
$(CC) $(LFLAGS_MAC) $(INCDIR) $(LIBDIR) -o $@ $(OBJS) $(OBJS_executor) $(LIBS) 2>&1 | c++filt
endif
ifneq ($(UNAME),Darwin)
$(CC) $(LFLAGS_UNIX) $(INCDIR) $(LIBDIR) -o $@ $(OBJS) $(OBJS_executor) $(LIBS) 2>&1 | c++filt
endif
makedir:
echo Making directories
mkdir -p ./lib
mkdir -p ./lib/$(SRCS_generated_DIR)
mkdir -p ./lib/$(SRCS_base_DIRSRC)
$(OBJDIR)/%.o: $(SRCS_base_DIR)/%.c
$(CC) $(CFLAGS) $(INCDIR) -o $@ -c $<
clean:
rm -f $(OBJS_simulator) $(OBJS_executor) $(OBJS) *~ $(EXE) core
ultraclean: clean
rm -f Makefile.deps
SOCLIB_CPU=ppc
MUTEKH_CPU=ppc
#SOCLIB_CPU=mips32el
#MUTEKH_CPU=mips
include generated_topcell/procinfo.mk
#SOCLIB_CPU=sparcv8
#MUTEKH_CPU=sparc
#SOCLIB_CPU_COUNT=1
PATH+=/opt/mutekh/bin
export PATH
updateruntime:
cp mutekh/libmwmr/*.c mutekh/examples/avatar
cp mutekh/libmwmr/include/mwmr/mwmr.h mutekh/examples/avatar
#cp src/*.c ~/TTool/MPSoC/mutekh/libavatar/
#cp src/*.h ~/TTool/MPSoC/mutekh/libavatar/include/
updategeneratedcode:
cp src/defs.h mutekh/examples/avatar
cp generated_src/*.h mutekh/examples/avatar
cp generated_src/*.c mutekh/examples/avatar
cp Makefile.soclib mutekh/examples/avatar/Makefile
compilesoclib:
cp generated_topcell/top.cc soclib/soclib/platform/topcells/caba-vgmn-mutekh_kernel_tutorial/
cp generated_topcell/deployinfo.h mutekh/arch/soclib/
cp generated_topcell/deployinfo_map.h mutekh/arch/soclib/
cp generated_topcell/deployinfo_ram.h mutekh/arch/soclib/
cp generated_topcell/platform_desc soclib/soclib/platform/topcells/caba-vgmn-mutekh_kernel_tutorial/platform_desc
cat generated_topcell/config_noproc generated_topcell/nbproc > generated_topcell/config
cp generated_topcell/config mutekh/examples/avatar/
cd mutekh; make CONF=examples/avatar/config BUILD=soclib-$(MUTEKH_CPU):pf-tutorial
runsoclib-trace:
echo "running soclib"
cd soclib/soclib/platform/topcells/caba-vgmn-mutekh_kernel_tutorial; make; SOCLIB_GDB=S ./system.x $(SOCLIB_CPU):$(SOCLIB_CPU_COUNT) ../../../../../mutekh/avatar-soclib-$(MUTEKH_CPU).out > ../../../../trace
runsoclib:
echo "running soclib"
cd soclib/soclib/platform/topcells/caba-vgmn-mutekh_kernel_tutorial; make; SOCLIB_GDB=S ./system.x $(SOCLIB_CPU):$(SOCLIB_CPU_COUNT) ../../../../../mutekh/avatar-soclib-$(MUTEKH_CPU).out
allsoclib: updateruntime updategeneratedcode compilesoclib runsoclib
SOCLIB_CPU=mips32el
MUTEKH_CPU=mips
PATH+=/opt/mutekh/bin
export PATH
updategeneratedcode:
cp generated_src/*.h mutekh/examples/systemcams
cp generated_src/*.c mutekh/examples/systemcams
cp Makefile.soclib mutekh/examples/systemcams/Makefile
compilesystemcams:
cp generated_topcell/top.cc soclib/soclib/platform/topcells/systemcams/
runscams:
echo "running SystemC-AMS"
cd soclib/soclib/platform/topcells/systemcams; make; SOCLIB_GDB=S ./executable
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment