Merge branch 'master' into roi_harness

This commit is contained in:
John McMaster 2018-01-05 09:37:54 -08:00 committed by GitHub
commit 0d31795ef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 227 additions and 49 deletions

View File

@ -1,17 +1,23 @@
N := 1
SPECIMENS := $(addprefix specimen_,$(shell seq -f '%03.0f' $(N)))
.PHONY: database pushdb clean $(SPECIMENS)
database: $(SPECIMENS)
cp specimen_001/part.yaml ${XRAY_PART}.yaml
$(SPECIMENS): Makefile.specimen
mkdir -p $@
$(MAKE) -C $@ -f ../Makefile.specimen
database: $(SPECIMENS)
cp specimen_001/part.yaml ${XRAY_PART}.yaml
pushdb:
cp ${XRAY_PART}.yaml ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ *.yaml
rm -rf specimen_[0-9][0-9][0-9]/ *.yaml run.ok
.PHONY: database pushdb clean run $(SPECIMENS)

View File

@ -13,8 +13,14 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ tilegrid.json
rm -rf specimen_[0-9][0-9][0-9]/ tilegrid.json run.ok
.PHONY: database pushdb clean
.PHONY: database pushdb clean run

0
fuzzers/005-tilegrid/generate.sh Executable file → Normal file
View File

View File

@ -17,8 +17,14 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_clbll.segbits seg_clblm.segbits
rm -rf specimen_[0-9][0-9][0-9]/ seg_clbll.segbits seg_clblm.segbits run.ok
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -15,8 +15,15 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits __pycache__ run.ok
rm -rf vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -15,8 +15,14 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v run.ok
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -15,8 +15,14 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v run.ok
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -15,8 +15,14 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v run.ok
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -16,8 +16,14 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v run.ok
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -16,8 +16,14 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ *.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v
rm -rf specimen_[0-9][0-9][0-9]/ *.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v run.ok
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -16,8 +16,14 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v run.ok
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -15,8 +15,14 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v run.ok
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -15,8 +15,14 @@ $(SPECIMENS_OK):
bash generate.sh $(subst /OK,,$@)
touch $@
run:
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v
rm -rf specimen_[0-9][0-9][0-9]/ seg_clblx.segbits vivado*.log vivado_*.str vivado*.jou design *.bits *.dcp *.bit top.v run.ok
.PHONY: database pushdb clean
.PHONY: database pushdb run clean

View File

@ -25,10 +25,13 @@ $(SPECIMENS_OK):
touch $@
run:
+set -ex; make clean; make; make pushdb
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_int_[lr].segbits mask_clbl[lm]_[lr].segbits
rm -rf specimen_[0-9][0-9][0-9]/ seg_int_[lr].segbits mask_clbl[lm]_[lr].segbits run.ok
.PHONY: database pushdb run clean

View File

@ -21,10 +21,11 @@ todo.txt:
python3 maketodo.py > todo.txt
run:
+set -ex; while make clean; make todo.txt; test -s todo.txt; do make; make pushdb; done; true
+set -ex; while make clean; make todo.txt; test -s todo.txt; do make database; make pushdb; done; true
touch run.ok
clean:
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits run.ok
rm -rf todo.txt vivado* piplist/ piplist.dcp pattern_[lr].txt pips_int_[lr].txt
rm -rf specimen_[0-9][0-9][0-9]/ seg_int_[lr].segbits mask_clbl[lm]_[lr].segbits

View File

@ -21,10 +21,11 @@ todo.txt:
python3 maketodo.py | sort -R | head -n10 > todo.txt
run:
+set -ex; while make clean; make todo.txt; test -s todo.txt; do make; make pushdb; done; true
+set -ex; while make clean; make todo.txt; test -s todo.txt; do make database; make pushdb; done; true
touch run.ok
clean:
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits run.ok
rm -rf todo.txt vivado* piplist/ piplist.dcp pattern_[lr].txt pips_int_[lr].txt
rm -rf specimen_[0-9][0-9][0-9]/ seg_int_[lr].segbits mask_clbl[lm]_[lr].segbits

View File

@ -21,10 +21,11 @@ todo.txt:
python3 maketodo.py | sort -R | head -n10 > todo.txt
run:
+set -ex; while make clean; make todo.txt; test -s todo.txt; do make; make pushdb; done; true
+set -ex; while make clean; make todo.txt; test -s todo.txt; do make database; make pushdb; done; true
touch run.ok
clean:
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits run.ok
rm -rf todo.txt vivado* piplist/ piplist.dcp pattern_[lr].txt pips_int_[lr].txt
rm -rf specimen_[0-9][0-9][0-9]/ seg_int_[lr].segbits mask_clbl[lm]_[lr].segbits

