From 72d2b0d63a1827effc5fb98f885e2054c2bb5280 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Tue, 12 Mar 2019 10:47:27 -0700 Subject: [PATCH 1/2] Fix 048 not using correct directory. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fuzzers/048-int-piplist/Makefile | 18 +++--------------- fuzzers/pip_list.mk | 14 ++++++++++++++ fuzzers/pip_loop.mk | 17 +++++------------ 3 files changed, 22 insertions(+), 27 deletions(-) create mode 100644 fuzzers/pip_list.mk diff --git a/fuzzers/048-int-piplist/Makefile b/fuzzers/048-int-piplist/Makefile index 49f2c540..67c79251 100644 --- a/fuzzers/048-int-piplist/Makefile +++ b/fuzzers/048-int-piplist/Makefile @@ -1,16 +1,8 @@ -PIP_TYPE?=pips_int -A_PIPLIST?=$(PIP_TYPE)_l.txt -PIPLIST_TCL?=$(XRAY_FUZZERS_DIR)/piplist/piplist.tcl - all: database -database: $(XRAY_FUZZERS_DIR)/piplist/build/$(A_PIPLIST) - -$(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) +include ../pip_list.mk +database: piplist pushdb: true @@ -21,8 +13,4 @@ run: database clean: rm -rf build run.ok -cleanpiplist: - rm -rf $(XRAY_FUZZERS_DIR)/piplist/build - -.PHONY: all clean cleanpiplist run database pushdb - +.PHONY: all clean run database pushdb diff --git a/fuzzers/pip_list.mk b/fuzzers/pip_list.mk new file mode 100644 index 00000000..4cd339e1 --- /dev/null +++ b/fuzzers/pip_list.mk @@ -0,0 +1,14 @@ +PIP_TYPE?=pips_int +A_PIPLIST?=$(PIP_TYPE)_l.txt +PIPLIST_TCL?=$(XRAY_FUZZERS_DIR)/piplist/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) + +piplist: $(XRAY_FUZZERS_DIR)/piplist/build/$(PIP_TYPE)/$(A_PIPLIST) + +cleanpiplist: + rm -rf $(XRAY_FUZZERS_DIR)/piplist/build + +.PHONY: piplist cleanpiplist diff --git a/fuzzers/pip_loop.mk b/fuzzers/pip_loop.mk index bd9d8b82..b5fc090c 100644 --- a/fuzzers/pip_loop.mk +++ b/fuzzers/pip_loop.mk @@ -12,10 +12,7 @@ endif # Iteration number (each containing N specimens) # Driven by int_loop.sh ITER ?= 1 -PIP_TYPE?=pips_int MAKETODO_FLAGS ?=--pip-type pips_int --seg-type int -A_PIPLIST?=$(PIP_TYPE)_l.txt -PIPLIST_TCL?=$(XRAY_FUZZERS_DIR)/piplist/piplist.tcl SPECIMENS_DEPS ?= # See int_loop_check.py @@ -28,6 +25,9 @@ export FUZDIR=$(shell pwd) all: database +SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST))) +include $(SELF_DIR)/pip_list.mk + $(SPECIMENS_OK): build/todo.txt $(SPECIMENS_DEPS) mkdir -p build/$(ITER) if [ -f ${FUZDIR}/generate.sh ] ; then \ @@ -37,12 +37,8 @@ $(SPECIMENS_OK): build/todo.txt $(SPECIMENS_DEPS) fi touch $@ -$(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/$(PIP_TYPE)/$(A_PIPLIST) $(XRAY_DIR)/fuzzers/int_maketodo.py build/database/seeded +build/todo.txt: 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 @@ -75,7 +71,4 @@ clean: cleaniter: rm -rf build/$(ITER) build/todo.txt -cleanpiplist: - rm -rf $(XRAY_FUZZERS_DIR)/piplist/build - -.PHONY: all database pushdb run clean cleaniter cleanpiplist +.PHONY: all database pushdb run clean cleaniter From 1f53d5719bacd0a0f9e703ea204347966baa3fd1 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Tue, 12 Mar 2019 11:06:30 -0700 Subject: [PATCH 2/2] Fix piplist location for 041 fuzzer. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fuzzers/041-clk-hrow-pips/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fuzzers/041-clk-hrow-pips/Makefile b/fuzzers/041-clk-hrow-pips/Makefile index 5aa5450e..f3677cf7 100644 --- a/fuzzers/041-clk-hrow-pips/Makefile +++ b/fuzzers/041-clk-hrow-pips/Makefile @@ -1,6 +1,7 @@ export FUZDIR=$(shell pwd) -PIP_TYPE?=clk_hrow +PIP_TYPE?=clk_hrow_bot PIPLIST_TCL=$(FUZDIR)/clk_hrow_pip_list.tcl + ifeq (${XRAY_PART}, xc7z010clg400-1) # xc7z010clg400-1 is missing some side clock connections, so these bits cannot # be documented. @@ -9,7 +10,7 @@ else TODO_RE="[^\.]+\.CLK_HROW_CK_MUX_OUT_" endif -MAKETODO_FLAGS=--no-l --pip-type clk_hrow_bot --seg-type clk_hrow_bot --re $(TODO_RE) +MAKETODO_FLAGS=--no-l --pip-type ${PIP_TYPE} --seg-type clk_hrow_bot --re $(TODO_RE) N = 50 # These PIPs all appear to be either a 1 bit solutions. @@ -30,7 +31,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/clk_hrow_bot_r.txt +build/segbits_clk_hrow.db: build/segbits_clk_hrow.rdb piplist ${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 +39,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/clk_hrow_bot_r.txt \ + $(XRAY_FUZZERS_DIR)/piplist/build/${PIP_TYPE}/clk_hrow_bot_r.txt \ build/segbits_clk_hrow.db # Keep a copy to track iter progress