From ec28d9560477eaa9500a71e53c2110fe586fe79c Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Wed, 19 Jun 2019 15:06:33 +0200 Subject: [PATCH 01/13] fuzzers: 007: add routing BELs fuzzer Signed-off-by: Karol Gugala --- fuzzers/007-timing/routing-bels/Makefile | 17 ++++++ fuzzers/007-timing/routing-bels/runme.sh | 13 +++++ fuzzers/007-timing/routing-bels/runme.tcl | 62 ++++++++++++++++++++++ fuzzers/007-timing/routing-bels/tim2sdf.py | 42 +++++++++++++++ fuzzers/007-timing/routing-bels/top.v | 5 ++ 5 files changed, 139 insertions(+) create mode 100644 fuzzers/007-timing/routing-bels/Makefile create mode 100644 fuzzers/007-timing/routing-bels/runme.sh create mode 100644 fuzzers/007-timing/routing-bels/runme.tcl create mode 100644 fuzzers/007-timing/routing-bels/tim2sdf.py create mode 100644 fuzzers/007-timing/routing-bels/top.v diff --git a/fuzzers/007-timing/routing-bels/Makefile b/fuzzers/007-timing/routing-bels/Makefile new file mode 100644 index 00000000..91ca52fe --- /dev/null +++ b/fuzzers/007-timing/routing-bels/Makefile @@ -0,0 +1,17 @@ +all: build/slicel.json build/slicem.json + +clean: + rm -rf build + +build/slicel.json: build/slicel.txt + python3 tim2sdf.py --timings build/slicel.txt --json build/slicel.json + +build/slicem.json: build/slicem.txt + python3 tim2sdf.py --timings build/slicem.txt --json build/slicem.json + +build/slicel.txt build/slicem.txt: + bash runme.sh + +cleandb: + rm -rf ${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/timings + diff --git a/fuzzers/007-timing/routing-bels/runme.sh b/fuzzers/007-timing/routing-bels/runme.sh new file mode 100644 index 00000000..00f88914 --- /dev/null +++ b/fuzzers/007-timing/routing-bels/runme.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -ex + +# Create build dir +export SRC_DIR=$PWD +export BUILD_DIR=build + +mkdir -p $BUILD_DIR +cd $BUILD_DIR + +${XRAY_VIVADO} -mode batch -source $SRC_DIR/runme.tcl +test -z "$(fgrep CRITICAL vivado.log)" && touch run.ok diff --git a/fuzzers/007-timing/routing-bels/runme.tcl b/fuzzers/007-timing/routing-bels/runme.tcl new file mode 100644 index 00000000..8dd33e21 --- /dev/null +++ b/fuzzers/007-timing/routing-bels/runme.tcl @@ -0,0 +1,62 @@ +source "$::env(XRAY_DIR)/utils/utils.tcl" + +proc create_design {} { + + create_project -force -part $::env(XRAY_PART) design design + read_verilog $::env(SRC_DIR)/top.v + synth_design -top top -flatten_hierarchy none + + set_property -dict "PACKAGE_PIN $::env(XRAY_PIN_00) IOSTANDARD LVCMOS33" [get_ports di] + set_property -dict "PACKAGE_PIN $::env(XRAY_PIN_01) IOSTANDARD LVCMOS33" [get_ports do] + + set_property CFGBVS VCCO [current_design] + set_property CONFIG_VOLTAGE 3.3 [current_design] + set_property BITSTREAM.GENERAL.PERFRAMECRC YES [current_design] +} + +proc place_and_route_design {} { + + place_design + route_design + + write_checkpoint -force design.dcp +} + +proc dump_model_timings {timing_fp models} { + + set properties [list "DELAY" "FAST_MAX" "FAST_MIN" "SLOW_MAX" "SLOW_MIN"] + + foreach model $models { + set timing_line {} + lappend timing_line "$model" + foreach property $properties { + set value [get_property $property [get_speed_models -patterns $model]] + lappend timing_line "$property:$value" + } + + puts $timing_fp $timing_line + } +} + +proc dump {} { + + set slicel_fp [open "slicel.txt" w] + set slicem_fp [open "slicem.txt" w] + set slicel_speed_models [get_speed_models -patterns *_sl_*] + set slicem_speed_models [get_speed_models -patterns *_sm_*] + + dump_model_timings $slicel_fp $slicel_speed_models + dump_model_timings $slicem_fp $slicem_speed_models + + close $slicel_fp + close $slicem_fp +} + +proc run {} { + create_design + place_and_route_design + dump + write_bitstream -force design.bit +} + +run diff --git a/fuzzers/007-timing/routing-bels/tim2sdf.py b/fuzzers/007-timing/routing-bels/tim2sdf.py new file mode 100644 index 00000000..96769341 --- /dev/null +++ b/fuzzers/007-timing/routing-bels/tim2sdf.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 + +import argparse +import json + + +def read_raw_timings(fin): + + timings = dict() + with open(fin, "r") as f: + for line in f: + + raw_data = line.split() + speed_model = raw_data[0] + + if speed_model.startswith('bel_d_'): + speed_model = speed_model[6:] + + if speed_model not in timings: + timings[speed_model] = dict() + + # each timing entry reports 5 delays + for d in range(0, 5): + (t, v) = raw_data[d + 1].split(':') + timings[speed_model][t] = v + + return timings + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--timings', type=str, help='Raw timing input file') + parser.add_argument('--json', type=str, help='json output file') + parser.add_argument( + '--debug', type=bool, default=False, help='Enable debug json dumps') + args = parser.parse_args() + + timings = read_raw_timings(args.timings) + with open(args.json, 'w') as fp: + json.dump(timings, fp, indent=4, sort_keys=True) + +if __name__ == '__main__': + main() diff --git a/fuzzers/007-timing/routing-bels/top.v b/fuzzers/007-timing/routing-bels/top.v new file mode 100644 index 00000000..a234addd --- /dev/null +++ b/fuzzers/007-timing/routing-bels/top.v @@ -0,0 +1,5 @@ +module top(input di, output do); + + assign do = di; + +endmodule From 94f3baf1576278a6684d17fab6dd17a47be0e5e3 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Thu, 20 Jun 2019 09:15:09 +0200 Subject: [PATCH 02/13] third-party: bump python-sdf-timing submodule Signed-off-by: Karol Gugala --- third_party/python-sdf-timing | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/python-sdf-timing b/third_party/python-sdf-timing index 95010bce..34fe2aba 160000 --- a/third_party/python-sdf-timing +++ b/third_party/python-sdf-timing @@ -1 +1 @@ -Subproject commit 95010bcea451ad8a5bf7308a80001d16012ae116 +Subproject commit 34fe2abae59b6b91e255177f70aef0646dffda2a From 2c1d4342b7c2659157f8da1521c208a123313231 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Thu, 20 Jun 2019 09:16:02 +0200 Subject: [PATCH 03/13] fuzzers: 007: format python Signed-off-by: Karol Gugala --- fuzzers/007-timing/routing-bels/tim2sdf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fuzzers/007-timing/routing-bels/tim2sdf.py b/fuzzers/007-timing/routing-bels/tim2sdf.py index 96769341..b41c6596 100644 --- a/fuzzers/007-timing/routing-bels/tim2sdf.py +++ b/fuzzers/007-timing/routing-bels/tim2sdf.py @@ -26,6 +26,7 @@ def read_raw_timings(fin): return timings + def main(): parser = argparse.ArgumentParser() parser.add_argument('--timings', type=str, help='Raw timing input file') @@ -38,5 +39,6 @@ def main(): with open(args.json, 'w') as fp: json.dump(timings, fp, indent=4, sort_keys=True) + if __name__ == '__main__': main() From b0cc42353ae41666743f2ca540ce0e5e5b62e2b6 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Thu, 20 Jun 2019 10:51:39 +0200 Subject: [PATCH 04/13] third-party: bump python-sdf-timing submodule Signed-off-by: Karol Gugala --- third_party/python-sdf-timing | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/python-sdf-timing b/third_party/python-sdf-timing index 34fe2aba..72176159 160000 --- a/third_party/python-sdf-timing +++ b/third_party/python-sdf-timing @@ -1 +1 @@ -Subproject commit 34fe2abae59b6b91e255177f70aef0646dffda2a +Subproject commit 72176159734da7f06122956b3925c7abb95f21d2 From cb3a2b42d76a7acc45846a48bff047a1f9978f2d Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Thu, 20 Jun 2019 10:53:22 +0200 Subject: [PATCH 05/13] fuzzers: 007: produce sdf files for routing bels Signed-off-by: Karol Gugala --- fuzzers/007-timing/routing-bels/Makefile | 10 ++-- fuzzers/007-timing/routing-bels/tim2sdf.py | 58 +++++++++++++++++++--- 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/fuzzers/007-timing/routing-bels/Makefile b/fuzzers/007-timing/routing-bels/Makefile index 91ca52fe..784fa3fe 100644 --- a/fuzzers/007-timing/routing-bels/Makefile +++ b/fuzzers/007-timing/routing-bels/Makefile @@ -1,13 +1,13 @@ -all: build/slicel.json build/slicem.json +all: build/slicel.sdf build/slicem.sdf clean: rm -rf build -build/slicel.json: build/slicel.txt - python3 tim2sdf.py --timings build/slicel.txt --json build/slicel.json +build/slicel.sdf: build/slicel.txt + python3 tim2sdf.py --timings build/slicel.txt --site slicel --sdf build/slicel.sdf -build/slicem.json: build/slicem.txt - python3 tim2sdf.py --timings build/slicem.txt --json build/slicem.json +build/slicem.sdf: build/slicem.txt + python3 tim2sdf.py --timings build/slicem.txt --site slicem --sdf build/slicem.sdf build/slicel.txt build/slicem.txt: bash runme.sh diff --git a/fuzzers/007-timing/routing-bels/tim2sdf.py b/fuzzers/007-timing/routing-bels/tim2sdf.py index b41c6596..2f51a33c 100644 --- a/fuzzers/007-timing/routing-bels/tim2sdf.py +++ b/fuzzers/007-timing/routing-bels/tim2sdf.py @@ -2,11 +2,29 @@ import argparse import json +from sdf_timing import sdfparse +from sdf_timing import utils -def read_raw_timings(fin): +def generate_sdf(timings, sdffile): + + sdf_data = sdfparse.emit(timings, timescale='1ns') + with open(sdffile, 'w') as fp: + fp.write(sdf_data) + + +def add_timing_paths_entry(paths, type, values): + paths[type] = dict() + paths[type]['min'] = values[0] + paths[type]['avg'] = values[1] + paths[type]['max'] = values[2] + return paths + + +def read_raw_timings(fin, site): timings = dict() + timings['cells'] = dict() with open(fin, "r") as f: for line in f: @@ -17,12 +35,33 @@ def read_raw_timings(fin): speed_model = speed_model[6:] if speed_model not in timings: - timings[speed_model] = dict() + timings['cells'][speed_model] = dict() + if site not in timings['cells'][speed_model]: + timings['cells'][speed_model][site] = dict() + + if speed_model not in timings['cells'][speed_model][site]: + timings['cells'][speed_model][site][speed_model] = dict() + + delays = dict() # each timing entry reports 5 delays for d in range(0, 5): (t, v) = raw_data[d + 1].split(':') - timings[speed_model][t] = v + delays[t] = v + + # create entry for sdf writer + port = dict() + port['port'] = speed_model + port['edge'] = None + paths = dict() + paths = add_timing_paths_entry( + paths, 'slow', [delays['SLOW_MIN'], None, delays['SLOW_MAX']]) + paths = add_timing_paths_entry( + paths, 'fast', [delays['FAST_MIN'], None, delays['FAST_MAX']]) + timings['cells'][speed_model][site][ + speed_model] = utils.add_device(port, paths) + timings['cells'][speed_model][site][speed_model][ + 'is_absolute'] = True return timings @@ -30,14 +69,19 @@ def read_raw_timings(fin): def main(): parser = argparse.ArgumentParser() parser.add_argument('--timings', type=str, help='Raw timing input file') - parser.add_argument('--json', type=str, help='json output file') + parser.add_argument('--sdf', type=str, help='output sdf file') + parser.add_argument( + '--site', type=str, help='Site of the processed timings') parser.add_argument( '--debug', type=bool, default=False, help='Enable debug json dumps') args = parser.parse_args() - timings = read_raw_timings(args.timings) - with open(args.json, 'w') as fp: - json.dump(timings, fp, indent=4, sort_keys=True) + timings = read_raw_timings(args.timings, args.site) + if args.debug: + with open("debug" + args.site + ".json", 'w') as fp: + json.dump(timings, fp, indent=4, sort_keys=True) + + generate_sdf(timings, args.sdf) if __name__ == '__main__': From a99e26bbd497c139e29867049fa4ff7ca9e43255 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Thu, 20 Jun 2019 13:35:02 +0200 Subject: [PATCH 06/13] fuzzers: 007: make both bels and routing-bels Signed-off-by: Karol Gugala --- fuzzers/007-timing/Makefile | 25 ++++++++++++++++++++++-- fuzzers/007-timing/bel/Makefile | 14 ++----------- fuzzers/007-timing/routing-bels/Makefile | 4 ++-- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/fuzzers/007-timing/Makefile b/fuzzers/007-timing/Makefile index 52202107..9d0225c8 100644 --- a/fuzzers/007-timing/Makefile +++ b/fuzzers/007-timing/Makefile @@ -1,10 +1,31 @@ +SLICEL_SDFS = bel/build/CLBLL_L.sdf bel/build/CLBLL_R.sdf bel/build/CLBLM_L.sdf bel/build/CLBLM_R.sdf routing-bels/build/slicel.sdf +SLICEM_SDFS = bel/build/CLBLL_L.sdf bel/build/CLBLL_R.sdf bel/build/CLBLM_L.sdf bel/build/CLBLM_R.sdf routing-bels/build/slicem.sdf + run: all -all: bel/build/sdf +all: pushdb touch run.ok clean: cd bel && $(MAKE) clean + cd routing-bels && $(MAKE) clean -bel/build/sdf: +bel/build/sdf.ok: cd bel && $(MAKE) +routing-bels/build/sdf: + cd routing-bels && $(MAKE) + +mergesdfs: bel/build/sdf.ok routing-bels/build/sdf + mkdir -p sdfs + python3 ${XRAY_UTILS_DIR}/sdfmerge.py --sdfs $(SLICEM_SDFS) --site SLICEM --out sdfs/slicem.sdf + python3 ${XRAY_UTILS_DIR}/sdfmerge.py --sdfs $(SLICEL_SDFS) --site SLICEL --out sdfs/slicel.sdf --json debu.json + cp bel/build/*.sdf sdfs + +pushdb: mergesdfs + mkdir -p ${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/timings + cp sdfs/*.sdf ${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/timings + touch run.ok + +cleandb: + rm -rf ${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/timings + diff --git a/fuzzers/007-timing/bel/Makefile b/fuzzers/007-timing/bel/Makefile index eda5433d..2b248e33 100644 --- a/fuzzers/007-timing/bel/Makefile +++ b/fuzzers/007-timing/bel/Makefile @@ -1,4 +1,4 @@ -all: pushdb +all: build/sdf clean: rm -rf build @@ -19,15 +19,5 @@ build/bel_timings.json: build/fixup_timings build/sdf: build/bel_timings.json python3 ${XRAY_UTILS_DIR}/makesdf.py --json=${PWD}/build/bel_timings.json --sdf=${PWD}/build + touch build/sdf.ok -cleandb: - rm -rf ${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/timings - -mergesdfs: build/sdf - python3 ${XRAY_UTILS_DIR}/sdfmerge.py --sdfs build/CLBLL_L.sdf build/CLBLL_R.sdf build/CLBLM_L.sdf build/CLBLM_R.sdf --site SLICEM --out build/slicem.sdf - python3 ${XRAY_UTILS_DIR}/sdfmerge.py --sdfs build/CLBLL_L.sdf build/CLBLL_R.sdf build/CLBLM_L.sdf build/CLBLM_R.sdf --site SLICEL --out build/slicel.sdf - -pushdb: mergesdfs - mkdir -p ${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/timings - cp build/*sdf ${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/timings - touch run.ok diff --git a/fuzzers/007-timing/routing-bels/Makefile b/fuzzers/007-timing/routing-bels/Makefile index 784fa3fe..0ed66695 100644 --- a/fuzzers/007-timing/routing-bels/Makefile +++ b/fuzzers/007-timing/routing-bels/Makefile @@ -4,10 +4,10 @@ clean: rm -rf build build/slicel.sdf: build/slicel.txt - python3 tim2sdf.py --timings build/slicel.txt --site slicel --sdf build/slicel.sdf + python3 tim2sdf.py --timings build/slicel.txt --site SLICEL --sdf build/slicel.sdf build/slicem.sdf: build/slicem.txt - python3 tim2sdf.py --timings build/slicem.txt --site slicem --sdf build/slicem.sdf + python3 tim2sdf.py --timings build/slicem.txt --site SLICEM --sdf build/slicem.sdf build/slicel.txt build/slicem.txt: bash runme.sh From 03252bc46fcf71cd167b996f13e1955d689a98c2 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Thu, 20 Jun 2019 13:37:14 +0200 Subject: [PATCH 07/13] fuzzers: 007: add gitignores Signed-off-by: Karol Gugala --- fuzzers/007-timing/.gitignore | 2 ++ fuzzers/007-timing/routing-bels/.gitignore | 1 + 2 files changed, 3 insertions(+) create mode 100644 fuzzers/007-timing/.gitignore create mode 100644 fuzzers/007-timing/routing-bels/.gitignore diff --git a/fuzzers/007-timing/.gitignore b/fuzzers/007-timing/.gitignore new file mode 100644 index 00000000..759ac773 --- /dev/null +++ b/fuzzers/007-timing/.gitignore @@ -0,0 +1,2 @@ +*.json +sdfs diff --git a/fuzzers/007-timing/routing-bels/.gitignore b/fuzzers/007-timing/routing-bels/.gitignore new file mode 100644 index 00000000..8d080e88 --- /dev/null +++ b/fuzzers/007-timing/routing-bels/.gitignore @@ -0,0 +1 @@ +*json From eaa8e50fe1798c07434a5c4d4a8e011eb849ed40 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Thu, 20 Jun 2019 13:40:17 +0200 Subject: [PATCH 08/13] utils: sdfmerge: use ns timescale Signed-off-by: Karol Gugala --- utils/sdfmerge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/sdfmerge.py b/utils/sdfmerge.py index b63cca27..2c7081fe 100644 --- a/utils/sdfmerge.py +++ b/utils/sdfmerge.py @@ -55,7 +55,7 @@ def main(): timings_list.append(timing) merged_sdf = merge(timings_list, args.site) - open(args.out, 'w').write(sdfparse.emit(merged_sdf)) + open(args.out, 'w').write(sdfparse.emit(merged_sdf, timescale='1ns')) if args.json is not None: with open(args.json, 'w') as fp: From 9658653da89b4dae61447c3c75c989a84cd25799 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Thu, 20 Jun 2019 19:23:09 +0200 Subject: [PATCH 09/13] fuzzers: bel: emit routing bels timings as INTERCONN Signed-off-by: Karol Gugala --- fuzzers/007-timing/routing-bels/tim2sdf.py | 40 +++++++++++++++------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/fuzzers/007-timing/routing-bels/tim2sdf.py b/fuzzers/007-timing/routing-bels/tim2sdf.py index 2f51a33c..56480059 100644 --- a/fuzzers/007-timing/routing-bels/tim2sdf.py +++ b/fuzzers/007-timing/routing-bels/tim2sdf.py @@ -34,14 +34,19 @@ def read_raw_timings(fin, site): if speed_model.startswith('bel_d_'): speed_model = speed_model[6:] - if speed_model not in timings: - timings['cells'][speed_model] = dict() + speed_model_split = speed_model.split('_') + interconn_input = "_".join(speed_model_split[1:-1]) + interconn_output = speed_model_split[-1] + celltype = "routing_bel" - if site not in timings['cells'][speed_model]: - timings['cells'][speed_model][site] = dict() + if celltype not in timings['cells']: + timings['cells'][celltype] = dict() - if speed_model not in timings['cells'][speed_model][site]: - timings['cells'][speed_model][site][speed_model] = dict() + if site not in timings['cells'][celltype]: + timings['cells'][celltype][site] = dict() + + if speed_model not in timings['cells'][celltype][site]: + timings['cells'][celltype][site][speed_model] = dict() delays = dict() # each timing entry reports 5 delays @@ -50,18 +55,27 @@ def read_raw_timings(fin, site): delays[t] = v # create entry for sdf writer - port = dict() - port['port'] = speed_model - port['edge'] = None + iport = dict() + iport['port'] = interconn_input + iport['port_edge'] = None + oport = dict() + oport['port'] = interconn_output + oport['port_edge'] = None paths = dict() paths = add_timing_paths_entry( paths, 'slow', [delays['SLOW_MIN'], None, delays['SLOW_MAX']]) paths = add_timing_paths_entry( paths, 'fast', [delays['FAST_MIN'], None, delays['FAST_MAX']]) - timings['cells'][speed_model][site][ - speed_model] = utils.add_device(port, paths) - timings['cells'][speed_model][site][speed_model][ - 'is_absolute'] = True + + if speed_model.endswith('diff'): + iport['port'] = "_".join(speed_model_split[1:]) + iport['port_edge'] = None + timings['cells'][celltype][site][ + speed_model] = utils.add_device(iport, paths) + else: + timings['cells'][celltype][site][ + speed_model] = utils.add_interconnect(iport, oport, paths) + timings['cells'][celltype][site][speed_model]['is_absolute'] = True return timings From 6cc614f1fbdae77019c8cb83735a48a34a5a62fe Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Thu, 20 Jun 2019 19:28:55 +0200 Subject: [PATCH 10/13] fuzzers: 007: fix BEL fuzzer Makefile Signed-off-by: Karol Gugala --- fuzzers/007-timing/bel/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fuzzers/007-timing/bel/Makefile b/fuzzers/007-timing/bel/Makefile index 2b248e33..b0cf9ff7 100644 --- a/fuzzers/007-timing/bel/Makefile +++ b/fuzzers/007-timing/bel/Makefile @@ -1,4 +1,4 @@ -all: build/sdf +all: build/sdf.ok clean: rm -rf build @@ -17,7 +17,7 @@ build/fixup_timings: build/bel_timings.txt build/bel_timings.json: build/fixup_timings python3 tim2json.py --timings=build/bel_timings.txt --json=build/bel_timings.json --properties=build/bel_properties.txt --propertiesmap=properties_map.json --pinaliasmap=pin_alias_map.json --belpins=build/bel_pins.txt --sitepins=build/tile_pins.txt --debug true -build/sdf: build/bel_timings.json +build/sdf.ok: build/bel_timings.json python3 ${XRAY_UTILS_DIR}/makesdf.py --json=${PWD}/build/bel_timings.json --sdf=${PWD}/build touch build/sdf.ok From fac9212751ab936c3592b82836983e536cbec44c Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Fri, 28 Jun 2019 22:38:32 +0200 Subject: [PATCH 11/13] third-party: bump python-sdf-timing submodule Signed-off-by: Karol Gugala --- third_party/python-sdf-timing | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/python-sdf-timing b/third_party/python-sdf-timing index 72176159..679152c9 160000 --- a/third_party/python-sdf-timing +++ b/third_party/python-sdf-timing @@ -1 +1 @@ -Subproject commit 72176159734da7f06122956b3925c7abb95f21d2 +Subproject commit 679152c9e6b92627cffba186618ab98ac29b627b From 28d961a65097a8d59f5a5d4e42b2f8b0c691a082 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Tue, 2 Jul 2019 13:08:14 +0200 Subject: [PATCH 12/13] fuzzers: routing BELs: group timings by interconn oputput Signed-off-by: Karol Gugala --- fuzzers/007-timing/routing-bels/tim2sdf.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/fuzzers/007-timing/routing-bels/tim2sdf.py b/fuzzers/007-timing/routing-bels/tim2sdf.py index 56480059..dd9e3f19 100644 --- a/fuzzers/007-timing/routing-bels/tim2sdf.py +++ b/fuzzers/007-timing/routing-bels/tim2sdf.py @@ -42,11 +42,13 @@ def read_raw_timings(fin, site): if celltype not in timings['cells']: timings['cells'][celltype] = dict() - if site not in timings['cells'][celltype]: - timings['cells'][celltype][site] = dict() + cellsite = site + '/' + interconn_output.upper() - if speed_model not in timings['cells'][celltype][site]: - timings['cells'][celltype][site][speed_model] = dict() + if cellsite not in timings['cells'][celltype]: + timings['cells'][celltype][cellsite] = dict() + + if speed_model not in timings['cells'][celltype][cellsite]: + timings['cells'][celltype][cellsite][speed_model] = dict() delays = dict() # each timing entry reports 5 delays @@ -70,12 +72,13 @@ def read_raw_timings(fin, site): if speed_model.endswith('diff'): iport['port'] = "_".join(speed_model_split[1:]) iport['port_edge'] = None - timings['cells'][celltype][site][ + timings['cells'][celltype][cellsite][ speed_model] = utils.add_device(iport, paths) else: - timings['cells'][celltype][site][ + timings['cells'][celltype][cellsite][ speed_model] = utils.add_interconnect(iport, oport, paths) - timings['cells'][celltype][site][speed_model]['is_absolute'] = True + timings['cells'][celltype][cellsite][speed_model][ + 'is_absolute'] = True return timings From 78346781ced9f7501e9408983b3722e27d6de8d6 Mon Sep 17 00:00:00 2001 From: Karol Gugala Date: Tue, 2 Jul 2019 19:04:10 +0200 Subject: [PATCH 13/13] fuzzers: 007: fix Makefile targets definitions Signed-off-by: Karol Gugala --- fuzzers/007-timing/Makefile | 1 - fuzzers/007-timing/bel/Makefile | 4 ++-- fuzzers/007-timing/routing-bels/Makefile | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fuzzers/007-timing/Makefile b/fuzzers/007-timing/Makefile index 9d0225c8..c164609e 100644 --- a/fuzzers/007-timing/Makefile +++ b/fuzzers/007-timing/Makefile @@ -3,7 +3,6 @@ SLICEM_SDFS = bel/build/CLBLL_L.sdf bel/build/CLBLL_R.sdf bel/build/CLBLM_L.sdf run: all all: pushdb - touch run.ok clean: cd bel && $(MAKE) clean diff --git a/fuzzers/007-timing/bel/Makefile b/fuzzers/007-timing/bel/Makefile index b0cf9ff7..7267b8d6 100644 --- a/fuzzers/007-timing/bel/Makefile +++ b/fuzzers/007-timing/bel/Makefile @@ -3,10 +3,10 @@ all: build/sdf.ok clean: rm -rf build -build/bel_timings.txt: +build/run.ok: bash runme.sh -build/fixup_timings: build/bel_timings.txt +build/fixup_timings: build/run.ok python3 fixup_timings_txt.py --txtin build/bel_timings.txt --txtout build/bel_timings.txt --site RAMBFIFO36E1 --slice BRAM_L --type timings python3 fixup_timings_txt.py --txtin build/bel_timings.txt --txtout build/bel_timings.txt --site RAMBFIFO36E1 --slice BRAM_R --type timings python3 fixup_timings_txt.py --txtin build/bel_pins.txt --txtout build/bel_pins.txt --site RAMBFIFO36E1 --slice BRAM_L --type pins diff --git a/fuzzers/007-timing/routing-bels/Makefile b/fuzzers/007-timing/routing-bels/Makefile index 0ed66695..ed041a1a 100644 --- a/fuzzers/007-timing/routing-bels/Makefile +++ b/fuzzers/007-timing/routing-bels/Makefile @@ -3,13 +3,13 @@ all: build/slicel.sdf build/slicem.sdf clean: rm -rf build -build/slicel.sdf: build/slicel.txt +build/slicel.sdf: build/run.ok python3 tim2sdf.py --timings build/slicel.txt --site SLICEL --sdf build/slicel.sdf -build/slicem.sdf: build/slicem.txt +build/slicem.sdf: build/run.ok python3 tim2sdf.py --timings build/slicem.txt --site SLICEM --sdf build/slicem.sdf -build/slicel.txt build/slicem.txt: +build/run.ok: bash runme.sh cleandb: