mirror of https://github.com/openXC7/prjxray.git
Add _ACTIVE bits to HROW bits.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
parent
52f6f092ce
commit
73a5c04544
|
|
@ -215,7 +215,7 @@ def propagate_rebuf(database, tiles_by_grid):
|
|||
""" Writing a fuzzer for the CLK_BUFG_REBUF tiles is hard, so propigate from CLK_HROW tiles.
|
||||
|
||||
In the clock column, there is a CLK_BUFG_REBUF above and below the CLK_HROW
|
||||
tile. Each clock column appears to use the same offsets, so propigdate
|
||||
tile. Each clock column appears to use the same offsets, so propigate
|
||||
the base address and frame count, and update the offset and word count.
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ MAKETODO_FLAGS=--no-l --pip-type clk_hrow_bot --seg-type clk_hrow_bot --re "[^\.
|
|||
N = 50
|
||||
|
||||
# These PIPs all appear to be either a 0 or 2 bit solution.
|
||||
SEGMATCH_FLAGS=-m 20 -M 45 -c 2
|
||||
SEGMATCH_FLAGS=-m 20 -M 45 -c 1
|
||||
SPECIMENS_DEPS=build/cmt_regions.csv
|
||||
A_PIPLIST=clk_hrow_bot_r.txt
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ build/cmt_regions.csv: output_cmt.tcl
|
|||
cd build/ && ${XRAY_VIVADO} -mode batch -source ${FUZDIR}/output_cmt.tcl
|
||||
|
||||
build/segbits_clk_hrow.rdb: $(SPECIMENS_OK)
|
||||
${XRAY_SEGMATCH} -o build/segbits_clk_hrow.rdb \
|
||||
${XRAY_SEGMATCH} ${SEGMATCH_FLAGS} -o build/segbits_clk_hrow.rdb \
|
||||
$(addsuffix /segdata_clk_hrow_top_r.txt,$(SPECIMENS)) \
|
||||
$(addsuffix /segdata_clk_hrow_bot_r.txt,$(SPECIMENS))
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ def main():
|
|||
table = clk_table.get_clk_table()
|
||||
|
||||
print("Loading tags from design.txt.")
|
||||
|
||||
active_gclks = {}
|
||||
active_clks = {}
|
||||
with open("design.txt", "r") as f:
|
||||
for line in f:
|
||||
tile, pip, src, dst, pnum, pdir = line.split()
|
||||
|
|
@ -44,6 +47,30 @@ def main():
|
|||
segmk.add_tile_tag(
|
||||
tile, '{}.HCLK_ENABLE_COLUMN{}'.format(dst, column), 0)
|
||||
|
||||
if tile not in active_clks:
|
||||
active_clks[tile] = set()
|
||||
|
||||
active_clks[tile].add(src)
|
||||
|
||||
if 'GCLK' in src:
|
||||
if src not in active_gclks:
|
||||
active_gclks[src] = set()
|
||||
|
||||
active_gclks[src].add(tile)
|
||||
|
||||
tiles = sorted(active_clks.keys())
|
||||
|
||||
for tile in active_clks:
|
||||
for src in table:
|
||||
if 'GCLK' not in src:
|
||||
active = src in active_clks[tile]
|
||||
segmk.add_tile_tag(tile, '{}_ACTIVE'.format(src), active)
|
||||
else:
|
||||
if src not in active_gclks:
|
||||
segmk.add_tile_tag(tile, '{}_ACTIVE'.format(src), 0)
|
||||
elif tile in active_gclks[src]:
|
||||
segmk.add_tile_tag(tile, '{}_ACTIVE'.format(src), 1)
|
||||
|
||||
segmk.compile()
|
||||
segmk.write()
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ def main():
|
|||
|
||||
args = parser.parse_args()
|
||||
|
||||
output_features = []
|
||||
hrow_outs = {}
|
||||
tile = None
|
||||
with open(args.in_segbit) as f:
|
||||
|
|
@ -19,6 +20,11 @@ def main():
|
|||
feature = parts[0]
|
||||
bits = ' '.join(parts[1:])
|
||||
|
||||
# No post-processing on _ACTIVE bits.
|
||||
if feature.endswith('_ACTIVE'):
|
||||
output_features.append(l.strip())
|
||||
continue
|
||||
|
||||
tile1, dst, src = feature.split('.')
|
||||
if tile is None:
|
||||
tile = tile1
|
||||
|
|
@ -53,6 +59,9 @@ def main():
|
|||
table = clk_table.get_clk_table()
|
||||
|
||||
with open(args.out_segbit, 'w') as f:
|
||||
for l in output_features:
|
||||
print(l, file=f)
|
||||
|
||||
for dst in sorted(hrow_outs):
|
||||
for src in sorted(piplists[dst]):
|
||||
if src not in table:
|
||||
|
|
|
|||
Loading…
Reference in New Issue