.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_openfpga_basic/01_fpga_arch_parse.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_01_fpga_arch_parse.py: ============================= OpenFPGA architecture parsing ============================= This example demonstrates the ``OpenFPGA_Arch`` class which parses the `VPR` and `OpenFPGA` Architecture file and provides logical information. .. GENERATED FROM PYTHON SOURCE LINES 10-30 .. code-block:: Python import os import logging import spydrnet as sdn from spydrnet_physical.util import OpenFPGA_Arch # Enable output logging logger = logging.getLogger("spydrnet_logs") sdn.enable_file_logging(LOG_LEVEL="INFO", filename="01_fpga_arch_parse") # Read OpenFPGA and VPR architectue file task_dir = ("..", "homogeneous_fabric", "FPGA44_Task") vpr_arch = os.path.join(*task_dir, "arch", "k6_N10_tileable.xml") openfpga_arch = os.path.join(*task_dir, "arch", "k6_N10_openfpga.xml") fpga_arch = OpenFPGA_Arch(vpr_arch, openfpga_arch, layout="4x4") # Print avaialble layouts and pb_types in the file logger.info(fpga_arch.get_layouts()) logger.info(fpga_arch.pb_types) # logger.info(fpga_arch.is_homogeneous()) .. GENERATED FROM PYTHON SOURCE LINES 31-37 Output ------ .. literalinclude:: ../../../examples/OpenFPGA_basic/_01_fpga_arch_parse_spydrnet.log .. _sphx_glr_download_auto_openfpga_basic_01_fpga_arch_parse.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 01_fpga_arch_parse.ipynb <01_fpga_arch_parse.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 01_fpga_arch_parse.py <01_fpga_arch_parse.py>` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: 01_fpga_arch_parse.zip <01_fpga_arch_parse.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_