mirror of https://github.com/openXC7/prjxray.git
Merge pull request #686 from litghost/fix_piplist_directory
Use seperate build directory for each piplist.
This commit is contained in:
commit
721e9eb0ab
|
|
@ -30,7 +30,7 @@ build/segbits_clk_hrow.rdb: $(SPECIMENS_OK)
|
|||
$(shell find build -name segdata_clk_hrow_top_r.txt) \
|
||||
$(shell find build -name segdata_clk_hrow_bot_r.txt)
|
||||
|
||||
build/segbits_clk_hrow.db: build/segbits_clk_hrow.rdb $(XRAY_FUZZERS_DIR)/piplist/build/clk_hrow_bot_r.txt
|
||||
build/segbits_clk_hrow.db: build/segbits_clk_hrow.rdb $(XRAY_FUZZERS_DIR)/piplist/build/clk_hrow/clk_hrow_bot_r.txt
|
||||
${XRAY_DBFIXUP} --db-root build --zero-db bits.dbf \
|
||||
--seg-fn-in build/segbits_clk_hrow.rdb \
|
||||
--seg-fn-out build/segbits_clk_hrow_rc.db
|
||||
|
|
@ -38,7 +38,7 @@ build/segbits_clk_hrow.db: build/segbits_clk_hrow.rdb $(XRAY_FUZZERS_DIR)/piplis
|
|||
# Convert row/column into PIP definition.
|
||||
python3 merge_clk_entries.py \
|
||||
build/segbits_clk_hrow_rc.db \
|
||||
$(XRAY_FUZZERS_DIR)/piplist/build/clk_hrow_bot_r.txt \
|
||||
$(XRAY_FUZZERS_DIR)/piplist/build/clk_hrow/clk_hrow_bot_r.txt \
|
||||
build/segbits_clk_hrow.db
|
||||
|
||||
# Keep a copy to track iter progress
|
||||
|
|
|
|||
|
|
@ -1,25 +1,20 @@
|
|||
MAKETODO_FLAGS=--re ".*" --not-endswith ".VCC_WIRE"
|
||||
ifeq ($(QUICK),Y)
|
||||
N ?= 1
|
||||
SEGMATCH_FLAGS=
|
||||
else
|
||||
N ?= 48
|
||||
# Do relatively large batch to keep parallelism high
|
||||
# LCM between 12 (CPUs on my system) and 16, a common CPU count
|
||||
N ?= 48
|
||||
SEGMATCH_FLAGS=-m 15 -M 45
|
||||
endif
|
||||
# Driven by int_loop.sh
|
||||
ITER := 1
|
||||
MAKETODO_FLAGS=--re ".*" --not-endswith ".VCC_WIRE"
|
||||
PIPLIST_TCL=$(XRAY_FUZZERS_DIR)/piplist/piplist.tcl
|
||||
SPECIMENS := $(addprefix build/$(ITER)/specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
||||
# Individual fuzzer directory, such as ~/prjxray/fuzzers/010-lutinit
|
||||
export FUZDIR=$(shell pwd)
|
||||
|
||||
CHECK_ARGS=--max-iters 12 --min-progress 50
|
||||
|
||||
include ../pip_loop.mk
|
||||
|
||||
# Specimens from current run must complete, but previous iterations may exist
|
||||
database: build/database
|
||||
|
||||
build/database: build/segbits_int_l.db build/segbits_int_r.db build/mask_clbll_l.db build/mask_clbll_r.db build/mask_clblm_l.db build/mask_clblm_r.db
|
||||
database: build/segbits_int_l.db build/segbits_int_r.db build/mask_clbll_l.db build/mask_clbll_r.db build/mask_clblm_l.db build/mask_clblm_r.db
|
||||
# Keep a copy to track iter progress
|
||||
# Also is pre-fixup, which drops and converts
|
||||
cp build/segbits_int_l.db build/$(ITER)/segbits_int_l.db
|
||||
|
|
@ -27,26 +22,36 @@ build/database: build/segbits_int_l.db build/segbits_int_r.db build/mask_clbll_l
|
|||
# May be undersolved
|
||||
ifneq ($(QUICK),Y)
|
||||
${XRAY_DBFIXUP} --db-root build --clb-int
|
||||
# https://github.com/SymbiFlow/prjxray/issues/399
|
||||
# Clobber existing .db to eliminate potential conflicts
|
||||
cp ${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/segbits*.db build/database/${XRAY_DATABASE}
|
||||
XRAY_DATABASE_DIR=${FUZDIR}/build/database ${XRAY_MERGEDB} int_l build/segbits_int_l.db
|
||||
XRAY_DATABASE_DIR=${FUZDIR}/build/database ${XRAY_MERGEDB} int_r build/segbits_int_r.db
|
||||
endif
|
||||
touch build/database
|
||||
|
||||
build/segbits_int_l.db: $(SPECIMENS_OK)
|
||||
${XRAY_SEGMATCH} $(SEGMATCH_FLAGS) -o build/segbits_int_l.db $(shell find build -name segdata_int_l.txt |sort)
|
||||
${XRAY_SEGMATCH} $(SEGMATCH_FLAGS) -o build/segbits_int_l.db \
|
||||
$(shell find build -name segdata_int_l.txt |sort)
|
||||
|
||||
build/segbits_int_r.db: $(SPECIMENS_OK)
|
||||
${XRAY_SEGMATCH} $(SEGMATCH_FLAGS) -o build/segbits_int_r.db $(shell find build -name segdata_int_r.txt |sort)
|
||||
${XRAY_SEGMATCH} $(SEGMATCH_FLAGS) -o build/segbits_int_r.db \
|
||||
$(shell find build -name segdata_int_r.txt |sort)
|
||||
|
||||
build/mask_clbll_l.db: $(SPECIMENS_OK)
|
||||
${XRAY_MASKMERGE} build/mask_clbll_l.db $(shell find build -name segdata_int_l.txt |sort)
|
||||
${XRAY_MASKMERGE} build/mask_clbll_l.db \
|
||||
$(shell find build -name segdata_int_l.txt |sort)
|
||||
|
||||
build/mask_clbll_r.db: $(SPECIMENS_OK)
|
||||
${XRAY_MASKMERGE} build/mask_clbll_r.db $(shell find build -name segdata_int_r.txt |sort)
|
||||
${XRAY_MASKMERGE} build/mask_clbll_r.db \
|
||||
$(shell find build -name segdata_int_r.txt |sort)
|
||||
|
||||
build/mask_clblm_l.db: $(SPECIMENS_OK)
|
||||
${XRAY_MASKMERGE} build/mask_clblm_l.db $(shell find build -name segdata_int_l.txt |sort)
|
||||
${XRAY_MASKMERGE} build/mask_clblm_l.db \
|
||||
$(shell find build -name segdata_int_l.txt |sort)
|
||||
|
||||
build/mask_clblm_r.db: $(SPECIMENS_OK)
|
||||
${XRAY_MASKMERGE} build/mask_clblm_r.db $(shell find build -name segdata_int_r.txt |sort)
|
||||
${XRAY_MASKMERGE} build/mask_clblm_r.db \
|
||||
$(shell find build -name segdata_int_r.txt |sort)
|
||||
|
||||
pushdb:
|
||||
${XRAY_MERGEDB} int_l build/segbits_int_l.db
|
||||
|
|
@ -55,47 +60,3 @@ pushdb:
|
|||
${XRAY_MERGEDB} mask_clbll_r build/mask_clbll_r.db
|
||||
${XRAY_MERGEDB} mask_clblm_l build/mask_clblm_l.db
|
||||
${XRAY_MERGEDB} mask_clblm_r build/mask_clblm_r.db
|
||||
|
||||
$(SPECIMENS_OK): build/todo.txt
|
||||
mkdir -p build/$(ITER)
|
||||
bash generate.sh $(subst /OK,,$@)
|
||||
touch $@
|
||||
|
||||
$(XRAY_FUZZERS_DIR)/piplist/build/pips_int_l.txt: $(XRAY_FUZZERS_DIR)/piplist/piplist.tcl
|
||||
mkdir -p $(XRAY_FUZZERS_DIR)/piplist/build
|
||||
cd $(XRAY_FUZZERS_DIR)/piplist/build && ${XRAY_VIVADO} -mode batch -source $(PIPLIST_TCL)
|
||||
|
||||
build/todo.txt: $(XRAY_FUZZERS_DIR)/piplist/build/pips_int_l.txt $(XRAY_DIR)/fuzzers/int_maketodo.py
|
||||
# Doesn't pushdb until very end. Compare against db so far
|
||||
mkdir -p build/$(ITER)
|
||||
python3 $(XRAY_DIR)/fuzzers/int_maketodo.py --db-dir build $(MAKETODO_FLAGS) |sort >build/todo_all.txt
|
||||
cat build/todo_all.txt | sort -R > build/todo.txt.tmp
|
||||
mv build/todo.txt.tmp build/todo.txt
|
||||
# Per iter files
|
||||
mkdir -p build/$(ITER)
|
||||
cp build/todo_all.txt build/todo.txt build/$(ITER)/
|
||||
# All in one dir for easier trending
|
||||
mkdir -p build/todo
|
||||
cp build/todo_all.txt build/todo/$(ITER)_all.txt
|
||||
|
||||
# XXX: conider moving to script
|
||||
run:
|
||||
$(MAKE) clean
|
||||
# Because 056 cannot solve IMUX and LOGIC_OUTS, force zero entries for the
|
||||
# LOGIC_OUTS or IMUX entries.
|
||||
XRAY_DIR=${XRAY_DIR} MAKE="$(MAKE)" QUICK=$(QUICK) $(XRAY_DIR)/fuzzers/int_loop.sh \
|
||||
--check-args "--max-iters 12 --min-progress 50"
|
||||
touch run.ok
|
||||
|
||||
clean:
|
||||
rm -rf build run.ok todo
|
||||
|
||||
# Remove iteration specific files, but keep piplist.tcl output
|
||||
cleaniter:
|
||||
rm -rf build/$(ITER) build/todo.txt
|
||||
|
||||
# Remove piplist build files in piplist directory
|
||||
cleanpiplist:
|
||||
rm -rf $(XRAY_FUZZERS_DIR)/piplist/build
|
||||
|
||||
.PHONY: database pushdb run clean cleaniter cleanpiplist
|
||||
|
|
|
|||
|
|
@ -100,7 +100,8 @@ def run(
|
|||
os.getenv("XRAY_DATABASE_DIR"), os.getenv("XRAY_DATABASE"))
|
||||
|
||||
if pip_dir is None:
|
||||
pip_dir = "%s/piplist/build" % (os.getenv("XRAY_FUZZERS_DIR"))
|
||||
pip_dir = "%s/piplist/build/%s" % (
|
||||
os.getenv("XRAY_FUZZERS_DIR"), pip_type)
|
||||
|
||||
assert intre, "RE is required"
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ SPECIMENS_DEPS ?=
|
|||
|
||||
# See int_loop_check.py
|
||||
# rempips took 35 iters once, so set 50 as a good start point
|
||||
CHECK_ARGS := --zero-entries --timeout-iters 50
|
||||
CHECK_ARGS ?= --zero-entries --timeout-iters 50
|
||||
SPECIMENS := $(addprefix build/$(ITER)/specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
||||
# Individual fuzzer directory, such as ~/prjxray/fuzzers/010-lutinit
|
||||
|
|
@ -30,15 +30,19 @@ all: database
|
|||
|
||||
$(SPECIMENS_OK): build/todo.txt $(SPECIMENS_DEPS)
|
||||
mkdir -p build/$(ITER)
|
||||
bash ${XRAY_DIR}/utils/top_generate.sh $(subst /OK,,$@)
|
||||
if [ -f ${FUZDIR}/generate.sh ] ; then \
|
||||
bash ${FUZDIR}/generate.sh $(subst /OK,,$@) ; \
|
||||
else \
|
||||
bash ${XRAY_DIR}/utils/top_generate.sh $(subst /OK,,$@) ; \
|
||||
fi
|
||||
touch $@
|
||||
|
||||
$(XRAY_FUZZERS_DIR)/piplist/build/$(A_PIPLIST): $(PIPLIST_TCL)
|
||||
mkdir -p $(XRAY_FUZZERS_DIR)/piplist/build
|
||||
cd $(XRAY_FUZZERS_DIR)/piplist/build && ${XRAY_VIVADO} -mode batch -source $(PIPLIST_TCL)
|
||||
$(XRAY_FUZZERS_DIR)/piplist/build/$(PIP_TYPE)/$(A_PIPLIST): $(PIPLIST_TCL)
|
||||
mkdir -p $(XRAY_FUZZERS_DIR)/piplist/build/$(PIP_TYPE)
|
||||
cd $(XRAY_FUZZERS_DIR)/piplist/build/$(PIP_TYPE) && ${XRAY_VIVADO} -mode batch -source $(PIPLIST_TCL)
|
||||
|
||||
# Used 1) to see if we are done 2) pips to try in generate.tcl
|
||||
build/todo.txt: $(XRAY_FUZZERS_DIR)/piplist/build/$(A_PIPLIST) $(XRAY_DIR)/fuzzers/int_maketodo.py build/database/seeded
|
||||
build/todo.txt: $(XRAY_FUZZERS_DIR)/piplist/build/$(PIP_TYPE)/$(A_PIPLIST) $(XRAY_DIR)/fuzzers/int_maketodo.py build/database/seeded
|
||||
XRAY_DATABASE_DIR=${FUZDIR}/build/database \
|
||||
python3 $(XRAY_DIR)/fuzzers/int_maketodo.py \
|
||||
$(MAKETODO_FLAGS) |sort >build/todo_all.txt
|
||||
|
|
|
|||
Loading…
Reference in New Issue