2.5. FPGA Instance to Layout mappingΒΆ

_complete_metrics

EMPTY     EMPTY     io_1__5_  EMPTY     io_2__5_  EMPTY     io_3__5_  EMPTY     io_4__5_  EMPTY     EMPTY     
EMPTY     sb_0__4_  cbx_1__4_ sb_1__4_  cbx_2__4_ sb_2__4_  cbx_3__4_ sb_3__4_  cbx_4__4_ sb_4__4_  EMPTY     
io_0__4_  cby_0__4_ clb_1__4_ cby_1__4_ clb_2__4_ cby_2__4_ clb_3__4_ cby_3__4_ clb_4__4_ cby_4__4_ io_5__4_  
EMPTY     sb_0__3_  cbx_1__3_ sb_1__3_  cbx_2__3_ sb_2__3_  cbx_3__3_ sb_3__3_  cbx_4__3_ sb_4__3_  EMPTY     
io_0__3_  cby_0__3_ clb_1__3_ cby_1__3_ clb_2__3_ cby_2__3_ clb_3__3_ cby_3__3_ clb_4__3_ cby_4__3_ io_5__3_  
EMPTY     sb_0__2_  cbx_1__2_ sb_1__2_  cbx_2__2_ sb_2__2_  cbx_3__2_ sb_3__2_  cbx_4__2_ sb_4__2_  EMPTY     
io_0__2_  cby_0__2_ clb_1__2_ cby_1__2_ clb_2__2_ cby_2__2_ clb_3__2_ cby_3__2_ clb_4__2_ cby_4__2_ io_5__2_  
EMPTY     sb_0__1_  cbx_1__1_ sb_1__1_  cbx_2__1_ sb_2__1_  cbx_3__1_ sb_3__1_  cbx_4__1_ sb_4__1_  EMPTY     
io_0__1_  cby_0__1_ clb_1__1_ cby_1__1_ clb_2__1_ cby_2__1_ clb_3__1_ cby_3__1_ clb_4__1_ cby_4__1_ io_5__1_  
EMPTY     sb_0__0_  cbx_1__0_ sb_1__0_  cbx_2__0_ sb_2__0_  cbx_3__0_ sb_3__0_  cbx_4__0_ sb_4__0_  EMPTY     
EMPTY     EMPTY     io_1__0_  EMPTY     io_2__0_  EMPTY     io_3__0_  EMPTY     io_4__0_  EMPTY     EMPTY     
import glob
import logging
import tempfile

import spydrnet as sdn
from spydrnet_physical.util import OpenFPGA, FPGAGridGen

logger = logging.getLogger("spydrnet_logs")
sdn.enable_file_logging(LOG_LEVEL="INFO")


def main():
    proj = "../homogeneous_fabric"
    source_files = glob.glob(f"{proj}/*_Verilog/lb/*.v")
    source_files += glob.glob(f"{proj}/*_Verilog/routing/*.v")
    source_files += glob.glob(f"{proj}/*_Verilog/sub_module/*.v")
    source_files += glob.glob(f"{proj}/*_Verilog/fpga_top.v")

    # Create OpenFPGA object
    fpga = OpenFPGA(grid=(4, 4), verilog_files=source_files)

    fpga_grid = FPGAGridGen(
        design_name="FPGA4x4",
        layout="4x4",
        arch_file=f"{proj}/FPGA44_Task/arch/k6_N10_tileable.xml",
        release_root=None,
    )
    fpga_grid.enumerate_grid()
    fpga.load_grid(fpga_grid)

    with open("_complete_metrics_dp.txt", "w", encoding="UTF-8") as fpw:
        for indx_y in range(10, -1, -1):
            for index_x in range(0, 11):
                fpw.write(f"{fpga.get_top_instance(index_x, indx_y):10}")
            fpw.write("\n")


if __name__ == "__main__":
    main()

Total running time of the script: ( 0 minutes 0.000 seconds)

Gallery generated by Sphinx-Gallery