Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition #1884

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fuzzers/065b-gtp-common-pips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ TODO_RE=".*HCLK_GTP_CK_MUX.*"
PIP_DIR=${XRAY_FUZZERS_DIR}/piplist/build/$(PIP_TYPE)

MAKETODO_FLAGS=--pip-type ${PIP_FILE} --seg-type $(SEG_TYPE) --re $(TODO_RE) --sides "" --pip-dir $(PIP_DIR)
N = 20
N = 40

SEGMATCH_FLAGS=-c 3
SPECIMENS_DEPS=$(BUILD_DIR)/cmt_regions.csv
Expand Down
21 changes: 18 additions & 3 deletions prjxray/tile_segbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#
# SPDX-License-Identifier: ISC
from collections import namedtuple
import sys

from prjxray import bitstream
from prjxray.grid_types import BlockType
from prjxray.util import OpenSafeFile
Expand Down Expand Up @@ -85,15 +87,28 @@ def __init__(self, tile_db):

if tile_db.ppips is not None:
with OpenSafeFile(tile_db.ppips) as f:
self.ppips = read_ppips(f)
try:
self.ppips = read_ppips(f)
except Exception as e:
print(f"Error reading ppips from {tile_db.ppips}: {e}", file=sys.stderr)
exit(1)

if tile_db.segbits is not None:
with OpenSafeFile(tile_db.segbits) as f:
self.segbits[BlockType.CLB_IO_CLK] = read_segbits(f)
try:
self.segbits[BlockType.CLB_IO_CLK] = read_segbits(f)
except Exception as e:
print(f"Error reading segbits from {tile_db.segbits}: {e}", file=sys.stderr)
exit(1)


if tile_db.block_ram_segbits is not None:
with OpenSafeFile(tile_db.block_ram_segbits) as f:
self.segbits[BlockType.BLOCK_RAM] = read_segbits(f)
try:
self.segbits[BlockType.BLOCK_RAM] = read_segbits(f)
except Exception as e:
print(f"Error reading ram segbits from {tile_db.block_ram_segbits}: {e}", file=sys.stderr)
exit(1)

for block_type in self.segbits:
for feature in self.segbits[block_type]:
Expand Down