.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_openfpga_basic/08_grid_floor_plan_example.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_openfpga_basic_08_grid_floor_plan_example.py: ========================= Grid Floorplan Generator ========================= This example demostrates how the grided floorplan is generated using ``GridFloorplanGen`` class .. image:: ../../../examples/OpenFPGA_basic/_grid_floorplan.svg :width: 70% :align: center .. GENERATED FROM PYTHON SOURCE LINES 15-36 .. code-block:: Python from spydrnet_physical.util import GridFloorplanGen def main(): """ Main method """ grid_plan = GridFloorplanGen(8, 8) grid_plan.offset_x = 50 grid_plan.offset_y = 50 grid_plan.set_column_width(1, 200) grid_plan.set_column_width(-1, 200) grid_plan.set_row_height(1, 200) grid_plan.set_row_height(-1, 200) dwg = grid_plan.render_grid() dwg.saveas("_grid_floorplan.svg", pretty=True, indent=4) if __name__ == "__main__": main() .. _sphx_glr_download_auto_openfpga_basic_08_grid_floor_plan_example.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 08_grid_floor_plan_example.ipynb <08_grid_floor_plan_example.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 08_grid_floor_plan_example.py <08_grid_floor_plan_example.py>` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: 08_grid_floor_plan_example.zip <08_grid_floor_plan_example.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_