Skip to content

Commit 74af186

Browse files
authored
Connect the outermost cells to the clock. (#95)
* Connect the outermost cells to the clock. Extrapolation of the clock wires to the outermost cells. This is essentially an old fuzzer with a presumed location of the clock wires. The probability of misplacement exists, but it is small. Signed-off-by: YRabbit <[email protected]> * Fix the rightmost branch only Signed-off-by: YRabbit <[email protected]>
1 parent b4f343e commit 74af186

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

apycula/clock_fuzzer.py

+15-5
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,23 @@ def spine_aliases(quads, dests, clks):
266266
aliases[spine_row, tap, dest] = ct[0], ct[1], dest
267267
return aliases
268268

269+
# add border cells
270+
def add_rim(rows, cols):
271+
if 1 in rows:
272+
rows.add(0)
273+
else:
274+
# XXX fill all rows
275+
rows.update({row for row in range(max(rows) + 1, db.rows)})
276+
if 1 in cols:
277+
cols.add(0)
278+
elif db.cols - 2 in cols:
279+
cols.add(db.cols - 1)
280+
return rows, cols
281+
269282
def tap_aliases(quads):
270283
aliases = {}
271284
for _, (rows, cols, spine_row) in quads.items():
285+
add_rim(rows, cols)
272286
for col in cols:
273287
for row in rows:
274288
for src in ["GT00", "GT10"]:
@@ -286,6 +300,7 @@ def branch_aliases(quads, clks):
286300
else:
287301
src = "GBO1"
288302
for tap, branch_cols in taps.items():
303+
add_rim(rows, branch_cols)
289304
for row in rows:
290305
for col in branch_cols:
291306
aliases[row, col, f"GB{clk}0"] = row, tap, src
@@ -308,11 +323,6 @@ def branch_aliases(quads, clks):
308323

309324
clks[ct] = taps(rows, cols)
310325

311-
for _, cols, _ in quads.values():
312-
# col 0 contains a tap, but not a dff
313-
if 1 in cols:
314-
cols.add(0)
315-
316326
print(" quads =", quads)
317327
print(" srcs =", srcs)
318328
print(" dests =", dests)

0 commit comments

Comments
 (0)