| // Copyright 2020 Project U-Ray Authors |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| package dev.fpga.rapidwright; |
| |
| import com.xilinx.rapidwright.design.*; |
| import com.xilinx.rapidwright.device.Site; |
| import com.xilinx.rapidwright.device.SiteTypeEnum; |
| import com.xilinx.rapidwright.device.Tile; |
| |
| import java.io.FileWriter; |
| import java.io.IOException; |
| import java.io.PrintWriter; |
| |
| public class dump_tiles { |
| public static void main(String[] args) throws IOException { |
| Design des = new Design("top", "xczu7ev-ffvc1156-2-e"); |
| FileWriter vf = new FileWriter("/tiles.txt", false); |
| PrintWriter v = new PrintWriter(vf); |
| |
| for (Tile t : des.getDevice().getAllTiles()) { |
| v.printf("%d,%d,%s,%s", t.getColumn(), t.getRow(), t.getName(), t.getTileTypeEnum().toString()); |
| for (Site s : t.getSites()) { |
| v.printf(",%s:%s", s.getName(), s.getSiteTypeEnum().toString()); |
| } |
| v.println(); |
| } |
| } |
| } |