From 1780f42b9a7854a8a7bf1f2d6589d3d35f133f87 Mon Sep 17 00:00:00 2001 From: David Shah Date: Fri, 14 Dec 2018 13:41:28 +0000 Subject: ice40: Add examples folder including floorplan example Signed-off-by: David Shah --- ice40/examples/floorplan/floorplan.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 ice40/examples/floorplan/floorplan.py (limited to 'ice40/examples/floorplan/floorplan.py') 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") -- cgit v1.2.3