LUT5: fix L/M postfix

Signed-off-by: John McMaster <JohnDMcMaster@gmail.com>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
This commit is contained in:
John McMaster 2017-11-10 19:01:45 -08:00 committed by Tim 'mithro' Ansell
parent 61c51d6a15
commit 7b5b1ffc5b
3 changed files with 31 additions and 16 deletions

View File

@ -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,,$@)

View File

@ -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()

View File

@ -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