openfpga/src/base/openfpga_build_fabric.cpp
/********************************************************************
 * Identify the unique GSBs from the Device RR GSB arrays
 * This function should only be called after the GSB builder is done
 *******************************************************************/
Identify the unique GSBs from the Device RR GSB arrays
This function should only be called after the GSB builder is done
Identify the unique GSBs from the Device RR GSB arrays This function should only be called after the GSB builder is done
static 
void compress_routing_hierarchy(OpenfpgaContext& openfpga_ctx,
                                const bool& verbose_output) {
  vtr::ScopedStartFinishTimer timer("Identify unique General Switch Blocks (GSBs)");
  openfpga_ctx.mutable_device_rr_gsb().build_unique_module(g_vpr_ctx.device().rr_graph);
  VTR_LOGV(verbose_output, 
           "Detected %lu unique X-direction connection blocks from a total of %d (compression rate=%.2f%)\n",
           openfpga_ctx.device_rr_gsb().get_num_cb_unique_module(CHANX),
           find_device_rr_gsb_num_cb_modules(openfpga_ctx.device_rr_gsb(), CHANX),
           100. * ((float)find_device_rr_gsb_num_cb_modules(openfpga_ctx.device_rr_gsb(), CHANX) / (float)openfpga_ctx.device_rr_gsb().get_num_cb_unique_module(CHANX) - 1.));
  VTR_LOGV(verbose_output,
           "Detected %lu unique Y-direction connection blocks from a total of %d (compression rate=%.2f%)\n",
           openfpga_ctx.device_rr_gsb().get_num_cb_unique_module(CHANY),
           find_device_rr_gsb_num_cb_modules(openfpga_ctx.device_rr_gsb(), CHANY),
           100. * ((float)find_device_rr_gsb_num_cb_modules(openfpga_ctx.device_rr_gsb(), CHANY) / (float)openfpga_ctx.device_rr_gsb().get_num_cb_unique_module(CHANY) - 1.));
  VTR_LOGV(verbose_output,
           "Detected %lu unique switch blocks from a total of %d (compression rate=%.2f%)\n",
           openfpga_ctx.device_rr_gsb().get_num_sb_unique_module(),
           find_device_rr_gsb_num_sb_modules(openfpga_ctx.device_rr_gsb()),
           100. * ((float)find_device_rr_gsb_num_sb_modules(openfpga_ctx.device_rr_gsb()) / (float)openfpga_ctx.device_rr_gsb().get_num_sb_unique_module() - 1.));
  VTR_LOG("Detected %lu unique general switch blocks from a total of %d (compression rate=%.2f%)\n",
          openfpga_ctx.device_rr_gsb().get_num_gsb_unique_module(),
          find_device_rr_gsb_num_gsb_modules(openfpga_ctx.device_rr_gsb()),
          100. * ((float)find_device_rr_gsb_num_gsb_modules(openfpga_ctx.device_rr_gsb()) / (float)openfpga_ctx.device_rr_gsb().get_num_gsb_unique_module() - 1.));
}
static void compress_routing_hierarchy ( OpenfpgaContext & openfpga_ctx , const bool & verbose_output ) { vtr :: ScopedStartFinishTimer timer ( " " ) ; openfpga_ctx . mutable_device_rr_gsb ( ) . build_unique_module ( g_vpr_ctx . device ( ) . rr_graph ) ; VTR_LOGV ( verbose_output , " \n " , openfpga_ctx . device_rr_gsb ( ) . get_num_cb_unique_module ( CHANX ) , find_device_rr_gsb_num_cb_modules ( openfpga_ctx . device_rr_gsb ( ) , CHANX ) , 100. * ( ( float ) find_device_rr_gsb_num_cb_modules ( openfpga_ctx . device_rr_gsb ( ) , CHANX ) / ( float ) openfpga_ctx . device_rr_gsb ( ) . get_num_cb_unique_module ( CHANX ) - 1. ) ) ; VTR_LOGV ( verbose_output , " \n " , openfpga_ctx . device_rr_gsb ( ) . get_num_cb_unique_module ( CHANY ) , find_device_rr_gsb_num_cb_modules ( openfpga_ctx . device_rr_gsb ( ) , CHANY ) , 100. * ( ( float ) find_device_rr_gsb_num_cb_modules ( openfpga_ctx . device_rr_gsb ( ) , CHANY ) / ( float ) openfpga_ctx . device_rr_gsb ( ) . get_num_cb_unique_module ( CHANY ) - 1. ) ) ; VTR_LOGV ( verbose_output , " \n " , openfpga_ctx . device_rr_gsb ( ) . get_num_sb_unique_module ( ) , find_device_rr_gsb_num_sb_modules ( openfpga_ctx . device_rr_gsb ( ) ) , 100. * ( ( float ) find_device_rr_gsb_num_sb_modules ( openfpga_ctx . device_rr_gsb ( ) ) / ( float ) openfpga_ctx . device_rr_gsb ( ) . get_num_sb_unique_module ( ) - 1. ) ) ; VTR_LOG ( " \n " , openfpga_ctx . device_rr_gsb ( ) . get_num_gsb_unique_module ( ) , find_device_rr_gsb_num_gsb_modules ( openfpga_ctx . device_rr_gsb ( ) ) , 100. * ( ( float ) find_device_rr_gsb_num_gsb_modules ( openfpga_ctx . device_rr_gsb ( ) ) / ( float ) openfpga_ctx . device_rr_gsb ( ) . get_num_gsb_unique_module ( ) - 1. ) ) ; }
Identify the unique GSBs from the Device RR GSB arrays
 This function should only be called after the GSB builder is done
Identify the unique GSBs from the Device RR GSB arrays This function should only be called after the GSB builder is done
/* Build unique module lists */ /* Report the stats */