23 lines
1.1 KiB
Python
23 lines
1.1 KiB
Python
dimension = 10
|
|
spacing_between_rows = 10
|
|
spacing_between_columns = 10
|
|
cell_starting_point = (30, 30)
|
|
|
|
limit_type = "guide"
|
|
|
|
f = open("output.txt", "w")
|
|
# f.write(f"create_{limit_type} -name guts/link_upstream -area {cell_starting_point[0]} {cell_starting_point[0]} {cell_starting_point[0] + 150} {cell_starting_point[1] - 5} \\n\n")
|
|
# f.write(f"create_{limit_type} -name guts/link_downstream -area {cell_starting_point[0] + 160} {cell_starting_point[0]} {cell_starting_point[0] + 160 + 500} {cell_starting_point[1] - 5} \\n\n")
|
|
f.write("")
|
|
f.close()
|
|
|
|
for i in range(32):
|
|
for j in range(32):
|
|
part_1 = f"create_{limit_type} -name guts/n[0].clnt.clnt/genblk1.cgol_inst/cell_array/gen_rows[{i}].gen_cols[{j}].life_cell -area "
|
|
lower_left = (cell_starting_point[0] + i * (dimension + spacing_between_rows), cell_starting_point[1] + j * (dimension + spacing_between_columns))
|
|
upper_right = (lower_left[0] + dimension, lower_left[1] + dimension)
|
|
part_2 = f"{lower_left[0]} {lower_left[1]} {upper_right[0]} {upper_right[1]} \\n\n"
|
|
f = open("output.txt", "a")
|
|
f.write(part_1 + part_2)
|
|
f.close()
|