openfpga/src/base/openfpga_write_gsb.cpp
/********************************************************************
 * Write internal structrure of all the General Switch Blocks (GSBs)
 * to an XML file 
 *******************************************************************/
Write internal structrure of all the General Switch Blocks (GSBs)
to an XML file
Write internal structrure of all the General Switch Blocks ( GSBs ) to an XML file
int write_gsb(const OpenfpgaContext& openfpga_ctx,
              const Command& cmd, const CommandContext& cmd_context) { 
  CommandOptionId opt_file = cmd.option("file");
  VTR_ASSERT(true == cmd_context.option_enable(cmd, opt_file));
  VTR_ASSERT(false == cmd_context.option_value(cmd, opt_file).empty());
  CommandOptionId opt_verbose = cmd.option("verbose");
  std::string sb_file_name = cmd_context.option_value(cmd, opt_file);
  write_device_rr_gsb_to_xml(sb_file_name.c_str(),
                             g_vpr_ctx.device().rr_graph,
                             openfpga_ctx.device_rr_gsb(),
                             cmd_context.option_enable(cmd, opt_verbose));
  return CMD_EXEC_SUCCESS;
}
int write_gsb ( const OpenfpgaContext & openfpga_ctx , const Command & cmd , const CommandContext & cmd_context ) { CommandOptionId opt_file = cmd . option ( " " ) ; VTR_ASSERT ( true == cmd_context . option_enable ( cmd , opt_file ) ) ; VTR_ASSERT ( false == cmd_context . option_value ( cmd , opt_file ) . empty ( ) ) ; CommandOptionId opt_verbose = cmd . option ( " " ) ; std :: string sb_file_name = cmd_context . option_value ( cmd , opt_file ) ; write_device_rr_gsb_to_xml ( sb_file_name . c_str ( ) , g_vpr_ctx . device ( ) . rr_graph , openfpga_ctx . device_rr_gsb ( ) , cmd_context . option_enable ( cmd , opt_verbose ) ) ; return CMD_EXEC_SUCCESS ; }
Write internal structrure of all the General Switch Blocks (GSBs)
 to an XML file
Write internal structrure of all the General Switch Blocks ( GSBs ) to an XML file
/* Check the option '--file' is enabled or not 
   * Actually, it must be enabled as the shell interface will check 
   * before reaching this fuction
   */ /* TODO: should identify the error code from internal function execution */