mirror of https://github.com/openXC7/prjxray.git
Merge pull request #1196 from antmicro/allow-multiple-parts
Allow generation of multiple-part db
This commit is contained in:
commit
8486f10a19
|
|
@ -86,14 +86,20 @@ echo "----------------------------------------"
|
||||||
)
|
)
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
|
|
||||||
# Check the database
|
# Generate extra harness files (additional part yaml's, harness).
|
||||||
#make checkdb-${XRAY_SETTINGS} || true
|
|
||||||
# Generate extra files (additional part yaml's, harness, etc).
|
|
||||||
set +e
|
set +e
|
||||||
# Attempt to generate extras here, but don't check until after diff reporting.
|
# Attempt to generate extra harnesses here, but don't check until after diff reporting.
|
||||||
make db-extras-${XRAY_SETTINGS}
|
make db-extras-${XRAY_SETTINGS}-harness
|
||||||
EXTRAS_RET=$?
|
EXTRAS_HARNESS_RET=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Generate extra parts file (tilegrid, tileconn, part yaml, part json and package_pin)
|
||||||
|
# TODO: Disabled for now as for big parts it takes a huge amount of time
|
||||||
|
#set +e
|
||||||
|
#make db-extras-${XRAY_SETTINGS}-parts -j $CORES
|
||||||
|
EXTRAS_PARTS_RET=0
|
||||||
|
#set -e
|
||||||
|
|
||||||
# Format the database
|
# Format the database
|
||||||
make db-format-${XRAY_SETTINGS}
|
make db-format-${XRAY_SETTINGS}
|
||||||
# Update the database/Info.md file
|
# Update the database/Info.md file
|
||||||
|
|
@ -187,9 +193,15 @@ echo "----------------------------------------"
|
||||||
|
|
||||||
# Check the database and fail if it is broken.
|
# Check the database and fail if it is broken.
|
||||||
make db-check-${XRAY_SETTINGS}
|
make db-check-${XRAY_SETTINGS}
|
||||||
if [[ $EXTRAS_RET != 0 ]] ; then
|
|
||||||
echo "A failure occurred during extras generation."
|
if [[ $EXTRAS_HARNESS_RET != 0 ]] ; then
|
||||||
exit $EXTRAS_RET
|
echo "A failure occurred during extra harnesses generation."
|
||||||
|
exit $EXTRAS_HARNESS_RET
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $EXTRAS_PARTS_RET != 0 ]] ; then
|
||||||
|
echo "A failure occurred during extra parts generation."
|
||||||
|
exit $EXTRAS_PARTS_RET
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If we get here, then all the fuzzers completed fine. Hence we are
|
# If we get here, then all the fuzzers completed fine. Hence we are
|
||||||
|
|
|
||||||
45
Makefile
45
Makefile
|
|
@ -118,7 +118,7 @@ db-check-$(1):
|
||||||
@echo
|
@echo
|
||||||
@echo "Checking $(1) database"
|
@echo "Checking $(1) database"
|
||||||
@echo "============================"
|
@echo "============================"
|
||||||
@$(IN_ENV) python3 utils/checkdb.py --db-root database/$(1)
|
@$(IN_ENV) python3 utils/checkdb.py
|
||||||
|
|
||||||
db-format-$(1):
|
db-format-$(1):
|
||||||
@echo
|
@echo
|
||||||
|
|
@ -139,16 +139,38 @@ $(foreach DB,$(DATABASES),$(eval $(call database,$(DB))))
|
||||||
|
|
||||||
.PHONY: db-extras-artix7 db-extras-kintex7 db-extras-zynq7
|
.PHONY: db-extras-artix7 db-extras-kintex7 db-extras-zynq7
|
||||||
|
|
||||||
db-extras-artix7:
|
# Targets related to Project X-Ray parts
|
||||||
+source minitests/roi_harness/basys3-swbut.sh && $(MAKE) -C fuzzers part_only
|
# --------------------------------------
|
||||||
+source minitests/roi_harness/arty-uart.sh && $(MAKE) -C fuzzers part_only
|
|
||||||
|
ARTIX_PARTS=artix200t
|
||||||
|
ZYNQ_PARTS=zynq020
|
||||||
|
KINTEX_PARTS=kintex70t
|
||||||
|
|
||||||
|
XRAY_PARTS=${ARTIX_PARTS} ${ZYNQ_PARTS} ${KINTEX_PARTS}
|
||||||
|
|
||||||
|
define multiple-parts
|
||||||
|
|
||||||
|
# $(1): PART to be used
|
||||||
|
|
||||||
|
db-part-only-$(1):
|
||||||
|
+source settings/$(1).sh && $$(MAKE) -C fuzzers part_only
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(foreach PART,$(XRAY_PARTS),$(eval $(call multiple-parts,$(PART))))
|
||||||
|
|
||||||
|
db-extras-artix7-parts: $(addprefix db-part-only-,$(ARTIX_PARTS))
|
||||||
|
|
||||||
|
db-extras-artix7-harness:
|
||||||
|
+source minitests/roi_harness/basys3-swbut.sh && $(MAKE) -C fuzzers roi_only
|
||||||
|
+source minitests/roi_harness/arty-uart.sh && $(MAKE) -C fuzzers roi_only
|
||||||
+source minitests/roi_harness/basys3-swbut.sh && \
|
+source minitests/roi_harness/basys3-swbut.sh && \
|
||||||
$(MAKE) -C minitests/roi_harness \
|
$(MAKE) -C minitests/roi_harness \
|
||||||
HARNESS_DIR=$(XRAY_DATABASE_DIR)/artix7/harness/basys3/swbut run copy
|
HARNESS_DIR=$(XRAY_DATABASE_DIR)/artix7/harness/basys3/swbut run copy
|
||||||
+source minitests/roi_harness/basys3-swbut.sh && \
|
+source minitests/roi_harness/basys3-swbut.sh && \
|
||||||
$(MAKE) -C minitests/roi_harness \
|
$(MAKE) -C minitests/roi_harness \
|
||||||
XRAY_ROIV=../roi_base_div2.v \
|
XRAY_ROIV=../roi_base_div2.v \
|
||||||
HARNESS_DIR=$(XRAY_DATABASE_DIR)/artix7/harness/basys3/swbut_50 run copy
|
HARNESS_DIR=$(XRAY_DATABASE_DIR)/artix7/harness/basys3/swbut_50 copy
|
||||||
+source minitests/roi_harness/arty-uart.sh && \
|
+source minitests/roi_harness/arty-uart.sh && \
|
||||||
$(MAKE) -C minitests/roi_harness \
|
$(MAKE) -C minitests/roi_harness \
|
||||||
HARNESS_DIR=$(XRAY_DATABASE_DIR)/artix7/harness/arty-a7/uart run copy
|
HARNESS_DIR=$(XRAY_DATABASE_DIR)/artix7/harness/arty-a7/uart run copy
|
||||||
|
|
@ -159,14 +181,19 @@ db-extras-artix7:
|
||||||
$(MAKE) -C minitests/roi_harness \
|
$(MAKE) -C minitests/roi_harness \
|
||||||
HARNESS_DIR=$(XRAY_DATABASE_DIR)/artix7/harness/arty-a7/swbut run copy
|
HARNESS_DIR=$(XRAY_DATABASE_DIR)/artix7/harness/arty-a7/swbut run copy
|
||||||
|
|
||||||
db-extras-kintex7:
|
db-extras-kintex7-parts:
|
||||||
@true
|
@true
|
||||||
|
|
||||||
db-extras-zynq7:
|
db-extras-kintex7-harness:
|
||||||
+source minitests/roi_harness/zybo-swbut.sh && $(MAKE) -C fuzzers part_only
|
@true
|
||||||
|
|
||||||
|
db-extras-zynq7-parts:
|
||||||
|
@true
|
||||||
|
|
||||||
|
db-extras-zynq7-harness:
|
||||||
+source minitests/roi_harness/zybo-swbut.sh && \
|
+source minitests/roi_harness/zybo-swbut.sh && \
|
||||||
$(MAKE) -C minitests/roi_harness \
|
$(MAKE) -C minitests/roi_harness \
|
||||||
HARNESS_DIR=$(XRAY_DATABASE_DIR)/zynq7/harness/zybo/swbut run
|
HARNESS_DIR=$(XRAY_DATABASE_DIR)/zynq7/harness/zybo/swbut run copy
|
||||||
|
|
||||||
db-check:
|
db-check:
|
||||||
@true
|
@true
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,10 @@ $(SPECIMENS): Makefile.specimen
|
||||||
$(MAKE) -C $@ -f ../../Makefile.specimen
|
$(MAKE) -C $@ -f ../../Makefile.specimen
|
||||||
|
|
||||||
pushdb:
|
pushdb:
|
||||||
cp build/part.yaml ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/${XRAY_PART}.yaml
|
mkdir -p ${XRAY_FAMILY_DIR}/${XRAY_PART}
|
||||||
cp build/part.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/${XRAY_PART}.json
|
cp build/part.json $(XRAY_FAMILY_DIR)/${XRAY_PART}/part.json
|
||||||
cp build/${XRAY_PART}_required_features.fasm ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/${XRAY_PART}_required_features.fasm 2>/dev/null || true
|
cp build/part.yaml $(XRAY_FAMILY_DIR)/${XRAY_PART}/part.yaml
|
||||||
|
cp build/${XRAY_PART}_required_features.fasm ${XRAY_FAMILY_DIR}/${XRAY_PART}/required_features.fasm 2>/dev/null || true
|
||||||
|
|
||||||
run:
|
run:
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
|
|
|
||||||
|
|
@ -37,93 +37,95 @@ else
|
||||||
TILEGRID_TDB_DEPENDENCIES += dsp_int/build/segbits_tilegrid.tdb
|
TILEGRID_TDB_DEPENDENCIES += dsp_int/build/segbits_tilegrid.tdb
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
BASICDB_TILEGRID=build/basicdb/${XRAY_PART}/tilegrid.json
|
||||||
|
|
||||||
database: build/tilegrid.json
|
database: build/tilegrid.json
|
||||||
|
|
||||||
pushdb: build/tilegrid.json
|
pushdb: build/tilegrid.json
|
||||||
cp build/tilegrid.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/tilegrid.json
|
cp build/tilegrid.json ${XRAY_FAMILY_DIR}/${XRAY_PART}/tilegrid.json
|
||||||
|
|
||||||
build/tiles/tiles.txt:
|
build/tiles/tiles.txt:
|
||||||
bash generate.sh build/tiles tiles
|
bash generate.sh build/tiles tiles
|
||||||
|
|
||||||
build/basicdb/tilegrid.json: generate.py build/tiles/tiles.txt
|
${BASICDB_TILEGRID}: generate.py build/tiles/tiles.txt
|
||||||
mkdir -p build/basicdb
|
mkdir -p build/basicdb/${XRAY_PART}
|
||||||
cd build && python3 ${FUZDIR}/generate.py \
|
cd build && python3 ${FUZDIR}/generate.py \
|
||||||
--tiles $(FUZDIR)/build/tiles/tiles.txt \
|
--tiles $(FUZDIR)/build/tiles/tiles.txt \
|
||||||
--pin_func $(FUZDIR)/build/tiles/pin_func.txt \
|
--pin_func $(FUZDIR)/build/tiles/pin_func.txt \
|
||||||
--out ${BUILD_DIR}/basicdb/tilegrid.json
|
--out ${BUILD_DIR}/basicdb/${XRAY_PART}/tilegrid.json
|
||||||
|
|
||||||
clb/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
clb/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd clb && $(MAKE)
|
cd clb && $(MAKE)
|
||||||
|
|
||||||
clb_int/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
clb_int/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd clb_int && $(MAKE)
|
cd clb_int && $(MAKE)
|
||||||
|
|
||||||
cfg/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
cfg/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd cfg && $(MAKE)
|
cd cfg && $(MAKE)
|
||||||
|
|
||||||
iob/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
iob/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd iob && $(MAKE)
|
cd iob && $(MAKE)
|
||||||
|
|
||||||
iob_int/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
iob_int/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd iob_int && $(MAKE)
|
cd iob_int && $(MAKE)
|
||||||
|
|
||||||
ioi/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
ioi/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd ioi && $(MAKE)
|
cd ioi && $(MAKE)
|
||||||
|
|
||||||
mmcm/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
mmcm/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd mmcm && $(MAKE)
|
cd mmcm && $(MAKE)
|
||||||
|
|
||||||
pll/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
pll/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd pll && $(MAKE)
|
cd pll && $(MAKE)
|
||||||
|
|
||||||
ps7_int/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
ps7_int/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd ps7_int && $(MAKE)
|
cd ps7_int && $(MAKE)
|
||||||
|
|
||||||
monitor/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
monitor/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd monitor && $(MAKE)
|
cd monitor && $(MAKE)
|
||||||
|
|
||||||
monitor_int/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
monitor_int/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd monitor_int && $(MAKE)
|
cd monitor_int && $(MAKE)
|
||||||
|
|
||||||
bram/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
bram/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd bram && $(MAKE)
|
cd bram && $(MAKE)
|
||||||
|
|
||||||
bram_block/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
bram_block/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd bram_block && $(MAKE)
|
cd bram_block && $(MAKE)
|
||||||
|
|
||||||
bram_int/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
bram_int/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd bram_int && $(MAKE)
|
cd bram_int && $(MAKE)
|
||||||
|
|
||||||
dsp/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
dsp/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd dsp && $(MAKE)
|
cd dsp && $(MAKE)
|
||||||
|
|
||||||
dsp_int/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
dsp_int/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd dsp_int && $(MAKE)
|
cd dsp_int && $(MAKE)
|
||||||
|
|
||||||
fifo_int/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
fifo_int/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd fifo_int && $(MAKE)
|
cd fifo_int && $(MAKE)
|
||||||
|
|
||||||
cfg_int/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
cfg_int/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd cfg_int && $(MAKE)
|
cd cfg_int && $(MAKE)
|
||||||
|
|
||||||
orphan_int_column/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
orphan_int_column/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd orphan_int_column && $(MAKE)
|
cd orphan_int_column && $(MAKE)
|
||||||
|
|
||||||
clk_hrow/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
clk_hrow/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd clk_hrow && $(MAKE)
|
cd clk_hrow && $(MAKE)
|
||||||
|
|
||||||
clk_bufg/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
clk_bufg/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd clk_bufg && $(MAKE)
|
cd clk_bufg && $(MAKE)
|
||||||
|
|
||||||
hclk_cmt/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
hclk_cmt/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd hclk_cmt && $(MAKE)
|
cd hclk_cmt && $(MAKE)
|
||||||
|
|
||||||
hclk_ioi/build/segbits_tilegrid.tdb: build/basicdb/tilegrid.json
|
hclk_ioi/build/segbits_tilegrid.tdb: ${BASICDB_TILEGRID}
|
||||||
cd hclk_ioi && $(MAKE)
|
cd hclk_ioi && $(MAKE)
|
||||||
|
|
||||||
build/tilegrid_tdb.json: add_tdb.py $(TILEGRID_TDB_DEPENDENCIES)
|
build/tilegrid_tdb.json: add_tdb.py $(TILEGRID_TDB_DEPENDENCIES)
|
||||||
python3 add_tdb.py \
|
python3 add_tdb.py \
|
||||||
--fn-in build/basicdb/tilegrid.json \
|
--fn-in ${BASICDB_TILEGRID} \
|
||||||
--fn-out build/tilegrid_tdb.json
|
--fn-out build/tilegrid_tdb.json
|
||||||
|
|
||||||
build/tilegrid.json: generate_full.py build/tilegrid_tdb.json
|
build/tilegrid.json: generate_full.py build/tilegrid_tdb.json
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,21 @@ Finally, generate.py calculates the segment word offsets based on known segment
|
||||||
This environment variable must be set with a valid ROI.
|
This environment variable must be set with a valid ROI.
|
||||||
See database for example values
|
See database for example values
|
||||||
|
|
||||||
|
### XRAY_EXCLUDE_ROI_TILEGRID
|
||||||
|
This environment variable must be set in case the part selected does not allow some tiles to be
|
||||||
|
locked.
|
||||||
|
|
||||||
|
Error example (when using the artix 200T part):
|
||||||
|
`ERROR: [Place 30-25] Component carry4_SLICE_X82Y249 has been locked to a prohibited site SLICE_X82Y249.`
|
||||||
|
|
||||||
|
To avoid this error, the `XRAY_EXCLUDE_ROI_TILEGRID` defines an ROI that is not taken into account
|
||||||
|
when building the tilegrid, therefore excluding the problematic un-lockable sites.
|
||||||
|
|
||||||
|
As the resulting output file, `tilegrid.json`, is going to be checked against the one produced in
|
||||||
|
the `074-dump_all` fuzzer, also the latter one needs to produce a reduced tilegrid, with the excluded
|
||||||
|
tiles specified with the environment variable.
|
||||||
|
|
||||||
|
|
||||||
### XRAY_ROI_FRAMES
|
### XRAY_ROI_FRAMES
|
||||||
This can be set to a specific value to speed up processing and reduce disk space
|
This can be set to a specific value to speed up processing and reduce disk space
|
||||||
If you don't know where your ROI is, just set to to include all values (0x00000000:0xfffffff)
|
If you don't know where your ROI is, just set to to include all values (0x00000000:0xfffffff)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_brams():
|
def gen_brams():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in grid.tiles():
|
for tile_name in grid.tiles():
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_dsps():
|
def gen_dsps():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_fifos():
|
def gen_fifos():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -395,15 +395,10 @@ def propagate_IOI_Y9(database, tiles_by_grid):
|
||||||
higher than the rest, just like for some of the SING tiles.
|
higher than the rest, just like for some of the SING tiles.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
arch = os.getenv('XRAY_DATABASE')
|
ioi_tiles = os.getenv('XRAY_IOI3_TILES')
|
||||||
if arch in 'artix7':
|
|
||||||
tiles = ['RIOI3_X43Y9', 'LIOI3_X0Y9']
|
assert ioi_tiles is not None, "XRAY_IOI3_TILES env variable not set"
|
||||||
elif arch in 'kintex7':
|
tiles = ioi_tiles.split(" ")
|
||||||
tiles = ['LIOI3_X0Y9']
|
|
||||||
elif arch in 'zynq7':
|
|
||||||
tiles = ['RIOI3_X31Y9']
|
|
||||||
else:
|
|
||||||
assert False, "Unsupported architecture"
|
|
||||||
|
|
||||||
for tile in tiles:
|
for tile in tiles:
|
||||||
prev_tile = tiles_by_grid[(
|
prev_tile = tiles_by_grid[(
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ source "$::env(FUZDIR)/util.tcl"
|
||||||
proc write_tiles_txt {} {
|
proc write_tiles_txt {} {
|
||||||
# Get all tiles, ie not just the selected LUTs
|
# Get all tiles, ie not just the selected LUTs
|
||||||
set tiles [get_tiles]
|
set tiles [get_tiles]
|
||||||
|
set not_allowed_sites [get_sites -of_objects [get_pblocks exclude_roi]]
|
||||||
|
|
||||||
# Write tiles.txt with site metadata
|
# Write tiles.txt with site metadata
|
||||||
set fp [open "tiles.txt" w]
|
set fp [open "tiles.txt" w]
|
||||||
|
|
@ -12,6 +13,23 @@ proc write_tiles_txt {} {
|
||||||
set grid_x [get_property GRID_POINT_X $tile]
|
set grid_x [get_property GRID_POINT_X $tile]
|
||||||
set grid_y [get_property GRID_POINT_Y $tile]
|
set grid_y [get_property GRID_POINT_Y $tile]
|
||||||
set sites [get_sites -quiet -of_objects $tile]
|
set sites [get_sites -quiet -of_objects $tile]
|
||||||
|
|
||||||
|
# There are some sites which are not allowed to be placed.
|
||||||
|
# This check excludes tiles in the EXCLUDE_ROI pblock
|
||||||
|
# be added to tilegrid.json
|
||||||
|
set skip_tile 0
|
||||||
|
foreach site $sites {
|
||||||
|
set res [lsearch $not_allowed_sites $site]
|
||||||
|
if { $res != -1 } {
|
||||||
|
set skip_tile 1
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $skip_tile == 1 } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
set typed_sites {}
|
set typed_sites {}
|
||||||
|
|
||||||
set clock_region "NA"
|
set clock_region "NA"
|
||||||
|
|
@ -41,7 +59,7 @@ proc write_tiles_txt {} {
|
||||||
|
|
||||||
proc run {} {
|
proc run {} {
|
||||||
# Generate grid of entire part
|
# Generate grid of entire part
|
||||||
make_project_roi XRAY_ROI_TILEGRID
|
make_project_roi XRAY_ROI_TILEGRID XRAY_EXCLUDE_ROI_TILEGRID
|
||||||
|
|
||||||
place_design
|
place_design
|
||||||
route_design
|
route_design
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
N ?= 5
|
N ?= 6
|
||||||
GENERATE_ARGS?="--oneval 1 --design params.csv --dword 5 --dframe 1C"
|
GENERATE_ARGS?="--oneval 1 --design params.csv --dword 5 --dframe 1C"
|
||||||
include ../fuzzaddr/common.mk
|
include ../fuzzaddr/common.mk
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
N ?= 5
|
N ?= 6
|
||||||
GENERATE_ARGS?="--oneval 1 --design params.csv --dword 0 --dframe 21"
|
GENERATE_ARGS?="--oneval 1 --design params.csv --dword 0 --dframe 21"
|
||||||
include ../fuzzaddr/common.mk
|
include ../fuzzaddr/common.mk
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ def gen_sites():
|
||||||
IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?)
|
IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?)
|
||||||
Focus on IOB33S to start
|
Focus on IOB33S to start
|
||||||
'''
|
'''
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ def gen_sites():
|
||||||
IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?)
|
IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?)
|
||||||
Focus on IOB33S to start
|
Focus on IOB33S to start
|
||||||
'''
|
'''
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
N ?= 5
|
N ?= 6
|
||||||
# Was expecting oneval 3, but bits might be inverted
|
# Was expecting oneval 3, but bits might be inverted
|
||||||
# FIXME: dword
|
# FIXME: dword
|
||||||
# Ex: 0002009D_029_15
|
# Ex: 0002009D_029_15
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
gridinfo = grid.gridinfo_at_tilename(tile_name)
|
gridinfo = grid.gridinfo_at_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,7 @@ module top();
|
||||||
|
|
||||||
int_tiles = []
|
int_tiles = []
|
||||||
|
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
params = {}
|
params = {}
|
||||||
for int_l_column, int_r_column in gen_orphan_ints(grid):
|
for int_l_column, int_r_column in gen_orphan_ints(grid):
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
N ?= 5
|
N ?= 6
|
||||||
GENERATE_ARGS?="--oneval 1 --design params.csv --dframe 1C --dword 23"
|
GENERATE_ARGS?="--oneval 1 --design params.csv --dframe 1C --dword 23"
|
||||||
include ../fuzzaddr/common.mk
|
include ../fuzzaddr/common.mk
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
gridinfo = grid.gridinfo_at_tilename(tile_name)
|
gridinfo = grid.gridinfo_at_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -138,10 +138,10 @@ proc assign_iobs {} {
|
||||||
|
|
||||||
proc make_project {} {
|
proc make_project {} {
|
||||||
# Generate .bit only over ROI
|
# Generate .bit only over ROI
|
||||||
make_project_roi XRAY_ROI_TILEGRID
|
make_project_roi XRAY_ROI_TILEGRID XRAY_EXCLUDE_ROI_TILEGRID
|
||||||
}
|
}
|
||||||
|
|
||||||
proc make_project_roi { roi_var } {
|
proc make_project_roi { roi_var exclude_roi_var } {
|
||||||
# 6 CMTs in our reference part
|
# 6 CMTs in our reference part
|
||||||
# What is the largest?
|
# What is the largest?
|
||||||
set n_di 16
|
set n_di 16
|
||||||
|
|
@ -160,6 +160,13 @@ proc make_project_roi { roi_var } {
|
||||||
resize_pblock [get_pblocks roi] -add "$roi"
|
resize_pblock [get_pblocks roi] -add "$roi"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create_pblock exclude_roi
|
||||||
|
add_cells_to_pblock [get_pblocks roi] [get_cells roi]
|
||||||
|
foreach roi "$::env($exclude_roi_var)" {
|
||||||
|
puts "ROI: $roi"
|
||||||
|
resize_pblock [get_pblocks exclude_roi] -add "$roi"
|
||||||
|
}
|
||||||
|
|
||||||
set_property CFGBVS VCCO [current_design]
|
set_property CFGBVS VCCO [current_design]
|
||||||
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
||||||
set_property BITSTREAM.GENERAL.PERFRAMECRC YES [current_design]
|
set_property BITSTREAM.GENERAL.PERFRAMECRC YES [current_design]
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ WRITE_MODES = ("WRITE_FIRST", "NO_CHANGE", "READ_FIRST")
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ def gen_sites():
|
||||||
IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?)
|
IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?)
|
||||||
Focus on IOB33S to start
|
Focus on IOB33S to start
|
||||||
'''
|
'''
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ def find_phasers_for_pll(grid, loc):
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ def gen_sites():
|
||||||
IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?)
|
IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?)
|
||||||
Focus on IOB33S to start
|
Focus on IOB33S to start
|
||||||
'''
|
'''
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
tile_list = []
|
tile_list = []
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ def gen_sites():
|
||||||
IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?)
|
IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?)
|
||||||
Focus on IOB33S to start
|
Focus on IOB33S to start
|
||||||
'''
|
'''
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ def read_site_to_cmt():
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
''' Return dict of ISERDES/OSERDES locations. '''
|
''' Return dict of ISERDES/OSERDES locations. '''
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
xy_fun = util.create_xy_fun('\S+')
|
xy_fun = util.create_xy_fun('\S+')
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ from prjxray.lut_maker import LutMaker
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
xy_fun = util.create_xy_fun('BUFR_')
|
xy_fun = util.create_xy_fun('BUFR_')
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
get_xy = util.create_xy_fun('BUFHCE_')
|
get_xy = util.create_xy_fun('BUFHCE_')
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ def eprint(*args, **kwargs):
|
||||||
|
|
||||||
|
|
||||||
def gen_sites(desired_site_type):
|
def gen_sites(desired_site_type):
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
|
|
@ -34,7 +34,7 @@ def gen_sites(desired_site_type):
|
||||||
|
|
||||||
|
|
||||||
def gen_bufhce_sites():
|
def gen_bufhce_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
@ -50,7 +50,7 @@ def gen_bufhce_sites():
|
||||||
|
|
||||||
|
|
||||||
def get_cmt_loc(cmt_tile_name):
|
def get_cmt_loc(cmt_tile_name):
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
return grid.loc_of_tilename(cmt_tile_name)
|
return grid.loc_of_tilename(cmt_tile_name)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ from prjxray.state_gen import StateGen
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
xy_fun = util.create_xy_fun('BUFGCTRL_')
|
xy_fun = util.create_xy_fun('BUFGCTRL_')
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
from prjxray.segmaker import Segmaker
|
from prjxray.segmaker import Segmaker
|
||||||
from prjxray.db import Database
|
from prjxray.db import Database
|
||||||
from prjxray.util import get_db_root
|
from prjxray.util import get_db_root, get_part
|
||||||
import re
|
import re
|
||||||
|
|
||||||
REBUF_GCLK = re.compile('^CLK_BUFG_REBUF_R_CK_GCLK([0-9]+)_BOT$')
|
REBUF_GCLK = re.compile('^CLK_BUFG_REBUF_R_CK_GCLK([0-9]+)_BOT$')
|
||||||
|
|
@ -17,8 +17,8 @@ def gclk_of_wire(wire):
|
||||||
|
|
||||||
|
|
||||||
class ClockColumn(object):
|
class ClockColumn(object):
|
||||||
def __init__(self, db_root):
|
def __init__(self, db_root, part):
|
||||||
db = Database(db_root)
|
db = Database(db_root, part)
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
tiles_in_gclk_columns = []
|
tiles_in_gclk_columns = []
|
||||||
|
|
@ -72,8 +72,9 @@ class ClockColumn(object):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
db_root = get_db_root()
|
db_root = get_db_root()
|
||||||
|
part = get_part()
|
||||||
|
|
||||||
clock_column = ClockColumn(db_root)
|
clock_column = ClockColumn(db_root, part)
|
||||||
|
|
||||||
segmk = Segmaker("design.bits")
|
segmk = Segmaker("design.bits")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ def get_xy(s):
|
||||||
|
|
||||||
|
|
||||||
def gen_sites(desired_site_type):
|
def gen_sites(desired_site_type):
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
|
|
@ -38,7 +38,7 @@ def gen_sites(desired_site_type):
|
||||||
|
|
||||||
|
|
||||||
def gen_bufhce_sites():
|
def gen_bufhce_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile_name in sorted(grid.tiles()):
|
for tile_name in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile_name)
|
loc = grid.loc_of_tilename(tile_name)
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ module top();
|
||||||
|
|
||||||
clock_sources = ClockSources()
|
clock_sources = ClockSources()
|
||||||
|
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
def gen_sites(desired_site_type):
|
def gen_sites(desired_site_type):
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ def main():
|
||||||
adv_clock_sources = ClockSources()
|
adv_clock_sources = ClockSources()
|
||||||
site_to_cmt = dict(read_site_to_cmt())
|
site_to_cmt = dict(read_site_to_cmt())
|
||||||
|
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
def gen_sites(desired_site_type):
|
def gen_sites(desired_site_type):
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ module top();
|
||||||
|
|
||||||
clock_sources = ClockSources()
|
clock_sources = ClockSources()
|
||||||
|
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
def gen_sites(desired_site_type):
|
def gen_sites(desired_site_type):
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ def main():
|
||||||
clock_region_limit = dict()
|
clock_region_limit = dict()
|
||||||
clock_region_serdes_location = dict()
|
clock_region_serdes_location = dict()
|
||||||
|
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
def gen_sites(desired_site_type):
|
def gen_sites(desired_site_type):
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ def main():
|
||||||
clock_region_limit = dict()
|
clock_region_limit = dict()
|
||||||
clock_region_serdes_location = dict()
|
clock_region_serdes_location = dict()
|
||||||
|
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
def gen_sites(desired_site_type):
|
def gen_sites(desired_site_type):
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ random.seed(int(os.getenv("SEED"), 16))
|
||||||
|
|
||||||
|
|
||||||
def gen_sites(lr):
|
def gen_sites(lr):
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
for tile_name in grid.tiles():
|
for tile_name in grid.tiles():
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ random.seed(int(os.getenv("SEED"), 16))
|
||||||
|
|
||||||
|
|
||||||
def bram_count():
|
def bram_count():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import shutil
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import signal
|
import signal
|
||||||
from multiprocessing import Pool
|
from multiprocessing import Pool, Lock
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
@ -11,7 +11,11 @@ import argparse
|
||||||
# stdout=DEVNULL in subprocess.check_call
|
# stdout=DEVNULL in subprocess.check_call
|
||||||
|
|
||||||
|
|
||||||
# Worker function called from threads
|
# Worker function called from threads.
|
||||||
|
# Once the worker completes the job, the temporary files
|
||||||
|
# get merged with the final outputs in a thread-safe way
|
||||||
|
# and deleted to save disk usage.
|
||||||
|
# To do so, a global Lock is provided at the Pool initialization.
|
||||||
def start_pips(argList):
|
def start_pips(argList):
|
||||||
blockID, start, stop, total = argList
|
blockID, start, stop, total = argList
|
||||||
print("Running instance :" + str(blockID) + " / " + str(total))
|
print("Running instance :" + str(blockID) + " / " + str(total))
|
||||||
|
|
@ -20,6 +24,25 @@ def start_pips(argList):
|
||||||
str(blockID) + " " + str(start) + " " + str(stop),
|
str(blockID) + " " + str(start) + " " + str(stop),
|
||||||
shell=True)
|
shell=True)
|
||||||
|
|
||||||
|
uphill_wires = "wires/uphill_wires_{}.txt".format(blockID)
|
||||||
|
downhill_wires = "wires/downhill_wires_{}.txt".format(blockID)
|
||||||
|
|
||||||
|
# Locking to write on final file and remove the temporary one
|
||||||
|
Lock.acquire()
|
||||||
|
with open("uphill_wires.txt", "a") as wfd:
|
||||||
|
f = uphill_wires
|
||||||
|
with open(f, "r") as fd:
|
||||||
|
shutil.copyfileobj(fd, wfd)
|
||||||
|
|
||||||
|
with open("downhill_wires.txt", "a") as wfd:
|
||||||
|
f = downhill_wires
|
||||||
|
with open(f, "r") as fd:
|
||||||
|
shutil.copyfileobj(fd, wfd)
|
||||||
|
Lock.release()
|
||||||
|
|
||||||
|
os.remove(uphill_wires)
|
||||||
|
os.remove(downhill_wires)
|
||||||
|
|
||||||
|
|
||||||
# Function called once to get the total numbers of pips to list
|
# Function called once to get the total numbers of pips to list
|
||||||
def get_nb_pips():
|
def get_nb_pips():
|
||||||
|
|
@ -31,6 +54,11 @@ def get_nb_pips():
|
||||||
return int(countfile.readline())
|
return int(countfile.readline())
|
||||||
|
|
||||||
|
|
||||||
|
def pool_init(lock):
|
||||||
|
global Lock
|
||||||
|
Lock = lock
|
||||||
|
|
||||||
|
|
||||||
def run_pool(itemcount, nbBlocks, blocksize, nbParBlock, workFunc):
|
def run_pool(itemcount, nbBlocks, blocksize, nbParBlock, workFunc):
|
||||||
# We handle the case of not integer multiple of pips
|
# We handle the case of not integer multiple of pips
|
||||||
intitemcount = blocksize * nbBlocks
|
intitemcount = blocksize * nbBlocks
|
||||||
|
|
@ -57,9 +85,12 @@ def run_pool(itemcount, nbBlocks, blocksize, nbParBlock, workFunc):
|
||||||
startI = chain(startI, [intitemcount])
|
startI = chain(startI, [intitemcount])
|
||||||
stopI = chain(stopI, [itemcount])
|
stopI = chain(stopI, [itemcount])
|
||||||
|
|
||||||
|
mpLock = Lock()
|
||||||
|
|
||||||
argList = zip(blockId, startI, stopI, totalBlock)
|
argList = zip(blockId, startI, stopI, totalBlock)
|
||||||
|
|
||||||
with Pool(processes=nbParBlock) as pool:
|
with Pool(processes=nbParBlock, initializer=pool_init,
|
||||||
|
initargs=(mpLock, )) as pool:
|
||||||
pool.map(workFunc, argList)
|
pool.map(workFunc, argList)
|
||||||
|
|
||||||
return nbBlocks
|
return nbBlocks
|
||||||
|
|
@ -116,20 +147,6 @@ def main(argv):
|
||||||
pipsFileCount = run_pool(
|
pipsFileCount = run_pool(
|
||||||
pipscount, nbPipsBlock, blockPipsSize, nbParBlock, start_pips)
|
pipscount, nbPipsBlock, blockPipsSize, nbParBlock, start_pips)
|
||||||
|
|
||||||
print("Generating final files")
|
|
||||||
|
|
||||||
with open("uphill_wires.txt", "w") as wfd:
|
|
||||||
for j in range(0, pipsFileCount):
|
|
||||||
f = "wires/uphill_wires_" + str(j) + ".txt"
|
|
||||||
with open(f, "r") as fd:
|
|
||||||
shutil.copyfileobj(fd, wfd)
|
|
||||||
|
|
||||||
with open("downhill_wires.txt", "w") as wed:
|
|
||||||
for j in range(0, pipsFileCount):
|
|
||||||
e = "wires/downhill_wires_" + str(j) + ".txt"
|
|
||||||
with open(e, "r") as ed:
|
|
||||||
shutil.copyfileobj(ed, wed)
|
|
||||||
|
|
||||||
print("Work done !")
|
print("Work done !")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@ database: $(SPECIMENS_OK)
|
||||||
true
|
true
|
||||||
|
|
||||||
pushdb:
|
pushdb:
|
||||||
cp build/output/tile_type_*.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
cp build/output/tile_type_*.json ${XRAY_FAMILY_DIR}/
|
||||||
rm ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/tile_type_*_site_type_*.json
|
rm ${XRAY_FAMILY_DIR}/tile_type_*_site_type_*.json
|
||||||
cp build/output/site_type_*.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
cp build/output/site_type_*.json ${XRAY_FAMILY_DIR}/
|
||||||
cp build/output/tileconn.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
cp build/output/tileconn.json ${XRAY_FAMILY_DIR}/$(XRAY_PART)/
|
||||||
|
|
||||||
$(SPECIMENS_OK):
|
$(SPECIMENS_OK):
|
||||||
bash generate.sh $(subst /OK,,$@) -p=$(MAX_VIVADO_PROCESS) -t=$(MAX_TILES_INSTANCE) -n=$(MAX_NODES_INSTANCE)
|
bash generate.sh $(subst /OK,,$@) -p=$(MAX_VIVADO_PROCESS) -t=$(MAX_TILES_INSTANCE) -n=$(MAX_NODES_INSTANCE)
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,4 @@ python3 create_node_tree.py \
|
||||||
--output_dir build/output
|
--output_dir build/output
|
||||||
python3 reduce_site_types.py --output_dir build/output
|
python3 reduce_site_types.py --output_dir build/output
|
||||||
python3 generate_grid.py --root_dir build/specimen_001/ --output_dir build/output \
|
python3 generate_grid.py --root_dir build/specimen_001/ --output_dir build/output \
|
||||||
--ignored_wires ${XRAY_DATABASE}_ignored_wires.txt
|
--ignored_wires ignored_wires/${XRAY_DATABASE}/${XRAY_PART}_ignored_wires.txt
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import argparse
|
import argparse
|
||||||
import prjxray.lib
|
|
||||||
import prjxray.util
|
|
||||||
import pyjson5 as json5
|
import pyjson5 as json5
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import progressbar
|
import progressbar
|
||||||
|
|
@ -14,6 +12,7 @@ import pickle
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from utils import xjson
|
from utils import xjson
|
||||||
|
from prjxray import util, lib
|
||||||
|
|
||||||
|
|
||||||
def get_tile_grid_info(fname):
|
def get_tile_grid_info(fname):
|
||||||
|
|
@ -563,7 +562,7 @@ def main():
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
tiles, nodes = prjxray.lib.read_root_csv(args.root_dir)
|
tiles, nodes = lib.read_root_csv(args.root_dir)
|
||||||
|
|
||||||
processes = min(multiprocessing.cpu_count(), 10)
|
processes = min(multiprocessing.cpu_count(), 10)
|
||||||
print('{} Running {} processes'.format(datetime.datetime.now(), processes))
|
print('{} Running {} processes'.format(datetime.datetime.now(), processes))
|
||||||
|
|
@ -575,7 +574,8 @@ def main():
|
||||||
wire_map_file = os.path.join(args.output_dir, 'wiremap.pickle')
|
wire_map_file = os.path.join(args.output_dir, 'wiremap.pickle')
|
||||||
|
|
||||||
print('{} Reading tilegrid'.format(datetime.datetime.now()))
|
print('{} Reading tilegrid'.format(datetime.datetime.now()))
|
||||||
with open(os.path.join(prjxray.util.get_db_root(), 'tilegrid.json')) as f:
|
with open(os.path.join(util.get_db_root(), util.get_part(),
|
||||||
|
'tilegrid.json')) as f:
|
||||||
grid = json.load(f)
|
grid = json.load(f)
|
||||||
|
|
||||||
if not args.verify_only:
|
if not args.verify_only:
|
||||||
|
|
@ -643,7 +643,7 @@ def main():
|
||||||
|
|
||||||
print('{} Verifing tileconn'.format(datetime.datetime.now()))
|
print('{} Verifing tileconn'.format(datetime.datetime.now()))
|
||||||
error_nodes = []
|
error_nodes = []
|
||||||
prjxray.lib.verify_nodes(
|
lib.verify_nodes(
|
||||||
[
|
[
|
||||||
(node['node'], tuple(wire['wire']
|
(node['node'], tuple(wire['wire']
|
||||||
for wire in node['wires']))
|
for wire in node['wires']))
|
||||||
|
|
@ -661,7 +661,7 @@ def main():
|
||||||
with open(ignored_wires_file) as f:
|
with open(ignored_wires_file) as f:
|
||||||
ignored_wires = set(l.strip() for l in f)
|
ignored_wires = set(l.strip() for l in f)
|
||||||
|
|
||||||
if not prjxray.lib.check_errors(error_nodes, ignored_wires):
|
if not lib.check_errors(error_nodes, ignored_wires):
|
||||||
print(
|
print(
|
||||||
'{} errors detected, see {} for details.'.format(
|
'{} errors detected, see {} for details.'.format(
|
||||||
len(error_nodes), error_nodes_file))
|
len(error_nodes), error_nodes_file))
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -13,10 +13,24 @@ set root_fp [open "root_node_${blocknb}.csv" w]
|
||||||
|
|
||||||
set nodes [get_nodes]
|
set nodes [get_nodes]
|
||||||
|
|
||||||
for {set j $start } { $j < $stop } { incr j } {
|
create_pblock exclude_roi
|
||||||
|
foreach roi "$::env(XRAY_EXCLUDE_ROI_TILEGRID)" {
|
||||||
|
puts "ROI: $roi"
|
||||||
|
resize_pblock [get_pblocks exclude_roi] -add "$roi"
|
||||||
|
}
|
||||||
|
|
||||||
|
set not_allowed_sites [get_sites -of_objects [get_pblocks exclude_roi]]
|
||||||
|
set not_allowed_nodes [get_nodes -of_objects [get_tiles -of_objects $not_allowed_sites]]
|
||||||
|
|
||||||
|
for {set j $start } { $j < $stop } { incr j } {
|
||||||
set node [lindex $nodes $j]
|
set node [lindex $nodes $j]
|
||||||
|
|
||||||
|
# If node is not allowed, skip it
|
||||||
|
set res [lsearch $not_allowed_nodes $node]
|
||||||
|
if { $res != -1 } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
file mkdir [file dirname "${node}"]
|
file mkdir [file dirname "${node}"]
|
||||||
set fname $node.json5
|
set fname $node.json5
|
||||||
puts $root_fp "node,,$fname"
|
puts $root_fp "node,,$fname"
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,16 @@ set root_fp [open "root_${blocknb}.csv" w]
|
||||||
#puts $root_fp "filetype,subtype,filename"
|
#puts $root_fp "filetype,subtype,filename"
|
||||||
|
|
||||||
set tiles [get_tiles]
|
set tiles [get_tiles]
|
||||||
|
|
||||||
|
create_pblock exclude_roi
|
||||||
|
foreach roi "$::env(XRAY_EXCLUDE_ROI_TILEGRID)" {
|
||||||
|
puts "ROI: $roi"
|
||||||
|
resize_pblock [get_pblocks exclude_roi] -add "$roi"
|
||||||
|
}
|
||||||
|
|
||||||
|
set not_allowed_sites [get_sites -of_objects [get_pblocks exclude_roi]]
|
||||||
|
set not_allowed_tiles [get_tiles -of_objects $not_allowed_sites]
|
||||||
|
|
||||||
# Convert DRIVE from ??? units to 10^(-3 to -6) Ohms
|
# Convert DRIVE from ??? units to 10^(-3 to -6) Ohms
|
||||||
set MAGIC 0.6875
|
set MAGIC 0.6875
|
||||||
|
|
||||||
|
|
@ -42,6 +52,12 @@ for {set j $start } { $j < $stop } { incr j } {
|
||||||
|
|
||||||
set tile [lindex $tiles $j]
|
set tile [lindex $tiles $j]
|
||||||
|
|
||||||
|
# If tile is not allowed, skip it
|
||||||
|
set res [lsearch $not_allowed_tiles $tile]
|
||||||
|
if { $res != -1 } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
set fname tile_$tile.json5
|
set fname tile_$tile.json5
|
||||||
set tile_type [get_property TYPE $tile]
|
set tile_type [get_property TYPE $tile]
|
||||||
puts $root_fp "tile,$tile_type,$fname"
|
puts $root_fp "tile,$tile_type,$fname"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
||||||
database: $(SPECIMENS_OK)
|
database: $(SPECIMENS_OK)
|
||||||
|
|
||||||
pushdb:
|
pushdb:
|
||||||
cp build/specimen_001/*_package_pins.csv ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
mkdir -p ${XRAY_FAMILY_DIR}/${XRAY_PART}/
|
||||||
|
cp build/specimen_001/*_package_pins.csv ${XRAY_FAMILY_DIR}/${XRAY_PART}/package_pins.csv
|
||||||
|
|
||||||
$(SPECIMENS_OK):
|
$(SPECIMENS_OK):
|
||||||
bash generate.sh $(subst /OK,,$@)
|
bash generate.sh $(subst /OK,,$@)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ from prjxray.db import Database
|
||||||
|
|
||||||
|
|
||||||
def gen_sites():
|
def gen_sites():
|
||||||
db = Database(util.get_db_root())
|
db = Database(util.get_db_root(), util.get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
for tile in sorted(grid.tiles()):
|
for tile in sorted(grid.tiles()):
|
||||||
loc = grid.loc_of_tilename(tile)
|
loc = grid.loc_of_tilename(tile)
|
||||||
|
|
|
||||||
|
|
@ -127,11 +127,52 @@ $(eval $(call fuzzer,100-dsp-mskpat,005-tilegrid))
|
||||||
quick:
|
quick:
|
||||||
$(MAKE) QUICK=Y
|
$(MAKE) QUICK=Y
|
||||||
|
|
||||||
# part_only runs the fuzzers required for supporting additional parts.
|
# Part only targets
|
||||||
# Note: In theory this includes 005-tilegrid, but there isn't support for
|
# -----------------
|
||||||
# multiple tilegrid's per family at this time.
|
|
||||||
part_only:
|
|
||||||
+$(MAKE) -C 001-part-yaml run
|
|
||||||
+$(MAKE) -C 075-pins run
|
|
||||||
|
|
||||||
.PHONY: all clean clean_fuzzers clean_logs quick part_only
|
$(addprefix ${XRAY_FAMILY_DIR}/${XRAY_PART}/part.,yaml json):
|
||||||
|
$(MAKE) -C 001-part-yaml run
|
||||||
|
|
||||||
|
${XRAY_FAMILY_DIR}/${XRAY_PART}/package_pins.csv:
|
||||||
|
$(MAKE) -C 075-pins run
|
||||||
|
|
||||||
|
${XRAY_FAMILY_DIR}/${XRAY_PART}/tilegrid.json:
|
||||||
|
$(MAKE) -C 005-tilegrid run
|
||||||
|
|
||||||
|
${XRAY_FAMILY_DIR}/${XRAY_PART}/tileconn.json:
|
||||||
|
$(MAKE) -C 072-ordered_wires run
|
||||||
|
$(MAKE) -C 073-get_counts run
|
||||||
|
$(MAKE) -C 074-dump_all run
|
||||||
|
|
||||||
|
part_only_yaml: $(addprefix ${XRAY_FAMILY_DIR}/${XRAY_PART}/part.,yaml json)
|
||||||
|
part_only_tilegrid: ${XRAY_FAMILY_DIR}/${XRAY_PART}/tilegrid.json
|
||||||
|
part_only_tileconn: ${XRAY_FAMILY_DIR}/${XRAY_PART}/tileconn.json
|
||||||
|
part_only_pins: ${XRAY_FAMILY_DIR}/${XRAY_PART}/package_pins.csv
|
||||||
|
|
||||||
|
# part_only runs the fuzzers required to support additional parts
|
||||||
|
part_only:
|
||||||
|
# Create PART-specific directory
|
||||||
|
mkdir -p ${XRAY_FAMILY_DIR}/${XRAY_PART}
|
||||||
|
# Generate YAML
|
||||||
|
+$(MAKE) part_only_yaml
|
||||||
|
# Generate Tile grid
|
||||||
|
+$(MAKE) part_only_tilegrid
|
||||||
|
# Generate Tile connections
|
||||||
|
+$(MAKE) part_only_tileconn
|
||||||
|
# Generate package pins
|
||||||
|
+$(MAKE) part_only_pins
|
||||||
|
|
||||||
|
# roi_only runs the fuzzers required for supporting additional parts when building
|
||||||
|
# a roi harness.
|
||||||
|
roi_only:
|
||||||
|
# Create PART-specific directory
|
||||||
|
mkdir -p ${XRAY_FAMILY_DIR}/${XRAY_PART}
|
||||||
|
# Generate YAML
|
||||||
|
+$(MAKE) part_only_yaml
|
||||||
|
# Generate package pins
|
||||||
|
+$(MAKE) part_only_pins
|
||||||
|
# Copy tilegrid and tileconn
|
||||||
|
cp ${XRAY_FAMILY_DIR}/${XRAY_EQUIV_PART}/tilegrid.json ${XRAY_FAMILY_DIR}/${XRAY_PART}/tilegrid.json
|
||||||
|
cp ${XRAY_FAMILY_DIR}/${XRAY_EQUIV_PART}/tileconn.json ${XRAY_FAMILY_DIR}/${XRAY_PART}/tileconn.json
|
||||||
|
|
||||||
|
.PHONY: all clean clean_fuzzers clean_logs quick part_only roi_only
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
# XC7A35TICSG324-1L
|
# XC7A35TICSG324-1L
|
||||||
export XRAY_PART=xc7a35tcsg324-1
|
export XRAY_PART=xc7a35tcsg324-1
|
||||||
|
export XRAY_EQUIV_PART=xc7a50tfgg484-1
|
||||||
|
|
||||||
if [ -z "$XRAY_PINCFG" ]; then
|
if [ -z "$XRAY_PINCFG" ]; then
|
||||||
echo "XRAY_PINCFG not set"
|
echo "XRAY_PINCFG not set"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
# XC7A35T-1CPG236C
|
# XC7A35T-1CPG236C
|
||||||
export XRAY_PART=xc7a35tcpg236-1
|
export XRAY_PART=xc7a35tcpg236-1
|
||||||
|
export XRAY_EQUIV_PART=xc7a50tfgg484-1
|
||||||
if [ -z "$XRAY_PINCFG" ]; then
|
if [ -z "$XRAY_PINCFG" ]; then
|
||||||
echo "XRAY_PINCFG not set"
|
echo "XRAY_PINCFG not set"
|
||||||
return 1
|
return 1
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import sys
|
||||||
import fasm
|
import fasm
|
||||||
from prjxray.db import Database
|
from prjxray.db import Database
|
||||||
from prjxray.roi import Roi
|
from prjxray.roi import Roi
|
||||||
from prjxray.util import get_db_root
|
from prjxray.util import get_db_root, get_part
|
||||||
|
|
||||||
|
|
||||||
def set_port_wires(ports, name, pin, wires_outside_roi):
|
def set_port_wires(ports, name, pin, wires_outside_roi):
|
||||||
|
|
@ -42,7 +42,7 @@ def main():
|
||||||
|
|
||||||
design_json['info'][name] = int(value)
|
design_json['info'][name] = int(value)
|
||||||
|
|
||||||
db = Database(get_db_root())
|
db = Database(get_db_root(), get_part())
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
roi = Roi(
|
roi = Roi(
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ make pushdb
|
||||||
popd
|
popd
|
||||||
popd
|
popd
|
||||||
EOF
|
EOF
|
||||||
stat ${XRAY_DIR}/database/${XRAY_DATABASE}/${XRAY_PART}.yaml >/dev/null
|
stat ${XRAY_PART_YAML} >/dev/null
|
||||||
|
|
||||||
# 6x by 18y CLBs (108)
|
# 6x by 18y CLBs (108)
|
||||||
if [ "$SMALL" = Y ] ; then
|
if [ "$SMALL" = Y ] ; then
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
# XC7010-1CLG400C
|
# XC7010-1CLG400C
|
||||||
export XRAY_PART=xc7z010clg400-1
|
export XRAY_PART=xc7z010clg400-1
|
||||||
|
export XRAY_EQUIV_PART=xc7z010clg400-1
|
||||||
|
|
||||||
if [ -z "$XRAY_PINCFG" ]; then
|
if [ -z "$XRAY_PINCFG" ]; then
|
||||||
echo "XRAY_PINCFG not set"
|
echo "XRAY_PINCFG not set"
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@ build/$(2)_$(1)/timing_$(2)_$(1).json5: build/.touch runme.tcl $(3)
|
||||||
build/timing_$(2)_$(1).xlsx: build/$(2)_$(1)/timing_$(2)_$(1).json create_timing_worksheet_db.py
|
build/timing_$(2)_$(1).xlsx: build/$(2)_$(1)/timing_$(2)_$(1).json create_timing_worksheet_db.py
|
||||||
python3 create_timing_worksheet_db.py \
|
python3 create_timing_worksheet_db.py \
|
||||||
--timing_json build/$(2)_$(1)/timing_$(2)_$(1).json \
|
--timing_json build/$(2)_$(1)/timing_$(2)_$(1).json \
|
||||||
--db_root ${XRAY_DATABASE_DIR}/${XRAY_DATABASE} \
|
--db_root ${XRAY_FAMILY_DIR} \
|
||||||
|
--part ${XRAY_PART} \
|
||||||
--output_xlsx build/timing_$(2)_$(1).xlsx
|
--output_xlsx build/timing_$(2)_$(1).xlsx
|
||||||
|
|
||||||
build/$(2)_$(1)/design_$(2)_$(1).fasm: build/$(2)_$(1)/timing_$(2)_$(1).json
|
build/$(2)_$(1)/design_$(2)_$(1).fasm: build/$(2)_$(1)/timing_$(2)_$(1).json
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ from prjxray.timing import Outpin, Inpin, Wire, Buffer, \
|
||||||
PassTransistor, IntristicDelay, RcElement, PvtCorner
|
PassTransistor, IntristicDelay, RcElement, PvtCorner
|
||||||
from prjxray.math_models import ExcelMathModel
|
from prjxray.math_models import ExcelMathModel
|
||||||
from prjxray.db import Database
|
from prjxray.db import Database
|
||||||
|
from prjxray import util
|
||||||
|
|
||||||
FAST = PvtCorner.FAST
|
FAST = PvtCorner.FAST
|
||||||
SLOW = PvtCorner.SLOW
|
SLOW = PvtCorner.SLOW
|
||||||
|
|
@ -443,8 +444,9 @@ def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Create timing worksheet for 7-series timing analysis.")
|
description="Create timing worksheet for 7-series timing analysis.")
|
||||||
|
|
||||||
|
util.db_root_arg(parser)
|
||||||
|
util.part_arg(parser)
|
||||||
parser.add_argument('--timing_json', required=True)
|
parser.add_argument('--timing_json', required=True)
|
||||||
parser.add_argument('--db_root', required=True)
|
|
||||||
parser.add_argument('--output_xlsx', required=True)
|
parser.add_argument('--output_xlsx', required=True)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
@ -452,7 +454,7 @@ def main():
|
||||||
with open(args.timing_json) as f:
|
with open(args.timing_json) as f:
|
||||||
timing = json.load(f)
|
timing = json.load(f)
|
||||||
|
|
||||||
db = Database(args.db_root)
|
db = Database(args.db_root, args.part)
|
||||||
|
|
||||||
nodes = {}
|
nodes = {}
|
||||||
for net in timing:
|
for net in timing:
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ def get_available_databases(prjxray_root):
|
||||||
|
|
||||||
|
|
||||||
class Database(object):
|
class Database(object):
|
||||||
def __init__(self, db_root):
|
def __init__(self, db_root, part):
|
||||||
""" Create project x-ray Database at given db_root.
|
""" Create project x-ray Database at given db_root.
|
||||||
|
|
||||||
db_root: Path to directory containing settings.sh, *.db, tilegrid.json and
|
db_root: Path to directory containing settings.sh, *.db, tilegrid.json and
|
||||||
|
|
@ -33,6 +33,7 @@ class Database(object):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.db_root = db_root
|
self.db_root = db_root
|
||||||
|
self.part = part
|
||||||
# tilegrid.json JSON object
|
# tilegrid.json JSON object
|
||||||
self.tilegrid = None
|
self.tilegrid = None
|
||||||
self.tileconn = None
|
self.tileconn = None
|
||||||
|
|
@ -87,17 +88,17 @@ class Database(object):
|
||||||
|
|
||||||
self.site_types[site_type_name] = os.path.join(self.db_root, f)
|
self.site_types[site_type_name] = os.path.join(self.db_root, f)
|
||||||
|
|
||||||
if f.endswith('_required_features.fasm'):
|
required_features_path = os.path.join(
|
||||||
part = f[:-len('_required_features.fasm')]
|
self.db_root, self.part, "required_features.fasm")
|
||||||
|
if os.path.isfile(required_features_path):
|
||||||
|
with open(required_features_path, "r") as fp:
|
||||||
|
features = []
|
||||||
|
for line in fp:
|
||||||
|
line = line.strip()
|
||||||
|
if len(line) > 0:
|
||||||
|
features.append(line)
|
||||||
|
|
||||||
with open(os.path.join(self.db_root, f), "r") as fp:
|
self.required_features[self.part] = set(features)
|
||||||
features = []
|
|
||||||
for line in fp:
|
|
||||||
line = line.strip()
|
|
||||||
if len(line) > 0:
|
|
||||||
features.append(line)
|
|
||||||
|
|
||||||
self.required_features[part] = set(features)
|
|
||||||
|
|
||||||
self.tile_types_obj = {}
|
self.tile_types_obj = {}
|
||||||
|
|
||||||
|
|
@ -116,13 +117,15 @@ class Database(object):
|
||||||
def _read_tilegrid(self):
|
def _read_tilegrid(self):
|
||||||
""" Read tilegrid database if not already read. """
|
""" Read tilegrid database if not already read. """
|
||||||
if not self.tilegrid:
|
if not self.tilegrid:
|
||||||
with open(os.path.join(self.db_root, 'tilegrid.json')) as f:
|
with open(os.path.join(self.db_root, self.part,
|
||||||
|
'tilegrid.json')) as f:
|
||||||
self.tilegrid = json.load(f)
|
self.tilegrid = json.load(f)
|
||||||
|
|
||||||
def _read_tileconn(self):
|
def _read_tileconn(self):
|
||||||
""" Read tileconn database if not already read. """
|
""" Read tileconn database if not already read. """
|
||||||
if not self.tileconn:
|
if not self.tileconn:
|
||||||
with open(os.path.join(self.db_root, 'tileconn.json')) as f:
|
with open(os.path.join(self.db_root, self.part,
|
||||||
|
'tileconn.json')) as f:
|
||||||
self.tileconn = json.load(f)
|
self.tileconn = json.load(f)
|
||||||
|
|
||||||
def grid(self):
|
def grid(self):
|
||||||
|
|
|
||||||
|
|
@ -824,7 +824,8 @@ def main():
|
||||||
|
|
||||||
# Build (baseaddr, offset) -> tile name map
|
# Build (baseaddr, offset) -> tile name map
|
||||||
database_dir = os.path.join(
|
database_dir = os.path.join(
|
||||||
os.getenv("XRAY_DATABASE_DIR"), os.getenv("XRAY_DATABASE"))
|
os.getenv("XRAY_DATABASE_DIR"), os.getenv("XRAY_DATABASE"),
|
||||||
|
os.getenv("XRAY_PART"))
|
||||||
tilegrid_file = os.path.join(database_dir, "tilegrid.json")
|
tilegrid_file = os.path.join(database_dir, "tilegrid.json")
|
||||||
address_map = build_address_map(tilegrid_file)
|
address_map = build_address_map(tilegrid_file)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,11 +72,16 @@ def add_site_group_zero(segmk, site, prefix, vals, zero_val, val):
|
||||||
|
|
||||||
|
|
||||||
class Segmaker:
|
class Segmaker:
|
||||||
def __init__(self, bitsfile, verbose=None, db_root=None):
|
def __init__(self, bitsfile, verbose=None, db_root=None, part=None):
|
||||||
self.db_root = db_root
|
self.db_root = db_root
|
||||||
if self.db_root is None:
|
if self.db_root is None:
|
||||||
self.db_root = util.get_db_root()
|
self.db_root = util.get_db_root()
|
||||||
|
|
||||||
|
self.part = part
|
||||||
|
if self.part is None:
|
||||||
|
self.part = util.get_part()
|
||||||
|
assert self.part, "No part specified."
|
||||||
|
|
||||||
self.verbose = verbose if verbose is not None else os.getenv(
|
self.verbose = verbose if verbose is not None else os.getenv(
|
||||||
'VERBOSE', 'N') == 'Y'
|
'VERBOSE', 'N') == 'Y'
|
||||||
self.load_grid()
|
self.load_grid()
|
||||||
|
|
@ -113,7 +118,8 @@ class Segmaker:
|
||||||
|
|
||||||
def load_grid(self):
|
def load_grid(self):
|
||||||
'''Load self.grid holding tile addresses'''
|
'''Load self.grid holding tile addresses'''
|
||||||
with open(os.path.join(self.db_root, "tilegrid.json"), "r") as f:
|
with open(os.path.join(self.db_root, self.part, "tilegrid.json"),
|
||||||
|
"r") as f:
|
||||||
self.grid = json.load(f)
|
self.grid = json.load(f)
|
||||||
assert "segments" not in self.grid, "Old format tilegrid.json"
|
assert "segments" not in self.grid, "Old format tilegrid.json"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,12 @@ def get_db_root():
|
||||||
os.getenv("XRAY_DATABASE_DIR"), os.getenv("XRAY_DATABASE"))
|
os.getenv("XRAY_DATABASE_DIR"), os.getenv("XRAY_DATABASE"))
|
||||||
|
|
||||||
|
|
||||||
|
def get_part():
|
||||||
|
ret = os.getenv("XRAY_PART", None)
|
||||||
|
|
||||||
|
return ret
|
||||||
|
|
||||||
|
|
||||||
def roi_xy():
|
def roi_xy():
|
||||||
x1 = int(os.getenv('XRAY_ROI_GRID_X1', 0))
|
x1 = int(os.getenv('XRAY_ROI_GRID_X1', 0))
|
||||||
x2 = int(os.getenv('XRAY_ROI_GRID_X2', 58))
|
x2 = int(os.getenv('XRAY_ROI_GRID_X2', 58))
|
||||||
|
|
@ -73,7 +79,7 @@ def slice_xy():
|
||||||
def get_roi():
|
def get_roi():
|
||||||
from .db import Database
|
from .db import Database
|
||||||
(x1, x2), (y1, y2) = roi_xy()
|
(x1, x2), (y1, y2) = roi_xy()
|
||||||
db = Database(get_db_root())
|
db = Database(get_db_root(), get_part())
|
||||||
return Roi(db=db, x1=x1, x2=x2, y1=y1, y2=y2)
|
return Roi(db=db, x1=x1, x2=x2, y1=y1, y2=y2)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -115,6 +121,20 @@ def db_root_arg(parser):
|
||||||
parser.add_argument('--db-root', help="Database root.", **db_root_kwargs)
|
parser.add_argument('--db-root', help="Database root.", **db_root_kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
def part_arg(parser):
|
||||||
|
part = os.getenv("XRAY_PART")
|
||||||
|
part_kwargs = {}
|
||||||
|
if part is None:
|
||||||
|
part_kwargs['required'] = True
|
||||||
|
else:
|
||||||
|
part_kwargs['required'] = False
|
||||||
|
part_kwargs['default'] = part
|
||||||
|
parser.add_argument(
|
||||||
|
'--part',
|
||||||
|
help="Part name. When not given defaults to XRAY_PART env. var.",
|
||||||
|
**part_kwargs)
|
||||||
|
|
||||||
|
|
||||||
def parse_db_line(line):
|
def parse_db_line(line):
|
||||||
'''Return tag name, bit values (if any), mode (if any)'''
|
'''Return tag name, bit values (if any), mode (if any)'''
|
||||||
parts = line.split()
|
parts = line.split()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
export XRAY_DATABASE="artix7"
|
||||||
|
export XRAY_PART="xc7a200tffg1156-1"
|
||||||
|
export XRAY_ROI_FRAMES="0x00000000:0xffffffff"
|
||||||
|
|
||||||
|
# All CLB's in part, all BRAM's in part, all DSP's in part.
|
||||||
|
# tcl queries IOB => don't bother adding
|
||||||
|
export XRAY_ROI_TILEGRID="SLICE_X0Y0:SLICE_X163Y249 RAMB18_X0Y0:RAMB18_X8Y99 RAMB36_X0Y0:RAMB36_X8Y49 DSP48_X0Y0:DSP48_X8Y99 IOB_X0Y0:IOB_X1Y249"
|
||||||
|
|
||||||
|
export XRAY_EXCLUDE_ROI_TILEGRID="SLICE_X82Y200:SLICE_X83Y249 SLICE_X82Y0:SLICE_X83Y49"
|
||||||
|
|
||||||
|
export XRAY_IOI3_TILES="RIOI3_X105Y9 LIOI3_X0Y9"
|
||||||
|
|
||||||
|
export XRAY_PIN_00="R26"
|
||||||
|
export XRAY_PIN_01="P26"
|
||||||
|
export XRAY_PIN_02="N26"
|
||||||
|
export XRAY_PIN_03="M27"
|
||||||
|
export XRAY_PIN_04="U25"
|
||||||
|
export XRAY_PIN_05="T25"
|
||||||
|
export XRAY_PIN_06="P24"
|
||||||
|
|
||||||
|
source $(dirname ${BASH_SOURCE[0]})/../utils/environment.sh
|
||||||
|
|
@ -6,6 +6,10 @@ export XRAY_ROI_FRAMES="0x00000000:0xffffffff"
|
||||||
# tcl queries IOB => don't bother adding
|
# tcl queries IOB => don't bother adding
|
||||||
export XRAY_ROI_TILEGRID="SLICE_X0Y0:SLICE_X65Y99 SLICE_X0Y100:SLICE_X57Y149 RAMB18_X0Y0:RAMB18_X1Y59 RAMB36_X0Y0:RAMB36_X1Y29 RAMB18_X2Y0:RAMB18_X2Y39 RAMB36_X2Y0:RAMB36_X2Y19 DSP48_X0Y0:DSP48_X1Y59"
|
export XRAY_ROI_TILEGRID="SLICE_X0Y0:SLICE_X65Y99 SLICE_X0Y100:SLICE_X57Y149 RAMB18_X0Y0:RAMB18_X1Y59 RAMB36_X0Y0:RAMB36_X1Y29 RAMB18_X2Y0:RAMB18_X2Y39 RAMB36_X2Y0:RAMB36_X2Y19 DSP48_X0Y0:DSP48_X1Y59"
|
||||||
|
|
||||||
|
export XRAY_EXCLUDE_ROI_TILEGRID=""
|
||||||
|
|
||||||
|
export XRAY_IOI3_TILES="LIOI3_X0Y9 RIOI3_X43Y9"
|
||||||
|
|
||||||
# These settings must remain in sync
|
# These settings must remain in sync
|
||||||
export XRAY_ROI="SLICE_X0Y100:SLICE_X35Y149 RAMB18_X0Y40:RAMB18_X0Y59 RAMB36_X0Y20:RAMB36_X0Y29 DSP48_X0Y40:DSP48_X0Y59 IOB_X0Y100:IOB_X0Y149"
|
export XRAY_ROI="SLICE_X0Y100:SLICE_X35Y149 RAMB18_X0Y40:RAMB18_X0Y59 RAMB36_X0Y20:RAMB36_X0Y29 DSP48_X0Y40:DSP48_X0Y59 IOB_X0Y100:IOB_X0Y149"
|
||||||
# Most of CMT X0Y2.
|
# Most of CMT X0Y2.
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ export XRAY_ROI_FRAMES="0x00000000:0xffffffff"
|
||||||
# FIXME: make entire part
|
# FIXME: make entire part
|
||||||
export XRAY_ROI_TILEGRID="SLICE_X0Y50:SLICE_X19Y99 DSP48_X0Y20:DSP48_X0Y39 RAMB18_X0Y20:RAMB18_X0Y39 RAMB36_X0Y10:RAMB36_X0Y19"
|
export XRAY_ROI_TILEGRID="SLICE_X0Y50:SLICE_X19Y99 DSP48_X0Y20:DSP48_X0Y39 RAMB18_X0Y20:RAMB18_X0Y39 RAMB36_X0Y10:RAMB36_X0Y19"
|
||||||
|
|
||||||
|
export XRAY_EXCLUDE_ROI_TILEGRID=""
|
||||||
|
|
||||||
|
export XRAY_IOI3_TILES="LIOI3_X0Y9"
|
||||||
|
|
||||||
# These settings must remain in sync
|
# These settings must remain in sync
|
||||||
export XRAY_ROI="SLICE_X0Y50:SLICE_X19Y99 DSP48_X0Y20:DSP48_X0Y39 RAMB18_X0Y20:RAMB18_X0Y39 RAMB36_X0Y10:RAMB36_X0Y19 IOB_X0Y50:IOB_X0Y99"
|
export XRAY_ROI="SLICE_X0Y50:SLICE_X19Y99 DSP48_X0Y20:DSP48_X0Y39 RAMB18_X0Y20:RAMB18_X0Y39 RAMB36_X0Y10:RAMB36_X0Y19 IOB_X0Y50:IOB_X0Y99"
|
||||||
# Part of CMT X0Y1
|
# Part of CMT X0Y1
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ export XRAY_ROI_FRAMES="0x00000000:0xffffffff"
|
||||||
# All CLB's in part, all BRAM's in part, all DSP's in part.
|
# All CLB's in part, all BRAM's in part, all DSP's in part.
|
||||||
export XRAY_ROI_TILEGRID="SLICE_X0Y0:SLICE_X43Y99 RAMB18_X0Y0:RAMB18_X2Y39 RAMB36_X0Y0:RAMB36_X2Y19 DSP48_X0Y0:DSP48_X1Y39"
|
export XRAY_ROI_TILEGRID="SLICE_X0Y0:SLICE_X43Y99 RAMB18_X0Y0:RAMB18_X2Y39 RAMB36_X0Y0:RAMB36_X2Y19 DSP48_X0Y0:DSP48_X1Y39"
|
||||||
|
|
||||||
|
export XRAY_EXCLUDE_ROI_TILEGRID=""
|
||||||
|
|
||||||
|
export XRAY_IOI3_TILES="RIOI3_X31Y9"
|
||||||
|
|
||||||
# These settings must remain in sync
|
# These settings must remain in sync
|
||||||
export XRAY_ROI="SLICE_X00Y50:SLICE_X43Y99 RAMB18_X0Y20:RAMB18_X2Y39 RAMB36_X0Y10:RAMB36_X2Y19 IOB_X0Y50:IOB_X0Y99"
|
export XRAY_ROI="SLICE_X00Y50:SLICE_X43Y99 RAMB18_X0Y20:RAMB18_X2Y39 RAMB36_X0Y10:RAMB36_X2Y19 IOB_X0Y50:IOB_X0Y99"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ from unittest import TestCase, main
|
||||||
# in the current subdirectory, which will be a temporary one, to allow concurent
|
# in the current subdirectory, which will be a temporary one, to allow concurent
|
||||||
# testing.
|
# testing.
|
||||||
environ['XRAY_DATABASE_ROOT'] = '.'
|
environ['XRAY_DATABASE_ROOT'] = '.'
|
||||||
|
environ['XRAY_PART'] = './'
|
||||||
|
|
||||||
from prjxray.util import get_roi
|
from prjxray.util import get_roi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ def bit_to_bits(bitread, part_yaml, bit_file, bits_file, frame_range=None):
|
||||||
shell=True)
|
shell=True)
|
||||||
|
|
||||||
|
|
||||||
def bits_to_fasm(db_root, bits_file, verbose, canonical):
|
def bits_to_fasm(db_root, part, bits_file, verbose, canonical):
|
||||||
db = Database(db_root)
|
db = Database(db_root, part)
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
disassembler = fasm_disassembler.FasmDisassembler(db)
|
disassembler = fasm_disassembler.FasmDisassembler(db)
|
||||||
|
|
||||||
|
|
@ -102,14 +102,15 @@ def main():
|
||||||
|
|
||||||
bit_to_bits(
|
bit_to_bits(
|
||||||
bitread=args.bitread,
|
bitread=args.bitread,
|
||||||
part_yaml=os.path.join(args.db_root, '{}.yaml'.format(args.part)),
|
part_yaml=os.path.join(args.db_root, args.part, "part.yaml"),
|
||||||
bit_file=args.bit_file,
|
bit_file=args.bit_file,
|
||||||
bits_file=bits_file.name,
|
bits_file=bits_file.name,
|
||||||
frame_range=args.frame_range,
|
frame_range=args.frame_range,
|
||||||
)
|
)
|
||||||
|
|
||||||
bits_to_fasm(
|
bits_to_fasm(
|
||||||
args.db_root, bits_file.name, args.verbose, args.canonical)
|
args.db_root, args.part, bits_file.name, args.verbose,
|
||||||
|
args.canonical)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
|
|
@ -142,13 +142,13 @@ def check_tile_overlap(db, verbose=False):
|
||||||
print("Checked %s tiles, %s bits" % (tiles_checked, len(mall)))
|
print("Checked %s tiles, %s bits" % (tiles_checked, len(mall)))
|
||||||
|
|
||||||
|
|
||||||
def run(db_root, verbose=False):
|
def run(db_root, part, verbose=False):
|
||||||
# Start by running a basic check on db files
|
# Start by running a basic check on db files
|
||||||
print("Checking individual .db...")
|
print("Checking individual .db...")
|
||||||
parsedb_all(db_root, verbose=verbose)
|
parsedb_all(db_root, verbose=verbose)
|
||||||
|
|
||||||
# Now load and verify tile consistency
|
# Now load and verify tile consistency
|
||||||
db = prjxraydb.Database(db_root)
|
db = prjxraydb.Database(db_root, part)
|
||||||
db._read_tilegrid()
|
db._read_tilegrid()
|
||||||
'''
|
'''
|
||||||
these don't load properly without .json files
|
these don't load properly without .json files
|
||||||
|
|
@ -170,10 +170,11 @@ def main():
|
||||||
description="Parse a db repository, checking for consistency")
|
description="Parse a db repository, checking for consistency")
|
||||||
|
|
||||||
util.db_root_arg(parser)
|
util.db_root_arg(parser)
|
||||||
|
util.part_arg(parser)
|
||||||
parser.add_argument('--verbose', action='store_true', help='')
|
parser.add_argument('--verbose', action='store_true', help='')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
run(args.db_root, verbose=args.verbose)
|
run(args.db_root, args.part, verbose=args.verbose)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,14 @@ export XRAY_DIR="$( dirname "$XRAY_UTILS_DIR" )"
|
||||||
export XRAY_DATABASE_DIR="${XRAY_DIR}/database"
|
export XRAY_DATABASE_DIR="${XRAY_DIR}/database"
|
||||||
export XRAY_TOOLS_DIR="${XRAY_DIR}/build/tools"
|
export XRAY_TOOLS_DIR="${XRAY_DIR}/build/tools"
|
||||||
export XRAY_FUZZERS_DIR="${XRAY_DIR}/fuzzers"
|
export XRAY_FUZZERS_DIR="${XRAY_DIR}/fuzzers"
|
||||||
|
export XRAY_FAMILY_DIR="${XRAY_DATABASE_DIR}/${XRAY_DATABASE}"
|
||||||
|
|
||||||
if [ -e "${XRAY_DIR}/env/bin/activate" ]; then
|
if [ -e "${XRAY_DIR}/env/bin/activate" ]; then
|
||||||
source "${XRAY_DIR}/env/bin/activate"
|
source "${XRAY_DIR}/env/bin/activate"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
export XRAY_PART_YAML="${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/${XRAY_PART}.yaml"
|
export XRAY_PART_YAML="${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/${XRAY_PART}/part.yaml"
|
||||||
export PYTHONPATH="${XRAY_DIR}:${XRAY_DIR}/third_party/fasm:$PYTHONPATH"
|
export PYTHONPATH="${XRAY_DIR}:${XRAY_DIR}/third_party/fasm:$PYTHONPATH"
|
||||||
|
|
||||||
# tools
|
# tools
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import csv
|
||||||
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from prjxray import fasm_assembler
|
from prjxray import fasm_assembler, util
|
||||||
from prjxray.db import Database
|
from prjxray.db import Database
|
||||||
from prjxray.roi import Roi
|
from prjxray.roi import Roi
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ def run(
|
||||||
roi=None,
|
roi=None,
|
||||||
debug=False,
|
debug=False,
|
||||||
emit_pudc_b_pullup=False):
|
emit_pudc_b_pullup=False):
|
||||||
db = Database(db_root)
|
db = Database(db_root, part)
|
||||||
assembler = fasm_assembler.FasmAssembler(db)
|
assembler = fasm_assembler.FasmAssembler(db)
|
||||||
|
|
||||||
set_features = set()
|
set_features = set()
|
||||||
|
|
@ -124,12 +124,11 @@ def run(
|
||||||
bank_to_tile = defaultdict(lambda: set())
|
bank_to_tile = defaultdict(lambda: set())
|
||||||
|
|
||||||
if part is not None:
|
if part is not None:
|
||||||
with open(os.path.join(db_root, part + "_package_pins.csv"),
|
with open(os.path.join(db_root, part, "package_pins.csv"), "r") as fp:
|
||||||
"r") as fp:
|
|
||||||
reader = csv.DictReader(fp)
|
reader = csv.DictReader(fp)
|
||||||
package_pins = [l for l in reader]
|
package_pins = [l for l in reader]
|
||||||
|
|
||||||
with open(os.path.join(db_root, part + ".json"), "r") as fp:
|
with open(os.path.join(db_root, part, "part.json"), "r") as fp:
|
||||||
part_data = json.load(fp)
|
part_data = json.load(fp)
|
||||||
|
|
||||||
for bank, loc in part_data["iobanks"].items():
|
for bank, loc in part_data["iobanks"].items():
|
||||||
|
|
@ -271,28 +270,8 @@ def main():
|
||||||
'Convert FPGA configuration description ("FPGA assembly") into binary frame equivalent'
|
'Convert FPGA configuration description ("FPGA assembly") into binary frame equivalent'
|
||||||
)
|
)
|
||||||
|
|
||||||
database_dir = os.getenv("XRAY_DATABASE_DIR")
|
util.db_root_arg(parser)
|
||||||
database = os.getenv("XRAY_DATABASE")
|
util.part_arg(parser)
|
||||||
db_root_kwargs = {}
|
|
||||||
if database_dir is None or database is None:
|
|
||||||
db_root_kwargs['required'] = True
|
|
||||||
else:
|
|
||||||
db_root_kwargs['required'] = False
|
|
||||||
db_root_kwargs['default'] = os.path.join(database_dir, database)
|
|
||||||
|
|
||||||
db_part = os.getenv("XRAY_PART")
|
|
||||||
db_part_kwargs = {}
|
|
||||||
if db_part is None:
|
|
||||||
db_part_kwargs['required'] = True
|
|
||||||
else:
|
|
||||||
db_part_kwargs['required'] = False
|
|
||||||
db_part_kwargs['default'] = db_part
|
|
||||||
|
|
||||||
parser.add_argument('--db-root', help="Database root.", **db_root_kwargs)
|
|
||||||
parser.add_argument(
|
|
||||||
'--part',
|
|
||||||
help="Part name. When not given defaults to XRAY_PART env. var.",
|
|
||||||
**db_part_kwargs)
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--sparse', action='store_true', help="Don't zero fill all frames")
|
'--sparse', action='store_true', help="Don't zero fill all frames")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ from __future__ import print_function
|
||||||
import os.path
|
import os.path
|
||||||
import fasm
|
import fasm
|
||||||
from prjxray import db
|
from prjxray import db
|
||||||
|
from prjxray import util
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
@ -17,20 +18,12 @@ def main():
|
||||||
description=
|
description=
|
||||||
'Outputs a Vivavo highlight_objects command from a FASM file.')
|
'Outputs a Vivavo highlight_objects command from a FASM file.')
|
||||||
|
|
||||||
database_dir = os.getenv("XRAY_DATABASE_DIR")
|
util.db_root_arg(parser)
|
||||||
database = os.getenv("XRAY_DATABASE")
|
util.part_arg(parser)
|
||||||
db_root_kwargs = {}
|
|
||||||
if database_dir is None or database is None:
|
|
||||||
db_root_kwargs['required'] = True
|
|
||||||
else:
|
|
||||||
db_root_kwargs['required'] = False
|
|
||||||
db_root_kwargs['default'] = os.path.join(database_dir, database)
|
|
||||||
|
|
||||||
parser.add_argument('--db-root', help="Database root.", **db_root_kwargs)
|
|
||||||
parser.add_argument('fn_in', help='Input FPGA assembly (.fasm) file')
|
parser.add_argument('fn_in', help='Input FPGA assembly (.fasm) file')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
database = db.Database(args.db_root)
|
database = db.Database(args.db_root, args.part)
|
||||||
grid = database.grid()
|
grid = database.grid()
|
||||||
|
|
||||||
def inner():
|
def inner():
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ import fasm
|
||||||
from prjxray import db
|
from prjxray import db
|
||||||
|
|
||||||
|
|
||||||
def process_fasm(db_root, fasm_file, canonical):
|
def process_fasm(db_root, part, fasm_file, canonical):
|
||||||
database = db.Database(db_root)
|
database = db.Database(db_root, part)
|
||||||
grid = database.grid()
|
grid = database.grid()
|
||||||
|
|
||||||
for fasm_line in fasm.parse_fasm_filename(fasm_file):
|
for fasm_line in fasm.parse_fasm_filename(fasm_file):
|
||||||
|
|
@ -56,10 +56,11 @@ def process_fasm(db_root, fasm_file, canonical):
|
||||||
yield fasm_line
|
yield fasm_line
|
||||||
|
|
||||||
|
|
||||||
def run(db_root, fasm_file, canonical):
|
def run(db_root, part, fasm_file, canonical):
|
||||||
print(
|
print(
|
||||||
fasm.fasm_tuple_to_string(
|
fasm.fasm_tuple_to_string(
|
||||||
process_fasm(db_root, fasm_file, canonical), canonical=canonical))
|
process_fasm(db_root, part, fasm_file, canonical),
|
||||||
|
canonical=canonical))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
@ -67,22 +68,14 @@ def main():
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Pretty print a FASM file.')
|
parser = argparse.ArgumentParser(description='Pretty print a FASM file.')
|
||||||
|
|
||||||
database_dir = os.getenv("XRAY_DATABASE_DIR")
|
util.db_root_arg(parser)
|
||||||
database = os.getenv("XRAY_DATABASE")
|
util.part_arg(parser)
|
||||||
db_root_kwargs = {}
|
|
||||||
if database_dir is None or database is None:
|
|
||||||
db_root_kwargs['required'] = True
|
|
||||||
else:
|
|
||||||
db_root_kwargs['required'] = False
|
|
||||||
db_root_kwargs['default'] = os.path.join(database_dir, database)
|
|
||||||
|
|
||||||
parser.add_argument('--db-root', help="Database root.", **db_root_kwargs)
|
|
||||||
parser.add_argument('fasm_file', help='Input FASM file')
|
parser.add_argument('fasm_file', help='Input FASM file')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--canonical', help='Output canonical bitstream.', action='store_true')
|
'--canonical', help='Output canonical bitstream.', action='store_true')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
run(args.db_root, args.fasm_file, args.canonical)
|
run(args.db_root, args.part, args.fasm_file, args.canonical)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import prjxray.db
|
import prjxray.db
|
||||||
|
import prjxray.util
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
def quick_test(db_root):
|
def quick_test(db_root, part):
|
||||||
db = prjxray.db.Database(db_root)
|
db = prjxray.db.Database(db_root, part)
|
||||||
g = db.grid()
|
g = db.grid()
|
||||||
|
|
||||||
# Verify that we have some tile information for every tile in grid.
|
# Verify that we have some tile information for every tile in grid.
|
||||||
|
|
@ -47,11 +48,13 @@ def quick_test(db_root):
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Runs a sanity check on a prjxray database.")
|
description="Runs a sanity check on a prjxray database.")
|
||||||
parser.add_argument('--db-root', required=True)
|
|
||||||
|
util.db_root_arg(parser)
|
||||||
|
util.part_arg(parser)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
quick_test(args.db_root)
|
quick_test(args.db_root, args.part)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
|
|
@ -428,6 +428,7 @@ def load_tiles(db_root):
|
||||||
|
|
||||||
def run(
|
def run(
|
||||||
db_root,
|
db_root,
|
||||||
|
part,
|
||||||
bits_file,
|
bits_file,
|
||||||
segnames,
|
segnames,
|
||||||
omit_empty_segs=False,
|
omit_empty_segs=False,
|
||||||
|
|
@ -436,7 +437,7 @@ def run(
|
||||||
flag_decode_omit=False,
|
flag_decode_omit=False,
|
||||||
bit_only=False,
|
bit_only=False,
|
||||||
verbose=False):
|
verbose=False):
|
||||||
db = prjxraydb.Database(db_root)
|
db = prjxraydb.Database(db_root, part)
|
||||||
tiles = load_tiles(db_root)
|
tiles = load_tiles(db_root)
|
||||||
segments = mk_segments(tiles)
|
segments = mk_segments(tiles)
|
||||||
bitdata = bitstream.load_bitdata2(open(bits_file, "r"))
|
bitdata = bitstream.load_bitdata2(open(bits_file, "r"))
|
||||||
|
|
@ -477,6 +478,7 @@ def main():
|
||||||
description="Decode bits within a tile's address space")
|
description="Decode bits within a tile's address space")
|
||||||
|
|
||||||
util.db_root_arg(parser)
|
util.db_root_arg(parser)
|
||||||
|
util.part_arg(parser)
|
||||||
parser.add_argument('--verbose', action='store_true', help='')
|
parser.add_argument('--verbose', action='store_true', help='')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-z',
|
'-z',
|
||||||
|
|
@ -503,6 +505,7 @@ def main():
|
||||||
|
|
||||||
run(
|
run(
|
||||||
args.db_root,
|
args.db_root,
|
||||||
|
args.part,
|
||||||
args.bits_file,
|
args.bits_file,
|
||||||
args.segnames,
|
args.segnames,
|
||||||
args.z,
|
args.z,
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,21 @@
|
||||||
import argparse
|
import argparse
|
||||||
from prjxray.db import Database
|
from prjxray.db import Database
|
||||||
from prjxray.grid import BlockType
|
from prjxray.grid import BlockType
|
||||||
|
from prjxray import util
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Tool for checking which tiles have bits defined.")
|
description="Tool for checking which tiles have bits defined.")
|
||||||
parser.add_argument('db_root')
|
|
||||||
|
util.db_root_arg(parser)
|
||||||
|
util.part_arg(parser)
|
||||||
parser.add_argument('--show-only-missing', action='store_true')
|
parser.add_argument('--show-only-missing', action='store_true')
|
||||||
parser.add_argument('--verbose', action='store_true')
|
parser.add_argument('--verbose', action='store_true')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
db = Database(args.db_root)
|
db = Database(args.db_root, args.part)
|
||||||
grid = db.grid()
|
grid = db.grid()
|
||||||
|
|
||||||
tile_types = {}
|
tile_types = {}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import multiprocessing
|
||||||
import pyjson5 as json5
|
import pyjson5 as json5
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
|
from prjxray import util
|
||||||
|
|
||||||
|
|
||||||
def full_wire_name(wire_in_grid):
|
def full_wire_name(wire_in_grid):
|
||||||
|
|
@ -36,8 +37,8 @@ def make_connection(wires, connection):
|
||||||
wires[wire] = wire_a_set
|
wires[wire] = wire_a_set
|
||||||
|
|
||||||
|
|
||||||
def make_connections(db_root):
|
def make_connections(db_root, part):
|
||||||
db = prjxray.db.Database(db_root)
|
db = prjxray.db.Database(db_root, part)
|
||||||
c = db.connections()
|
c = db.connections()
|
||||||
|
|
||||||
wires = {}
|
wires = {}
|
||||||
|
|
@ -60,7 +61,9 @@ def read_json5(fname):
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Tests database against raw node list.")
|
description="Tests database against raw node list.")
|
||||||
parser.add_argument('--db-root', required=True)
|
|
||||||
|
util.db_root_arg(parser)
|
||||||
|
util.part_arg(parser)
|
||||||
parser.add_argument('--raw_node_root', required=True)
|
parser.add_argument('--raw_node_root', required=True)
|
||||||
parser.add_argument('--error_nodes', default="error_nodes.json")
|
parser.add_argument('--error_nodes', default="error_nodes.json")
|
||||||
parser.add_argument('--ignored_wires')
|
parser.add_argument('--ignored_wires')
|
||||||
|
|
@ -88,7 +91,7 @@ def main():
|
||||||
bar.update(idx + 1)
|
bar.update(idx + 1)
|
||||||
|
|
||||||
print('{} Creating connections'.format(datetime.datetime.now()))
|
print('{} Creating connections'.format(datetime.datetime.now()))
|
||||||
generated_nodes = make_connections(args.db_root)
|
generated_nodes = make_connections(args.db_root, args.part)
|
||||||
|
|
||||||
print('{} Verifying connections'.format(datetime.datetime.now()))
|
print('{} Verifying connections'.format(datetime.datetime.now()))
|
||||||
error_nodes = []
|
error_nodes = []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue