def run(json_in_fn, json_out_fn, verbose=False): # Load input files database = json.load(open(json_in_fn, "r")) tiles_by_grid = make_tiles_by_grid(database) tile_frames_map = localutil.TileFrames() propagate_INT_lr_bits(database, tiles_by_grid, tile_frames_map, verbose=verbose) propagate_INT_bits_in_column(database, tiles_by_grid, tile_frames_map) propagate_INT_INTERFACE_bits_in_column(database, tiles_by_grid, "GTP_INT_INTERFACE", tile_frames_map) propagate_INT_INTERFACE_bits_in_column(database, tiles_by_grid, "PCIE_INT_INTERFACE", tile_frames_map) propagate_rebuf(database, tiles_by_grid) propagate_IOB_SING(database, tiles_by_grid) propagate_IOI_SING(database, tiles_by_grid) propagate_IOI_Y9(database, tiles_by_grid) alias_HCLKs(database) # Save xjson.pprint(open(json_out_fn, "w"), database)
def run(fn_in, fn_out, verbose=False): database = json.load(open(fn_in, "r")) int_frames, int_words = localutil.get_entry('INT', 'CLB_IO_CLK') rclk_frames, rclk_words = localutil.get_entry('RCLK_INT_L', 'CLB_IO_CLK') ps8_intf_frames, ps8_intf_words = localutil.get_entry( "PS8_INTF", "CLB_IO_CLK") xiphy_frames, xiphy_words = localutil.get_entry("XIPHY", "CLB_IO_CLK") build_dir = "build_" + os.getenv('URAY_PART') tdb_fns = [ ("cle/" + build_dir + "/segbits_tilegrid.tdb", 16, 3), ("clem_r/" + build_dir + "/segbits_tilegrid.tdb", 16, 3), ("clel_int/" + build_dir + "/segbits_tilegrid.tdb", int_frames, int_words), ("clem_int/" + build_dir + "/segbits_tilegrid.tdb", int_frames, int_words), ("rclk_int/" + build_dir + "/segbits_tilegrid.tdb", rclk_frames, rclk_words), ("rclk_other/" + build_dir + "/segbits_tilegrid.tdb", rclk_frames, rclk_words), ("rclk_hdio/" + build_dir + "/segbits_tilegrid.tdb", rclk_frames, rclk_words), ("rclk_dsp_intf_clkbuf/" + build_dir + "/segbits_tilegrid.tdb", rclk_frames, rclk_words), ("rclk_pss_alto/" + build_dir + "/segbits_tilegrid.tdb", rclk_frames, rclk_words), ("intf_r_pcie4_hdio/" + build_dir + "/segbits_tilegrid.tdb", None, 3), ("ps8_intf/" + build_dir + "/segbits_tilegrid.tdb", ps8_intf_frames, ps8_intf_words), ("cmt_right/" + build_dir + "/segbits_tilegrid.tdb", None, 10), ("pss_alto/" + build_dir + "/segbits_tilegrid.tdb", None, 93 * 2), ("hdio_top_right/" + build_dir + "/segbits_tilegrid.tdb", None, 87), ("hdio_bot_right/" + build_dir + "/segbits_tilegrid.tdb", None, 87), ("hpio_right/" + build_dir + "/segbits_tilegrid.tdb", None, 85), ("bitslice_tiles/" + build_dir + "/segbits_tilegrid.tdb", xiphy_frames, xiphy_words), ("bram/" + build_dir + "/segbits_tilegrid.tdb", None, 15), ("bram_block/" + build_dir + "/segbits_tilegrid.tdb", None, 15), ] tile_frames_map = localutil.TileFrames() for (tdb_fn, frames, words) in tdb_fns: if not os.path.exists(tdb_fn): verbose and print('Skipping {}, file not found!'.format(tdb_fn)) continue for (tile, frame, wordidx) in load_db(tdb_fn): tilej = database[tile] verbose and print("Add %s %08X_%03u" % (tile, frame, wordidx)) localutil.add_tile_bits(tile, tilej, frame, wordidx, frames, words, tile_frames_map) # Save json.dump(database, open(fn_out, "w"), sort_keys=True, indent=4, separators=(",", ": "))
def run(fn_in, fn_out, verbose=False): database = json.load(open(fn_in, "r")) # Load a map of sites to base addresses # Need to figure out the # FIXME: generate frames from part file (or equivilent) # See https://github.com/SymbiFlow/prjxray/issues/327 # FIXME: generate words from pitch int_frames, int_words = localutil.get_int_params() tdb_fns = [ ("iob", 42, 4), ("ioi", 42, 4), ("mmcm", 30, 49), ("pll", 30, 27), ("monitor", 30, 101), ("bram", 28, 10), ("bram_block", 128, 10), ("clb", 36, 2), ("cfg", 30, 101), ("dsp", 28, 10), ("clk_hrow", 30, 18), ("clk_bufg", 30, 8), ("hclk_cmt", 30, 10), ("hclk_ioi", 42, 1), ("pcie", 36, 101), ("gtp_common", 32, 101), ("gtp_channel", 32, 22), ("clb_int", int_frames, int_words), ("iob_int", int_frames, int_words), ("bram_int", int_frames, int_words), ("dsp_int", int_frames, int_words), ("fifo_int", int_frames, int_words), ("ps7_int", int_frames, int_words), ("cfg_int", int_frames, int_words), ("monitor_int", int_frames, int_words), ("orphan_int_column", int_frames, int_words), ("gtp_int_interface", int_frames, int_words), ("pcie_int_interface", int_frames, int_words), ] tile_frames_map = localutil.TileFrames() for (subdir, frames, words) in tdb_fns: tdb_fn = os.path.join(subdir, 'build_{}'.format(os.environ['XRAY_PART']), 'segbits_tilegrid.tdb') if not os.path.exists(tdb_fn): verbose and print('Skipping {}, file not found!'.format(tdb_fn)) continue for (tile, frame, wordidx) in load_db(tdb_fn): tilej = database[tile] verbose and print("Add %s %08X_%03u" % (tile, frame, wordidx)) localutil.add_tile_bits(tile, tilej, frame, wordidx, frames, words, tile_frames_map) # Save xjson.pprint(open(fn_out, "w"), database)
def run(json_in_fn, json_out_fn, verbose=False): # Load input files database = json.load(open(json_in_fn, "r")) tiles_by_grid = make_tiles_by_grid(database) tile_frames_map = localutil.TileFrames() propagate_INT_bits_in_column(database, tiles_by_grid, tile_frames_map) propagate_PS8_INTF_bits_in_column(database, tiles_by_grid, tile_frames_map) propagate_RCLK_bits_in_row(database, tiles_by_grid, tile_frames_map) propagate_XIPHY_bits_in_column(database, tiles_by_grid, tile_frames_map) # Save xjson.pprint(open(json_out_fn, "w"), database)