View File

@ -21,10 +21,11 @@ todo.txt:
python3 maketodo.py | sort -R | head -n10 > todo.txt
run:
+set -ex; while make clean; make todo.txt; test -s todo.txt; do make; make pushdb; done; true
+set -ex; while make clean; make todo.txt; test -s todo.txt; do make database; make pushdb; done; true
touch run.ok
clean:
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits run.ok
rm -rf todo.txt vivado* piplist/ piplist.dcp pattern_[lr].txt pips_int_[lr].txt
rm -rf specimen_[0-9][0-9][0-9]/ seg_int_[lr].segbits mask_clbl[lm]_[lr].segbits

View File

@ -23,10 +23,13 @@ todo.txt:
echo "INT_R.GFAN1.GND_WIRE" >> todo.txt
run:
+set -ex; make clean; make; make pushdb
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits run.ok
rm -rf todo.txt vivado* piplist/ piplist.dcp pattern_[lr].txt pips_int_[lr].txt
rm -rf specimen_[0-9][0-9][0-9]/ seg_int_[lr].segbits mask_clbl[lm]_[lr].segbits

View File

@ -21,10 +21,11 @@ todo.txt:
python3 maketodo.py | sort -R | head -n10 > todo.txt
run:
+set -ex; while make clean; make todo.txt; test -s todo.txt; do if make; then make pushdb; fi; done; true
+set -ex; while make clean; make todo.txt; test -s todo.txt; do if make database; then make pushdb; fi; done; true
touch run.ok
clean:
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits
rm -rf .Xil/ .cache/ filtered_seg_int_[lr].segbits run.ok
rm -rf todo.txt vivado* piplist/ piplist.dcp pattern_[lr].txt pips_int_[lr].txt
rm -rf specimen_[0-9][0-9][0-9]/ seg_int_[lr].segbits

View File

@ -21,10 +21,11 @@ todo.txt:
python3 maketodo.py | sort -R | head -n5 > todo.txt
run:
+set -ex; while make clean; make todo.txt; test -s todo.txt; do make; make pushdb; done; true
+set -ex; while make clean; make todo.txt; test -s todo.txt; do make database; make pushdb; done; true
touch run.ok
clean:
rm -rf .Xil/ .cache/ vivado* todo.txt
rm -rf .Xil/ .cache/ vivado* todo.txt run.ok
rm -rf bipiplist/ bipiplist.dcp bipips_int_[lr].txt
rm -rf specimen_[0-9][0-9][0-9]/ seg_int_[lr].segbits

View File

@ -25,10 +25,12 @@ $(SPECIMENS_OK):
touch $@
run:
+set -ex; make clean; make; make pushdb
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
clean:
rm -rf specimen_[0-9][0-9][0-9]/ seg_hclk_[lr].segbits mask_hclk_[lr].segbits ppips_hclk_[lr].txt
rm -rf specimen_[0-9][0-9][0-9]/ seg_hclk_[lr].segbits mask_hclk_[lr].segbits ppips_hclk_[lr].txt run.ok
.PHONY: database pushdb run clean

View File

@ -14,10 +14,13 @@ $(SPECIMENS_OK):
touch $@
run:
+set -ex; make clean; make; make pushdb
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ tileconn.json
rm -rf specimen_[0-9][0-9][0-9]/ tileconn.json run.ok
.PHONY: database pushdb run clean

View File

@ -24,6 +24,22 @@ with open("nodewires.txt") as f:
tilenodes[wire_tile] = dict()
tilenodes[wire_tile][node] = wire_name
def filter_pair(type1, type2, wire1, wire2, delta_x, delta_y):
if type1 in ["HCLK_L", "HCLK_R"]:
is_vertical_wire = False
if wire1.startswith("HCLK_S"): is_vertical_wire = True
if wire1.startswith("HCLK_N"): is_vertical_wire = True
if wire1.startswith("HCLK_W"): is_vertical_wire = True
if wire1.startswith("HCLK_E"): is_vertical_wire = True
if wire1.startswith("HCLK_LV"): is_vertical_wire = True
if wire1.startswith("HCLK_BYP"): is_vertical_wire = True
if wire1.startswith("HCLK_FAN"): is_vertical_wire = True
if wire1.startswith("HCLK_LEAF_CLK_"): is_vertical_wire = True
if is_vertical_wire and delta_y == 0: return True
if not is_vertical_wire and delta_x == 0: return True
return False
def handle_pair(tile1, tile2):
if tile1 not in tilenodes: return
if tile2 not in tilenodes: return
@ -44,6 +60,10 @@ def handle_pair(tile1, tile2):
for node, wire1 in tilenodes[tile1].items():
if node in tilenodes[tile2]:
wire2 = tilenodes[tile2][node]
if filter_pair(key[0], key[1], wire1, wire2, key[2], key[3]):
continue
if filter_pair(key[1], key[0], wire2, wire1, -key[2], -key[3]):
continue
wire_pairs.add((wire1, wire2))
if key not in database:

