aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/examples/floorplan/floorplan.py
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/examples/floorplan/floorplan.py')
-rw-r--r--ice40/examples/floorplan/floorplan.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ice40/examples/floorplan/floorplan.py b/ice40/examples/floorplan/floorplan.py
new file mode 100644
index 00000000..85c53ccd
--- /dev/null
+++ b/ice40/examples/floorplan/floorplan.py
@@ -0,0 +1,5 @@
+ctx.createRectangularRegion("osc", 1, 1, 1, 4)
+for cell, cellinfo in ctx.cells:
+ if "ringosc" in cellinfo.attrs:
+ print("Floorplanned cell %s" % cell)
+ ctx.constrainCellToRegion(cell, "osc")