openfpga/src/base/openfpga_sdc.cpp
/********************************************************************
 * A wrapper function to call the PnR SDC generator on configuration chain 
 * of FPGA-SDC
 *******************************************************************/
A wrapper function to call the PnR SDC generator on configuration chain
of FPGA-SDC
A wrapper function to call the PnR SDC generator on configuration chain of FPGA - SDC
int write_configuration_chain_sdc(const OpenfpgaContext& openfpga_ctx,
                                  const Command& cmd, const CommandContext& cmd_context) {
  if (CONFIG_MEM_SCAN_CHAIN != openfpga_ctx.arch().config_protocol.type()) {
    VTR_LOGF_ERROR(__FILE__, __LINE__,
                   "Configuration protocol is %s. Expected %s to write SDC!\n",
                   CONFIG_PROTOCOL_TYPE_STRING[openfpga_ctx.arch().config_protocol.type()],
                   CONFIG_PROTOCOL_TYPE_STRING[CONFIG_MEM_SCAN_CHAIN]);
    return CMD_EXEC_FATAL_ERROR;
  }
  CommandOptionId opt_output_dir = cmd.option("file");
  CommandOptionId opt_time_unit = cmd.option("time_unit");
  CommandOptionId opt_min_delay = cmd.option("min_delay");
  CommandOptionId opt_max_delay = cmd.option("max_delay");
  std::string sdc_dir_path = format_dir_path(cmd_context.option_value(cmd, opt_output_dir));
  float time_unit = string_to_time_unit(cmd_context.option_value(cmd, opt_time_unit));
  print_pnr_sdc_constrain_configurable_chain(cmd_context.option_value(cmd, opt_output_dir),
                                             time_unit,
                                             std::stof(cmd_context.option_value(cmd, opt_max_delay)),
                                             std::stof(cmd_context.option_value(cmd, opt_min_delay)),
                                             openfpga_ctx.module_graph());
  return CMD_EXEC_SUCCESS;
}
int write_configuration_chain_sdc ( const OpenfpgaContext & openfpga_ctx , const Command & cmd , const CommandContext & cmd_context ) { if ( CONFIG_MEM_SCAN_CHAIN != openfpga_ctx . arch ( ) . config_protocol . type ( ) ) { VTR_LOGF_ERROR ( __FILE__ , __LINE__ , " \n " , CONFIG_PROTOCOL_TYPE_STRING [ openfpga_ctx . arch ( ) . config_protocol . type ( ) ] , CONFIG_PROTOCOL_TYPE_STRING [ CONFIG_MEM_SCAN_CHAIN ] ) ; return CMD_EXEC_FATAL_ERROR ; } CommandOptionId opt_output_dir = cmd . option ( " " ) ; CommandOptionId opt_time_unit = cmd . option ( " " ) ; CommandOptionId opt_min_delay = cmd . option ( " " ) ; CommandOptionId opt_max_delay = cmd . option ( " " ) ; std :: string sdc_dir_path = format_dir_path ( cmd_context . option_value ( cmd , opt_output_dir ) ) ; float time_unit = string_to_time_unit ( cmd_context . option_value ( cmd , opt_time_unit ) ) ; print_pnr_sdc_constrain_configurable_chain ( cmd_context . option_value ( cmd , opt_output_dir ) , time_unit , std :: stof ( cmd_context . option_value ( cmd , opt_max_delay ) ) , std :: stof ( cmd_context . option_value ( cmd , opt_min_delay ) ) , openfpga_ctx . module_graph ( ) ) ; return CMD_EXEC_SUCCESS ; }
A wrapper function to call the PnR SDC generator on configuration chain
 of FPGA-SDC
A wrapper function to call the PnR SDC generator on configuration chain of FPGA - SDC
/* If the configuration protocol is not a configuration chain, we will not write anything */ /* Get command options */ /* Write the SDC for configuration chain */