openfpga/src/base/openfpga_read_arch.cpp
/********************************************************************
 * Top-level function to read an OpenFPGA simulation setting file
 * we use the APIs from the libarchopenfpga library 
 *
 * The command will accept an option '--file' which is the simulation setting
 * file provided by users  
 *******************************************************************/
Top-level function to read an OpenFPGA simulation setting file
we use the APIs from the libarchopenfpga library

The command will accept an option '--file' which is the simulation setting
file provided by users
Top - level function to read an OpenFPGA simulation setting file we use the APIs from the libarchopenfpga library The command will accept an option ' -- file ' which is the simulation setting file provided by users
int read_simulation_setting(OpenfpgaContext& openfpga_context,
                            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());
  std::string arch_file_name = cmd_context.option_value(cmd, opt_file);
  VTR_LOG("Reading XML simulation setting '%s'...\n",
          arch_file_name.c_str());
  openfpga_context.mutable_simulation_setting() = read_xml_openfpga_simulation_settings(arch_file_name.c_str());
  return CMD_EXEC_SUCCESS;
}
int read_simulation_setting ( OpenfpgaContext & openfpga_context , 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 ( ) ) ; std :: string arch_file_name = cmd_context . option_value ( cmd , opt_file ) ; VTR_LOG ( " \n " , arch_file_name . c_str ( ) ) ; openfpga_context . mutable_simulation_setting ( ) = read_xml_openfpga_simulation_settings ( arch_file_name . c_str ( ) ) ; return CMD_EXEC_SUCCESS ; }
Top-level function to read an OpenFPGA simulation setting file
 we use the APIs from the libarchopenfpga library
Top - level function to read an OpenFPGA simulation setting file we use the APIs from the libarchopenfpga library
/* 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 */