Skip to content

Commit

Permalink
Merge pull request f4pga#715 from litghost/fix_pip_list
Browse files Browse the repository at this point in the history
Fix 048 not using correct directory.
  • Loading branch information
litghost committed Mar 12, 2019
2 parents 2389645 + 1f53d57 commit 45a8af8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 31 deletions.
9 changes: 5 additions & 4 deletions fuzzers/041-clk-hrow-pips/Makefile
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Expand All @@ -30,15 +31,15 @@ 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

# 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
Expand Down
18 changes: 3 additions & 15 deletions fuzzers/048-int-piplist/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
14 changes: 14 additions & 0 deletions fuzzers/pip_list.mk
Original file line number Diff line number Diff line change
@@ -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
17 changes: 5 additions & 12 deletions fuzzers/pip_loop.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand All @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 45a8af8

Please sign in to comment.