SHELL=/bin/sh
|
SHELL=/bin/sh
|
MAKE=make
|
MAKE=make
|
CUR_DIR=$(shell pwd)
|
CUR_DIR=$(shell pwd)
|
home=$(CUR_DIR)/..
|
home=$(CUR_DIR)/..
|
design=socgen
|
design=socgen
|
|
|
|
|
all: run_sims build_fpgas check_sims check_fpgas
|
all: run_sims build_fpgas check_sims check_fpgas
|
|
|
|
|
.PHONY install:
|
.PHONY install:
|
install:
|
install:
|
(\
|
(\
|
cp ./tools/bin/* ~/bin;\
|
cp ./tools/bin/* ~/bin;\
|
chmod 755 ~/bin/* ;\
|
chmod 755 ~/bin/* ;\
|
)
|
)
|
|
|
|
|
|
|
.PHONY build_hw:
|
.PHONY build_hw:
|
build_hw:
|
build_hw:
|
@for PROJECT in `ls $(CUR_DIR)/work`; do \
|
@for PROJECT in `ls $(CUR_DIR)/work`; do \
|
echo "################################################"; \
|
echo "################################################"; \
|
echo "build_hw: $$PROJECT ####"; echo; \
|
echo "build_hw: $$PROJECT ####"; echo; \
|
cd ${home}/${design}/work/$$PROJECT/bin;\
|
cd ${home}/${design}/work/$$PROJECT/bin;\
|
${MAKE} group_build_hw;\
|
${MAKE} group_build_hw;\
|
done; \
|
done; \
|
|
|
.PHONY build_sw:
|
.PHONY build_sw:
|
build_sw: build_hw
|
build_sw: build_hw
|
@for PROJECT in `ls $(CUR_DIR)/work`; do \
|
@for PROJECT in `ls $(CUR_DIR)/work`; do \
|
echo "################################################"; \
|
echo "################################################"; \
|
echo "build_sw: $$PROJECT ####"; echo; \
|
echo "build_sw: $$PROJECT ####"; echo; \
|
cd ${home}/${design}/work/$$PROJECT/bin;\
|
cd ${home}/${design}/work/$$PROJECT/bin;\
|
${MAKE} group_build_sw;\
|
${MAKE} group_build_sw;\
|
done; \
|
done; \
|
|
|
.PHONY run_sims:
|
.PHONY run_sims:
|
run_sims: build_sw
|
run_sims: build_sw
|
@for PROJECT in `ls $(CUR_DIR)/work`; do \
|
@for PROJECT in `ls $(CUR_DIR)/work`; do \
|
echo "################################################"; \
|
echo "################################################"; \
|
echo "run_sims: $$PROJECT ####"; echo; \
|
echo "run_sims: $$PROJECT ####"; echo; \
|
cd ${home}/${design}/work/$$PROJECT/bin;\
|
cd ${home}/${design}/work/$$PROJECT/bin;\
|
${MAKE} group_run_sims;\
|
${MAKE} group_run_sims;\
|
done; \
|
done; \
|
|
|
.PHONY build_fpgas:
|
.PHONY build_fpgas:
|
build_fpgas:
|
build_fpgas:
|
@for PROJECT in `ls $(CUR_DIR)/work`; do \
|
@for PROJECT in `ls $(CUR_DIR)/work`; do \
|
echo "################################################"; \
|
echo "################################################"; \
|
echo "build_fpgas: $$PROJECT ####"; echo; \
|
echo "build_fpgas: $$PROJECT ####"; echo; \
|
cd ${home}/${design}/work/$$PROJECT/bin;\
|
cd ${home}/${design}/work/$$PROJECT/bin;\
|
${MAKE} group_build_fpgas;\
|
${MAKE} group_build_fpgas;\
|
done; \
|
done; \
|
|
|
|
|
|
|
|
|
|
|
.PHONY check_sims:
|
.PHONY check_sims:
|
check_sims:
|
check_sims:
|
@for COMP in `ls $(CUR_DIR)/work`; do \
|
@for COMP in `ls $(CUR_DIR)/work`; do \
|
echo "**************************************************************";\
|
echo "**************************************************************";\
|
echo " number of $$COMP sims run";\
|
echo " number of $$COMP sims run";\
|
find ./work | grep dut| grep -v children| grep -v cov | grep $$COMP | wc -l;\
|
find ./work | grep dut| grep -v children| grep -v cov | grep $$COMP | wc -l;\
|
echo " number of sims that finished";\
|
echo " number of sims that finished";\
|
find ./work | grep _sim.log | xargs grep PASSED $1 | grep $$COMP| wc -l ;\
|
find ./work | grep _sim.log | xargs grep PASSED $1 | grep $$COMP| wc -l ;\
|
echo " number of warnings";\
|
echo " number of warnings";\
|
find ./work | grep _sim.log | xargs grep WARNING $1 |grep $$COMP | wc -l ;\
|
find ./work | grep _sim.log | xargs grep WARNING $1 |grep $$COMP | wc -l ;\
|
echo " number of errors";\
|
echo " number of errors";\
|
find ./work | grep _sim.log | xargs grep ERROR $1 |grep $$COMP | wc -l ;\
|
find ./work | grep _sim.log | xargs grep ERROR $1 |grep $$COMP | wc -l ;\
|
echo " Code Coverage";\
|
echo " Code Coverage";\
|
echo " number of warnings";\
|
echo " number of warnings";\
|
find ./work | grep _cov.log | xargs grep WARNING $1| grep $$COMP | wc -l ;\
|
find ./work | grep _cov.log | xargs grep WARNING $1| grep $$COMP | wc -l ;\
|
echo " number of errors";\
|
echo " number of errors";\
|
find ./work | grep _cov.log | xargs grep ERROR $1 | grep $$COMP | wc -l ;\
|
find ./work | grep _cov.log | xargs grep ERROR $1 | grep $$COMP | wc -l ;\
|
done;
|
done;
|
|
|
|
|
.PHONY check_fpgas:
|
.PHONY check_fpgas:
|
check_fpgas:
|
check_fpgas:
|
(\
|
(\
|
cd ${home}/${design}_cmp ;\
|
cd ${home} ;\
|
echo " number of fpgas";\
|
echo " number of fpgas";\
|
find . | grep def_file | grep -v children | wc -l ;\
|
find . | grep def_file | grep -v children | grep work | grep -v .svn | wc -l ;\
|
echo " number that finished";\
|
echo " number that finished";\
|
find . | grep Board_Design_jtag.bit |wc -l ;\
|
find . | grep Board_Design_jtag.bit |wc -l ;\
|
)
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|