0
fuzzers/070-tileconn/generate.sh Executable file → Normal file
View File

View File

@ -24,10 +24,13 @@ $(SPECIMENS_OK):
touch $@
run:
+set -ex; make clean; make; make pushdb
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb
touch run.ok
clean:
rm -rf specimen_[0-9][0-9][0-9]/ ppips_clbl[ml]_[lr].txt ppips_int_[lr].txt
rm -rf specimen_[0-9][0-9][0-9]/ ppips_clbl[ml]_[lr].txt ppips_int_[lr].txt run.ok
.PHONY: database pushdb run clean

0
fuzzers/071-ppips/generate.sh Executable file → Normal file
View File

31
fuzzers/Makefile Normal file
View File

@ -0,0 +1,31 @@
define fuzzer
all:: $(1)/run.ok
clean::
$(MAKE) -C $(1) clean
$(1)/run.ok: $(addsuffix /run.ok,$(2))
$(MAKE) -C $(1) run
endef
$(eval $(call fuzzer,001-part-yaml,))
$(eval $(call fuzzer,005-tilegrid,))
$(eval $(call fuzzer,010-lutinit,005-tilegrid))
$(eval $(call fuzzer,011-ffconfig,005-tilegrid))
$(eval $(call fuzzer,012-clbn5ffmux,005-tilegrid))
$(eval $(call fuzzer,013-clbncy0,005-tilegrid))
$(eval $(call fuzzer,014-ffsrcemux,005-tilegrid))
$(eval $(call fuzzer,015-clbnffmux,005-tilegrid))
$(eval $(call fuzzer,016-clbnoutmux,005-tilegrid))
$(eval $(call fuzzer,017-clbprecyinit,005-tilegrid))
$(eval $(call fuzzer,018-clbram,005-tilegrid))
$(eval $(call fuzzer,019-ndi1mux,005-tilegrid))
$(eval $(call fuzzer,050-intpips,005-tilegrid))
$(eval $(call fuzzer,051-imuxlout,050-intpips))
$(eval $(call fuzzer,052-clkin,050-intpips))
$(eval $(call fuzzer,053-ctrlin,050-intpips))
$(eval $(call fuzzer,054-gfan,050-intpips))
$(eval $(call fuzzer,055-gnd,050-intpips))
$(eval $(call fuzzer,056-rempips,051-imuxlout 052-clkin 053-ctrlin 054-gfan 055-gnd))
$(eval $(call fuzzer,057-bipips,056-rempips))
$(eval $(call fuzzer,058-hclkpips,056-rempips))
$(eval $(call fuzzer,070-tileconn,005-tilegrid))
$(eval $(call fuzzer,071-ppips,057-bipips 058-hclkpips))

34
utils/tileconnwire.py Normal file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env python3
import os, sys, json
if len(sys.argv) != 3:
print("Usage example: python3 %s HCLK_R HCLK_SW6E3" % sys.argv[0])
sys.exit(1)
with open("%s/%s/tileconn.json" % (os.getenv("XRAY_DATABASE_DIR"), os.getenv("XRAY_DATABASE")), "r") as f:
tileconn = json.load(f)
outdata = list()
max_tiletype_len = 1
for entry in tileconn:
if entry["tile_types"][0] == sys.argv[1]:
this_idx, other_idx = 0, 1
delta_x, delta_y = entry["grid_deltas"]
elif entry["tile_types"][1] == sys.argv[1]:
this_idx, other_idx = 1, 0
delta_x, delta_y = -entry["grid_deltas"][0], -entry["grid_deltas"][1]
else:
continue
for wire_pair in entry["wire_pairs"]:
if wire_pair[this_idx] != sys.argv[2]:
continue
outdata.append((delta_x, delta_y, entry["tile_types"][other_idx], wire_pair[other_idx]))
max_tiletype_len = max(max_tiletype_len, len(entry["tile_types"][other_idx]))
for entry in outdata:
print("%3d %3d %-*s %s" % (entry[0], entry[1], max_tiletype_len, entry[2], entry[3]))