mirror of https://github.com/openXC7/prjxray.git
timfuz: timing3.csv => timing3i.csv (interconnect)
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
This commit is contained in:
parent
cd129ba84e
commit
9e8f6ea3e4
|
|
@ -111,14 +111,14 @@ def main():
|
||||||
|
|
||||||
parser.add_argument('--verbose', action='store_true', help='')
|
parser.add_argument('--verbose', action='store_true', help='')
|
||||||
parser.add_argument('--sub-json', help='')
|
parser.add_argument('--sub-json', help='')
|
||||||
parser.add_argument('fns_in', nargs='*', help='timing3.csv input files')
|
parser.add_argument('fns_in', nargs='*', help='timing3i.csv input files')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
# Store options in dict to ease passing through functions
|
# Store options in dict to ease passing through functions
|
||||||
bench = Benchmark()
|
bench = Benchmark()
|
||||||
|
|
||||||
fns_in = args.fns_in
|
fns_in = args.fns_in
|
||||||
if not fns_in:
|
if not fns_in:
|
||||||
fns_in = glob.glob('specimen_*/timing3.csv')
|
fns_in = glob.glob('specimen_*/timing3i.csv')
|
||||||
|
|
||||||
sub_json = None
|
sub_json = None
|
||||||
if args.sub_json:
|
if args.sub_json:
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,10 @@ def main():
|
||||||
|
|
||||||
parser.add_argument('--verbose', type=int, help='')
|
parser.add_argument('--verbose', type=int, help='')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--auto-name', action='store_true', help='timing3.csv => timing3c.csv')
|
'--auto-name', action='store_true', help='timing3i.csv => timing3c.csv')
|
||||||
parser.add_argument('--out', default=None, help='Output csv')
|
parser.add_argument('--out', default=None, help='Output csv')
|
||||||
parser.add_argument('--corner', help='Output csv')
|
parser.add_argument('--corner', help='Output csv')
|
||||||
parser.add_argument('fns_in', nargs='+', help='timing3.csv input files')
|
parser.add_argument('fns_in', nargs='+', help='timing3i.csv input files')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
bench = Benchmark()
|
bench = Benchmark()
|
||||||
|
|
||||||
|
|
@ -40,8 +40,8 @@ def main():
|
||||||
if args.auto_name:
|
if args.auto_name:
|
||||||
assert len(args.fns_in) == 1
|
assert len(args.fns_in) == 1
|
||||||
fnin = args.fns_in[0]
|
fnin = args.fns_in[0]
|
||||||
fnout = fnin.replace('timing3.csv', 'timing3c.csv')
|
fnout = fnin.replace('timing3i.csv', 'timing3c.csv')
|
||||||
assert fnout != fnin, 'Expect timing3.csv in'
|
assert fnout != fnin, 'Expect timing3i.csv in'
|
||||||
else:
|
else:
|
||||||
fnout = '/dev/stdout'
|
fnout = '/dev/stdout'
|
||||||
print("Writing to %s" % fnout)
|
print("Writing to %s" % fnout)
|
||||||
|
|
@ -49,7 +49,7 @@ def main():
|
||||||
|
|
||||||
fns_in = args.fns_in
|
fns_in = args.fns_in
|
||||||
if not fns_in:
|
if not fns_in:
|
||||||
fns_in = glob.glob('specimen_*/timing3.csv')
|
fns_in = glob.glob('specimen_*/timing3i.csv')
|
||||||
|
|
||||||
run(fout=fout, fns_in=fns_in, corner=args.corner, verbose=args.verbose)
|
run(fout=fout, fns_in=fns_in, corner=args.corner, verbose=args.verbose)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,14 +45,14 @@ def main():
|
||||||
required=True,
|
required=True,
|
||||||
help='Group substitutions to make fully ranked')
|
help='Group substitutions to make fully ranked')
|
||||||
parser.add_argument('--out', help='Output sub.json substitution result')
|
parser.add_argument('--out', help='Output sub.json substitution result')
|
||||||
parser.add_argument('fns_in', nargs='+', help='timing3.csv input files')
|
parser.add_argument('fns_in', nargs='+', help='timing3i.csv input files')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
# Store options in dict to ease passing through functions
|
# Store options in dict to ease passing through functions
|
||||||
bench = Benchmark()
|
bench = Benchmark()
|
||||||
|
|
||||||
fns_in = args.fns_in
|
fns_in = args.fns_in
|
||||||
if not fns_in:
|
if not fns_in:
|
||||||
fns_in = glob.glob('specimen_*/timing3.csv')
|
fns_in = glob.glob('specimen_*/timing3i.csv')
|
||||||
|
|
||||||
sub_json = load_sub(args.sub_json)
|
sub_json = load_sub(args.sub_json)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,6 @@ $(BUILD_DIR)/$(CORNER)/timgrid-vc.json: $(BUILD_DIR)/$(CORNER)/flat.csv
|
||||||
python3 $(TIMFUZ_DIR)/tile_annotate.py --timgrid-s $(TIMFUZ_DIR)/timgrid/build/timgrid-s.json --out $(BUILD_DIR)/$(CORNER)/timgrid-vc.json $(BUILD_DIR)/$(CORNER)/flat.csv
|
python3 $(TIMFUZ_DIR)/tile_annotate.py --timgrid-s $(TIMFUZ_DIR)/timgrid/build/timgrid-s.json --out $(BUILD_DIR)/$(CORNER)/timgrid-vc.json $(BUILD_DIR)/$(CORNER)/flat.csv
|
||||||
|
|
||||||
$(BUILD_DIR)/$(CORNER)/qor.txt: $(BUILD_DIR)/$(CORNER)/flat.csv
|
$(BUILD_DIR)/$(CORNER)/qor.txt: $(BUILD_DIR)/$(CORNER)/flat.csv
|
||||||
python3 $(TIMFUZ_DIR)/solve_qor.py --corner $(CORNER) --bounds-csv $(BUILD_DIR)/$(CORNER)/flat.csv specimen_*/timing3.csv >$(BUILD_DIR)/$(CORNER)/qor.txt.tmp
|
python3 $(TIMFUZ_DIR)/solve_qor.py --corner $(CORNER) --bounds-csv $(BUILD_DIR)/$(CORNER)/flat.csv specimen_*/timing3i.csv >$(BUILD_DIR)/$(CORNER)/qor.txt.tmp
|
||||||
mv $(BUILD_DIR)/$(CORNER)/qor.txt.tmp $(BUILD_DIR)/$(CORNER)/qor.txt
|
mv $(BUILD_DIR)/$(CORNER)/qor.txt.tmp $(BUILD_DIR)/$(CORNER)/qor.txt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,6 @@ source ${XRAY_GENHEADER}
|
||||||
TIMFUZ_DIR=$XRAY_DIR/fuzzers/007-timing
|
TIMFUZ_DIR=$XRAY_DIR/fuzzers/007-timing
|
||||||
|
|
||||||
timing_txt2csv () {
|
timing_txt2csv () {
|
||||||
python3 $TIMFUZ_DIR/timing_txt2csv.py --speed-json $TIMFUZ_DIR/speed/build/speed.json --out timing3.csv timing3.txt
|
python3 $TIMFUZ_DIR/timing_txt2icsv.py --speed-json $TIMFUZ_DIR/speed/build/speed.json --out timing3i.csv timing3.txt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
N := 1
|
N := 1
|
||||||
SPECIMENS := $(addprefix specimen_,$(shell seq -f '%03.0f' $(N)))
|
SPECIMENS := $(addprefix specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||||
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
||||||
CSVS := $(addsuffix /timing3.csv,$(SPECIMENS))
|
CSVS := $(addsuffix /timing3i.csv,$(SPECIMENS))
|
||||||
TIMFUZ_DIR=$(XRAY_DIR)/fuzzers/007-timing
|
TIMFUZ_DIR=$(XRAY_DIR)/fuzzers/007-timing
|
||||||
RREF_CORNER=slow_max
|
RREF_CORNER=slow_max
|
||||||
# Allow an empty system of equations?
|
# Allow an empty system of equations?
|
||||||
|
|
|
||||||
|
|
@ -223,13 +223,13 @@ def main():
|
||||||
default='build_speed/speed.json',
|
default='build_speed/speed.json',
|
||||||
help='Provides speed index to name translation')
|
help='Provides speed index to name translation')
|
||||||
parser.add_argument('--out', help='Output sub.json substitution result')
|
parser.add_argument('--out', help='Output sub.json substitution result')
|
||||||
parser.add_argument('fns_in', nargs='*', help='timing3.csv input files')
|
parser.add_argument('fns_in', nargs='*', help='timing3i.csv input files')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
bench = Benchmark()
|
bench = Benchmark()
|
||||||
|
|
||||||
fns_in = args.fns_in
|
fns_in = args.fns_in
|
||||||
if not fns_in:
|
if not fns_in:
|
||||||
fns_in = glob.glob('specimen_*/timing3.csv')
|
fns_in = glob.glob('specimen_*/timing3i.csv')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
run(
|
run(
|
||||||
|
|
|
||||||
|
|
@ -119,14 +119,14 @@ def main():
|
||||||
parser.add_argument('--corner', required=True, default="slow_max", help='')
|
parser.add_argument('--corner', required=True, default="slow_max", help='')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--out', default=None, help='output timing delay .json')
|
'--out', default=None, help='output timing delay .json')
|
||||||
parser.add_argument('fns_in', nargs='+', help='timing3.csv input files')
|
parser.add_argument('fns_in', nargs='+', help='timing3i.csv input files')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
# Store options in dict to ease passing through functions
|
# Store options in dict to ease passing through functions
|
||||||
bench = Benchmark()
|
bench = Benchmark()
|
||||||
|
|
||||||
fns_in = args.fns_in
|
fns_in = args.fns_in
|
||||||
if not fns_in:
|
if not fns_in:
|
||||||
fns_in = glob.glob('specimen_*/timing3.csv')
|
fns_in = glob.glob('specimen_*/timing3i.csv')
|
||||||
|
|
||||||
sub_json = None
|
sub_json = None
|
||||||
if args.sub_json:
|
if args.sub_json:
|
||||||
|
|
|
||||||
|
|
@ -162,14 +162,14 @@ def main():
|
||||||
parser.add_argument('--corner', required=True, default="slow_max", help='')
|
parser.add_argument('--corner', required=True, default="slow_max", help='')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--out', default=None, help='output timing delay .json')
|
'--out', default=None, help='output timing delay .json')
|
||||||
parser.add_argument('fns_in', nargs='+', help='timing3.csv input files')
|
parser.add_argument('fns_in', nargs='+', help='timing3i.csv input files')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
# Store options in dict to ease passing through functions
|
# Store options in dict to ease passing through functions
|
||||||
bench = Benchmark()
|
bench = Benchmark()
|
||||||
|
|
||||||
fns_in = args.fns_in
|
fns_in = args.fns_in
|
||||||
if not fns_in:
|
if not fns_in:
|
||||||
fns_in = glob.glob('specimen_*/timing3.csv')
|
fns_in = glob.glob('specimen_*/timing3i.csv')
|
||||||
|
|
||||||
sub_json = None
|
sub_json = None
|
||||||
if args.sub_json:
|
if args.sub_json:
|
||||||
|
|
|
||||||
|
|
@ -37,14 +37,14 @@ def main():
|
||||||
'--bounds-csv',
|
'--bounds-csv',
|
||||||
required=True,
|
required=True,
|
||||||
help='Previous solve result starting point')
|
help='Previous solve result starting point')
|
||||||
parser.add_argument('fns_in', nargs='+', help='timing3.csv input files')
|
parser.add_argument('fns_in', nargs='+', help='timing3i.csv input files')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
# Store options in dict to ease passing through functions
|
# Store options in dict to ease passing through functions
|
||||||
bench = Benchmark()
|
bench = Benchmark()
|
||||||
|
|
||||||
fns_in = args.fns_in
|
fns_in = args.fns_in
|
||||||
if not fns_in:
|
if not fns_in:
|
||||||
fns_in = glob.glob('specimen_*/timing3.csv')
|
fns_in = glob.glob('specimen_*/timing3i.csv')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
run(
|
run(
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,10 @@ def run(speed_json_f, fout, f_ins, verbose=0, corner=None):
|
||||||
|
|
||||||
fout.write('ico,fast_max fast_min slow_max slow_min,rows...\n')
|
fout.write('ico,fast_max fast_min slow_max slow_min,rows...\n')
|
||||||
for row_bs, row_ds, row_ico in zip(bs, Ads, ico):
|
for row_bs, row_ds, row_ico in zip(bs, Ads, ico):
|
||||||
|
# XXX: consider removing ico column
|
||||||
|
# its obsolete at this point
|
||||||
|
if not ico:
|
||||||
|
continue
|
||||||
# like: 123 456 120 450, 1 a, 2 b
|
# like: 123 456 120 450, 1 a, 2 b
|
||||||
# first column has delay corners, followed by delay element count
|
# first column has delay corners, followed by delay element count
|
||||||
items = [str(row_ico), ' '.join([str(x) for x in row_bs])]
|
items = [str(row_ico), ' '.join([str(x) for x in row_bs])]
|
||||||
|
|
@ -248,18 +252,18 @@ def main():
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description=
|
description=
|
||||||
'Convert obscure timing3.txt into more readable but roughly equivilent timing3.csv'
|
'Convert obscure timing3.txt into more readable but roughly equivilent timing3i.csv (interconnect)'
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument('--verbose', type=int, help='')
|
parser.add_argument('--verbose', type=int, help='')
|
||||||
# made a bulk conversion easier...keep?
|
# made a bulk conversion easier...keep?
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--auto-name', action='store_true', help='timing3.txt => timing3.csv')
|
'--auto-name', action='store_true', help='timing3.txt => timing3i.csv')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--speed-json',
|
'--speed-json',
|
||||||
default='build_speed/speed.json',
|
default='build_speed/speed.json',
|
||||||
help='Provides speed index to name translation')
|
help='Provides speed index to name translation')
|
||||||
parser.add_argument('--out', default=None, help='Output timing3.csv file')
|
parser.add_argument('--out', default=None, help='Output timing3i.csv file')
|
||||||
parser.add_argument('fns_in', nargs='+', help='Input timing3.txt files')
|
parser.add_argument('fns_in', nargs='+', help='Input timing3.txt files')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
bench = Benchmark()
|
bench = Benchmark()
|
||||||
|
|
@ -269,7 +273,7 @@ def main():
|
||||||
if args.auto_name:
|
if args.auto_name:
|
||||||
assert len(args.fns_in) == 1
|
assert len(args.fns_in) == 1
|
||||||
fnin = args.fns_in[0]
|
fnin = args.fns_in[0]
|
||||||
fnout = fnin.replace('.txt', '.csv')
|
fnout = fnin.replace('.txt', 'i.csv')
|
||||||
assert fnout != fnin, 'Expect .txt in'
|
assert fnout != fnin, 'Expect .txt in'
|
||||||
else:
|
else:
|
||||||
# practically there are too many stray prints to make this work as expected
|
# practically there are too many stray prints to make this work as expected
|
||||||
Loading…
Reference in New Issue