libopenfpga/libarchopenfpga/src/write_xml_simulation_setting.cpp
/********************************************************************
 * A writer to output a stimulus setting in a simulation setting to XML format
 *******************************************************************/
A writer to output a stimulus setting in a simulation setting to XML format
A writer to output a stimulus setting in a simulation setting to XML format
static 
void write_xml_stimulus(std::fstream& fp,
                        const char* fname,
                        const openfpga::SimulationSetting& sim_setting) {
  openfpga::check_file_stream(fname, fp);
  fp << "\t" << "<stimulus>" << "\n";
  fp << "\t\t" << "<clock>" << "\n";
  fp << "\t\t\t" << "<rise";
  write_xml_attribute(fp, "slew_type", SIM_ACCURACY_TYPE_STRING[sim_setting.stimuli_clock_slew_type(SIM_SIGNAL_RISE)]);
  write_xml_attribute(fp, "slew_time", sim_setting.stimuli_clock_slew(SIM_SIGNAL_RISE));
  fp << "/>" << "\n";
  fp << "\t\t\t" << "<fall";
  write_xml_attribute(fp, "slew_type", SIM_ACCURACY_TYPE_STRING[sim_setting.stimuli_clock_slew_type(SIM_SIGNAL_FALL)]);
  write_xml_attribute(fp, "slew_time", sim_setting.stimuli_clock_slew(SIM_SIGNAL_FALL));
  fp << "/>" << "\n";
  fp << "\t\t" << "</clock>" << "\n";
  fp << "\t\t" << "<input>" << "\n";
  fp << "\t\t\t" << "<rise";
  write_xml_attribute(fp, "slew_type", SIM_ACCURACY_TYPE_STRING[sim_setting.stimuli_input_slew_type(SIM_SIGNAL_RISE)]);
  write_xml_attribute(fp, "slew_time", sim_setting.stimuli_input_slew(SIM_SIGNAL_RISE));
  fp << "/>" << "\n";
  fp << "\t\t\t" << "<fall";
  write_xml_attribute(fp, "slew_type", SIM_ACCURACY_TYPE_STRING[sim_setting.stimuli_input_slew_type(SIM_SIGNAL_FALL)]);
  write_xml_attribute(fp, "slew_time", sim_setting.stimuli_input_slew(SIM_SIGNAL_FALL));
  fp << "/>" << "\n";
  fp << "\t\t" << "</input>" << "\n";
  fp << "\t" << "</stimulus>" << "\n";
}
static void write_xml_stimulus ( std :: fstream & fp , const char * fname , const openfpga :: SimulationSetting & sim_setting ) { openfpga :: check_file_stream ( fname , fp ) ; fp << " \t " << " " << " \n " ; fp << " \t \t " << " " << " \n " ; fp << " \t \t \t " << " " ; write_xml_attribute ( fp , " " , SIM_ACCURACY_TYPE_STRING [ sim_setting . stimuli_clock_slew_type ( SIM_SIGNAL_RISE ) ] ) ; write_xml_attribute ( fp , " " , sim_setting . stimuli_clock_slew ( SIM_SIGNAL_RISE ) ) ; fp << " " << " \n " ; fp << " \t \t \t " << " " ; write_xml_attribute ( fp , " " , SIM_ACCURACY_TYPE_STRING [ sim_setting . stimuli_clock_slew_type ( SIM_SIGNAL_FALL ) ] ) ; write_xml_attribute ( fp , " " , sim_setting . stimuli_clock_slew ( SIM_SIGNAL_FALL ) ) ; fp << " " << " \n " ; fp << " \t \t " << " " << " \n " ; fp << " \t \t " << " " << " \n " ; fp << " \t \t \t " << " " ; write_xml_attribute ( fp , " " , SIM_ACCURACY_TYPE_STRING [ sim_setting . stimuli_input_slew_type ( SIM_SIGNAL_RISE ) ] ) ; write_xml_attribute ( fp , " " , sim_setting . stimuli_input_slew ( SIM_SIGNAL_RISE ) ) ; fp << " " << " \n " ; fp << " \t \t \t " << " " ; write_xml_attribute ( fp , " " , SIM_ACCURACY_TYPE_STRING [ sim_setting . stimuli_input_slew_type ( SIM_SIGNAL_FALL ) ] ) ; write_xml_attribute ( fp , " " , sim_setting . stimuli_input_slew ( SIM_SIGNAL_FALL ) ) ; fp << " " << " \n " ; fp << " \t \t " << " " << " \n " ; fp << " \t " << " " << " \n " ; }
A writer to output a stimulus setting in a simulation setting to XML format
A writer to output a stimulus setting in a simulation setting to XML format
/* Validate the file stream */