mirror of https://github.com/openXC7/prjxray.git
Merge pull request #163 from mcmasterg/fix_019_ndi1mux
019-ndi1mux: query SLICEM instead of guessing
This commit is contained in:
commit
56e40a24d7
|
|
@ -25,8 +25,6 @@ CLBN = 50
|
||||||
print('//Requested CLBs: %s' % str(CLBN))
|
print('//Requested CLBs: %s' % str(CLBN))
|
||||||
|
|
||||||
|
|
||||||
# Rearranged to sweep Y so that carry logic is easy to allocate
|
|
||||||
# XXX: careful...if odd number of Y in ROI will break carry
|
|
||||||
def gen_slicems():
|
def gen_slicems():
|
||||||
for _tile_name, site_name, _site_type in util.gen_sites(['SLICEM']):
|
for _tile_name, site_name, _site_type in util.gen_sites(['SLICEM']):
|
||||||
yield site_name
|
yield site_name
|
||||||
|
|
|
||||||
|
|
@ -2,48 +2,15 @@ import random
|
||||||
random.seed(0)
|
random.seed(0)
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
from prjxray import util
|
||||||
|
|
||||||
def slice_xy():
|
|
||||||
'''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)'''
|
|
||||||
# SLICE_X12Y100:SLICE_X27Y149
|
|
||||||
# Note XRAY_ROI_GRID_* is something else
|
|
||||||
m = re.match(
|
|
||||||
r'SLICE_X([0-9]*)Y([0-9]*):SLICE_X([0-9]*)Y([0-9]*)',
|
|
||||||
os.getenv('XRAY_ROI'))
|
|
||||||
ms = [int(m.group(i + 1)) for i in range(4)]
|
|
||||||
return ((ms[0], ms[2] + 1), (ms[1], ms[3] + 1))
|
|
||||||
|
|
||||||
|
|
||||||
CLBN = 50
|
CLBN = 50
|
||||||
SLICEX, SLICEY = slice_xy()
|
|
||||||
# 800
|
|
||||||
SLICEN = (SLICEY[1] - SLICEY[0]) * (SLICEX[1] - SLICEX[0])
|
|
||||||
print('//SLICEX: %s' % str(SLICEX))
|
|
||||||
print('//SLICEY: %s' % str(SLICEY))
|
|
||||||
print('//SLICEN: %s' % str(SLICEN))
|
|
||||||
print('//Requested CLBs: %s' % str(CLBN))
|
print('//Requested CLBs: %s' % str(CLBN))
|
||||||
|
|
||||||
|
|
||||||
# Rearranged to sweep Y so that carry logic is easy to allocate
|
|
||||||
# XXX: careful...if odd number of Y in ROI will break carry
|
|
||||||
def gen_slicems():
|
def gen_slicems():
|
||||||
'''
|
for _tile_name, site_name, _site_type in util.gen_sites(['SLICEM']):
|
||||||
SLICEM at the following:
|
yield site_name
|
||||||
SLICE_XxY*
|
|
||||||
Where Y any value
|
|
||||||
x
|
|
||||||
Always even (ie 100, 102, 104, etc)
|
|
||||||
In our ROI
|
|
||||||
x = 6, 8, 10, 12, 14
|
|
||||||
'''
|
|
||||||
# TODO: generate this from DB
|
|
||||||
assert ((12, 28) == SLICEX)
|
|
||||||
for slicex in (12, 14):
|
|
||||||
for slicey in range(*SLICEY):
|
|
||||||
# caller may reject position if needs more room
|
|
||||||
#yield ("SLICE_X%dY%d" % (slicex, slicey), (slicex, slicey))
|
|
||||||
yield "SLICE_X%dY%d" % (slicex, slicey)
|
|
||||||
|
|
||||||
|
|
||||||
DIN_N = CLBN * 8
|
DIN_N = CLBN * 8
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue