diff --git a/fuzzers/065-gtp-common-pips/Makefile b/fuzzers/065-gtp-common-pips/Makefile index 838d7354..79c0c0b1 100644 --- a/fuzzers/065-gtp-common-pips/Makefile +++ b/fuzzers/065-gtp-common-pips/Makefile @@ -6,51 +6,53 @@ # # SPDX-License-Identifier: ISC export FUZDIR=$(shell pwd) -PIP_TYPE?=gtp_common +PIP_TYPE?=gtp_common_${XRAY_PART} +SEG_TYPE?=gtp_common PIPLIST_TCL=$(FUZDIR)/gtp_common_pip_list.tcl +BUILD_DIR = ${FUZDIR}/build_${XRAY_PART} +RUN_OK = run.${XRAY_PART}.ok TODO_RE=".*" -MAKETODO_FLAGS=--pip-type ${PIP_TYPE} --seg-type $(PIP_TYPE) --re $(TODO_RE) --sides "" -N = 20 +MAKETODO_FLAGS=--pip-type ${PIP_TYPE} --seg-type $(SEG_TYPE) --re $(TODO_RE) --sides "" +N = 60 SEGMATCH_FLAGS=-c 2 -SPECIMENS_DEPS=build/cmt_regions.csv -A_PIPLIST=gtp_common.txt +SPECIMENS_DEPS=$(BUILD_DIR)/cmt_regions.csv +A_PIPLIST=gtp_common_${XRAY_PART}.txt include ../pip_loop.mk -build/segbits_gtp_common.rdb: $(SPECIMENS_OK) - ${XRAY_SEGMATCH} ${SEGMATCH_FLAGS} -o build/segbits_gtp_common.rdb \ - $(shell find build -name segdata_gtp_common*.txt) +$(BUILD_DIR)/segbits_gtp_common.rdb: $(SPECIMENS_OK) + ${XRAY_SEGMATCH} ${SEGMATCH_FLAGS} -o $(BUILD_DIR)/segbits_gtp_common.rdb \ + $(shell find $(BUILD_DIR) -name segdata_gtp_common*.txt) -RDBS = build/segbits_gtp_common.rdb +RDBS = $(BUILD_DIR)/segbits_gtp_common.rdb database: ${RDBS} - ${XRAY_DBFIXUP} --db-root build --zero-db bits.dbf \ - --seg-fn-in build/segbits_gtp_common.rdb \ - --seg-fn-out build/segbits_gtp_common.db + ${XRAY_DBFIXUP} --db-root $(BUILD_DIR) --zero-db bits.dbf \ + --seg-fn-in $(BUILD_DIR)/segbits_gtp_common.rdb \ + --seg-fn-out $(BUILD_DIR)/segbits_gtp_common.db # Keep a copy to track iter progress - cp build/segbits_gtp_common.rdb build/$(ITER)/segbits_gtp_common.rdb - cp build/segbits_gtp_common.db build/$(ITER)/segbits_gtp_common.db + cp $(BUILD_DIR)/segbits_gtp_common.rdb $(BUILD_DIR)/$(ITER)/segbits_gtp_common.rdb + cp $(BUILD_DIR)/segbits_gtp_common.db $(BUILD_DIR)/$(ITER)/segbits_gtp_common.db # 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} gtp_common build/segbits_gtp_common.db + cp ${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/segbits*.db $(BUILD_DIR)/database/${XRAY_DATABASE} + XRAY_DATABASE_DIR=$(BUILD_DIR)/database ${XRAY_MERGEDB} gtp_common_mid_left $(BUILD_DIR)/segbits_gtp_common.db + XRAY_DATABASE_DIR=$(BUILD_DIR)/database ${XRAY_MERGEDB} gtp_common_mid_right $(BUILD_DIR)/segbits_gtp_common.db -build/cmt_regions.csv: output_cmt.tcl - mkdir -p build - cd build/ && ${XRAY_VIVADO} -mode batch -source ${FUZDIR}/output_cmt.tcl +$(BUILD_DIR)/cmt_regions.csv: output_cmt.tcl + mkdir -p $(BUILD_DIR) + cd $(BUILD_DIR)/ && ${XRAY_VIVADO} -mode batch -source ${FUZDIR}/output_cmt.tcl + +clean_all: + rm -rf build_* run.*.ok pushdb: database - ${XRAY_MERGEDB} gtp_common_mid_left build/segbits_gtp_common.db - ${XRAY_MERGEDB} gtp_common_mid_right build/segbits_gtp_common.db + ${XRAY_MERGEDB} gtp_common_mid_left $(BUILD_DIR)/segbits_gtp_common.db + ${XRAY_MERGEDB} gtp_common_mid_right $(BUILD_DIR)/segbits_gtp_common.db -run: - $(MAKE) clean - +$(FUZDIR)/../int_loop.sh --check-args "--zero-entries --timeout-iters 10" - touch run.${XRAY_PART}.ok - -.PHONY: database pushdb run +.PHONY: database pushdb run clean diff --git a/fuzzers/065-gtp-common-pips/generate.py b/fuzzers/065-gtp-common-pips/generate.py index 0c8feb88..ba60b252 100644 --- a/fuzzers/065-gtp-common-pips/generate.py +++ b/fuzzers/065-gtp-common-pips/generate.py @@ -27,8 +27,9 @@ def bitfilter(frame, word): def read_pip_data(pipfile, pipdata, tile_ports): + part = os.getenv('XRAY_PART') with open(os.path.join(os.getenv('FUZDIR'), '..', 'piplist', 'build', - 'gtp_common', pipfile)) as f: + 'gtp_common_{}'.format(part), pipfile)) as f: for l in f: tile_type, dst, src = l.strip().split('.') if tile_type not in pipdata: @@ -48,7 +49,8 @@ def main(): ignpip = set() tile_ports = {} - read_pip_data('gtp_common.txt', pipdata, tile_ports) + part = os.getenv('XRAY_PART') + read_pip_data('gtp_common_{}.txt'.format(part), pipdata, tile_ports) print("Loading tags from design.txt.") with open("design.txt", "r") as f: diff --git a/fuzzers/065-gtp-common-pips/gtp_common_pip_list.tcl b/fuzzers/065-gtp-common-pips/gtp_common_pip_list.tcl index d5149f50..a2856474 100644 --- a/fuzzers/065-gtp-common-pips/gtp_common_pip_list.tcl +++ b/fuzzers/065-gtp-common-pips/gtp_common_pip_list.tcl @@ -46,4 +46,4 @@ create_project -force -part $::env(XRAY_PART) design design set_property design_mode PinPlanning [current_fileset] open_io_design -name io_1 -print_tile_pips GTP_COMMON_MID_LEFT gtp_common.txt +print_tile_pips GTP_COMMON_MID_LEFT gtp_common_$::env(XRAY_PART).txt diff --git a/fuzzers/065-gtp-common-pips/top.py b/fuzzers/065-gtp-common-pips/top.py index 6f4c18cd..4cae8350 100644 --- a/fuzzers/065-gtp-common-pips/top.py +++ b/fuzzers/065-gtp-common-pips/top.py @@ -20,7 +20,10 @@ from prjxray.db import Database def read_site_to_cmt(): """ Yields clock sources and which CMT they route within. """ - with open(os.path.join(os.getenv('FUZDIR'), 'build', + fuzdir = os.getenv('FUZDIR') + part = os.getenv('XRAY_PART') + + with open(os.path.join(fuzdir, 'build_{}'.format(part), 'cmt_regions.csv')) as f: for l in f: site, cmt = l.strip().split(',') diff --git a/fuzzers/Makefile b/fuzzers/Makefile index 4e96d661..e00fde32 100644 --- a/fuzzers/Makefile +++ b/fuzzers/Makefile @@ -160,6 +160,7 @@ ifeq ($(XRAY_DATABASE),artix7) $(eval $(call fuzzer,061-pcie-conf,005-tilegrid,all)) $(eval $(call fuzzer,063-gtp-common-conf,005-tilegrid,part)) $(eval $(call fuzzer,064-gtp-channel-conf,005-tilegrid,part)) +$(eval $(call fuzzer,065-gtp-common-pips,005-tilegrid,part)) endif endif endif