mirror of https://github.com/openXC7/prjxray.git
timfuz: ALLOW_ZERO_EQN workaround for projects that fail PnR
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
This commit is contained in:
parent
0b3aa34b5b
commit
2a28dabf02
|
|
@ -3,6 +3,7 @@
|
|||
TIMFUZ_DIR=$(XRAY_DIR)/fuzzers/007-timing
|
||||
CORNER=slow_max
|
||||
ALLOW_ZERO_EQN?=N
|
||||
BADPRJ_OK?=N
|
||||
|
||||
all: build/$(CORNER)/tilea.json
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ CSVS := $(addsuffix /timing3.csv,$(SPECIMENS))
|
|||
TIMFUZ_DIR=$(XRAY_DIR)/fuzzers/007-timing
|
||||
RREF_CORNER=slow_max
|
||||
ALLOW_ZERO_EQN?=N
|
||||
BADPRJ_OK?=N
|
||||
|
||||
TILEA_JSONS=build/fast_max/tilea.json build/fast_min/tilea.json build/slow_max/tilea.json build/slow_min/tilea.json
|
||||
|
||||
|
|
@ -28,7 +29,7 @@ slow_max: build/slow_max/tilea.json
|
|||
slow_min: build/slow_min/tilea.json
|
||||
|
||||
$(SPECIMENS_OK):
|
||||
bash generate.sh $(subst /OK,,$@)
|
||||
bash generate.sh $(subst /OK,,$@) || (if [ "$(BADPRJ_OK)" != 'Y' ] ; then exit 1; fi; exit 0)
|
||||
touch $@
|
||||
|
||||
run:
|
||||
|
|
@ -43,18 +44,31 @@ clean:
|
|||
|
||||
.PHONY: all run clean
|
||||
|
||||
# rref should be the same regardless of corner
|
||||
# Normally require all projects to complete
|
||||
# If BADPRJ_OK is allowed, only take projects that were successful
|
||||
# FIXME: couldn't get call to work
|
||||
exist_csvs = \
|
||||
for f in $(CSVS); do \
|
||||
if [ "$(BADPRJ_OK)" != 'Y' -o -f $$f ] ; then \
|
||||
echo $$f; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# rref should be the same regardless of corner
|
||||
build/sub.json: $(SPECIMENS_OK)
|
||||
mkdir -p build
|
||||
# Discover which variables can be separated
|
||||
# This is typically the longest running operation
|
||||
python3 $(TIMFUZ_DIR)/rref.py --corner $(RREF_CORNER) --simplify --out build/sub.json.tmp $(CSVS)
|
||||
\
|
||||
csvs=$$(for f in $(CSVS); do if [ "$(BADPRJ_OK)" != 'Y' -o -f $$f ] ; then echo $$f; fi; done) ; \
|
||||
python3 $(TIMFUZ_DIR)/rref.py --corner $(RREF_CORNER) --simplify --out build/sub.json.tmp $$csvs
|
||||
mv build/sub.json.tmp build/sub.json
|
||||
|
||||
build/grouped.csv: $(SPECIMENS_OK) build/sub.json
|
||||
# Separate variables
|
||||
python3 $(TIMFUZ_DIR)/csv_flat2group.py --sub-json build/sub.json --strict --out build/grouped.csv.tmp $(CSVS)
|
||||
\
|
||||
csvs=$$(for f in $(CSVS); do if [ "$(BADPRJ_OK)" != 'Y' -o -f $$f ] ; then echo $$f; fi; done) ; \
|
||||
python3 $(TIMFUZ_DIR)/csv_flat2group.py --sub-json build/sub.json --strict --out build/grouped.csv.tmp $$csvs
|
||||
mv build/grouped.csv.tmp build/grouped.csv
|
||||
|
||||
build/checksub: build/grouped.csv build/sub.json
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ def main():
|
|||
parser.add_argument('--out', help='Output sub.json substitution result')
|
||||
parser.add_argument(
|
||||
'fns_in',
|
||||
nargs='*',
|
||||
nargs='+',
|
||||
help='timing3.txt input files')
|
||||
args = parser.parse_args()
|
||||
bench = Benchmark()
|
||||
|
|
|
|||
|
|
@ -187,15 +187,11 @@ def simplify_rows(Ads, b_ub, remove_zd=False, corner=None):
|
|||
eqns[rowt] = minmax(eqns.get(rowt, T_UNK), b)
|
||||
|
||||
print(' done')
|
||||
|
||||
print('Simplify rows: %d => %d rows w/ zd %d, ze %d' % (len(b_ub), len(eqns), zero_ds, zero_es))
|
||||
if len(eqns) == 0:
|
||||
raise SimplifiedToZero()
|
||||
|
||||
#A_ub_ret = eqns.keys()
|
||||
A_ubd_ret, b_ub_ret = Ab_ub_dt2d(eqns)
|
||||
|
||||
print('Simplify rows: %d => %d rows w/ zd %d, ze %d' % (len(b_ub), len(b_ub_ret), zero_ds, zero_es))
|
||||
#return A_ub_ret, b_ub_ret
|
||||
#return A_ub_np2d(A_ub_ret), b_ub_ret
|
||||
return A_ubd_ret, b_ub_ret
|
||||
|
||||
def A_ubr_np2d(row):
|
||||
|
|
|
|||
Loading…
Reference in New Issue