From 7b5b1ffc5b92e1c5a57532df44d10fabe56c8a56 Mon Sep 17 00:00:00 2001 From: John McMaster Date: Fri, 10 Nov 2017 19:01:45 -0800 Subject: [PATCH] LUT5: fix L/M postfix Signed-off-by: John McMaster Signed-off-by: Tim 'mithro' Ansell --- fuzzers/012-lut5/Makefile | 20 ++++++++++++-------- fuzzers/012-lut5/generate.py | 11 ++++++++++- fuzzers/012-lut5/generate.tcl | 16 +++++++++------- 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/fuzzers/012-lut5/Makefile b/fuzzers/012-lut5/Makefile index b3216fe6..39d213eb 100644 --- a/fuzzers/012-lut5/Makefile +++ b/fuzzers/012-lut5/Makefile @@ -1,15 +1,19 @@ -N := 1 +# SLICEM takes a while to converge +N := 10 SPECIMENS := $(addprefix specimen_,$(shell seq -f '%03.0f' $(N))) SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS)) -database: $(SPECIMENS_OK) - ../../tools/segmatch -o seg_clbll.segbits \ - $(addsuffix /segdata_clbll.txt,$(SPECIMENS)) - ../../tools/segmatch -o seg_clblm.segbits \ - $(addsuffix /segdata_clblm.txt,$(SPECIMENS)) +database: database/clbll database/clblm -pushdb: - cp tilegrid.json ../../database/$(XRAY_DATABASE)/tilegrid.json +pushdb: pushdb/clbll pushdb/clblm + +database/%: $(SPECIMENS_OK) + ../../tools/segmatch -o seg_$(notdir $@).segbits \ + $(addsuffix /segdata_$(notdir $@).txt,$(SPECIMENS)) + +pushdb/%: + bash ../../utils/mergedb.sh seg_$(notdir $@).segbits \ + ../../database/$(XRAY_DATABASE)/seg_$(notdir $@).segbits $(SPECIMENS_OK): bash generate.sh $(subst /OK,,$@) diff --git a/fuzzers/012-lut5/generate.py b/fuzzers/012-lut5/generate.py index 6ec95cbf..defbdae7 100644 --- a/fuzzers/012-lut5/generate.py +++ b/fuzzers/012-lut5/generate.py @@ -16,19 +16,28 @@ with open("design.txt", "r") as f: CLBLM_L CLBLM_L_X10Y112 30 39 SLICE_X13Y112/A6LUT LUT6 CLBLM_L CLBLM_L_X10Y112 30 39 SLICE_X12Y112/C6LUT LUT_OR_MEM6 CLBLM_L CLBLM_L_X10Y145 30 5 SLICE_X12Y145/D5LUT LUT_OR_MEM5 + + updated + CLBLM_L CLBLM_L_X10Y149 30 1 SLICE_X12Y149/C6LUT LUT_OR_MEM6 SLICEM.C6LUT ''' line = line.split() tile_type = line[0] tile_name = line[1] grid_x = line[2] grid_y = line[3] + # Other code uses BEL name site_lut_name = line[4] site, lut_name = site_lut_name.split('/') lut_type = line[5] + # SLICEL.A6LUT + cell_bel = line[6] + slicelm = cell_bel.split('.')[0] which = lut_name[0] is_lut5 = lut_type in ('LUT5', 'LUT_OR_MEM5') - segmk.addtag(site, "%cLUT5" % which, is_lut5) + site_mod = site + '.' + slicelm + site_mod = site + segmk.addtag(site, slicelm + '.' + "%cLUT5" % which, is_lut5) segmk.compile() segmk.write() diff --git a/fuzzers/012-lut5/generate.tcl b/fuzzers/012-lut5/generate.tcl index 0826eded..cc543186 100644 --- a/fuzzers/012-lut5/generate.tcl +++ b/fuzzers/012-lut5/generate.tcl @@ -48,14 +48,16 @@ foreach lut $luts { set fp [open "design.txt" w] foreach lut $luts { - set tile [get_tile -of_objects $lut] - set grid_x [get_property GRID_POINT_X $tile] - set grid_y [get_property GRID_POINT_Y $tile] - set type [get_property TYPE $tile] - set lut_type [get_property TYPE $lut] - if [get_property IS_USED $lut] { - puts $fp "$type $tile $grid_x $grid_y $lut $lut_type" + set tile [get_tile -of_objects $lut] + set grid_x [get_property GRID_POINT_X $tile] + set grid_y [get_property GRID_POINT_Y $tile] + set type [get_property TYPE $tile] + set lut_type [get_property TYPE $lut] + set lutc [get_cells -of_objects $lut] + set cell_bel [get_property BEL $lutc] + + puts $fp "$type $tile $grid_x $grid_y $lut $lut_type $cell_bel" } } close $fp