Go to the documentation of this file.
71 qpfFile.open(qpfFileName.c_str());
73 TCEString msg =
"Couldn't open file " + qpfFileName +
" for writing";
74 IOException exc(__FILE__, __LINE__,
"QuartusProjectGenerator", msg);
78 <<
"# Generated by QuartusProject Generator" << endl << endl
79 <<
"QUARTUS_VERSION = \"8.0\"" << endl << endl
90 qsfFile.open(qsfFileName.c_str());
92 TCEString msg =
"Couldn't open file " + qsfFileName +
" for writing";
93 IOException exc(__FILE__, __LINE__,
"QuartusProjectGenerator", msg);
101 <<
"# Generated by QuartusProjectGenerator" << endl << endl
102 <<
"set_global_assignment -name FAMILY \"" << deviceFamily <<
"\""
104 <<
"set_global_assignment -name DEVICE " << deviceName << endl
105 <<
"set_global_assignment -name TOP_LEVEL_ENTITY " <<
toplevelEntity()
107 <<
"set_global_assignment -name ORIGINAL_QUARTUS_VERSION 8.0" << endl
108 <<
"set_global_assignment -name LAST_QUARTUS_VERSION 8.0" << endl
109 <<
"set_global_assignment -name USE_GENERATED_PHYSICAL_CONSTRAINTS "
110 <<
"OFF -section_id eda_palace" << endl
111 <<
"set_global_assignment -name USE_CONFIGURATION_DEVICE ON" << endl
112 <<
"set_global_assignment -name RESERVE_ALL_UNUSED_PINS \"AS "
113 <<
"INPUT TRI-STATED\"" << endl
114 <<
"set_global_assignment -name FMAX_REQUIREMENT \"" << fmax
117 for (
unsigned int i = 0; i <
hdlFileList().size(); i++) {
118 qsfFile <<
"set_global_assignment -name VHDL_FILE \""
124 qsfFile <<
"set_global_assignment -name MIF_FILE \""
127 qsfFile <<
"set_global_assignment -name HEX_FILE \""
134 qsfFile <<
"set_location_assignment " << mapping->first
135 <<
" -to " << mapping->second << endl;
147 "ALTERA_LIBRARY_PATH");
149 if (alteraLibPath !=
"") {
150 exportCommand <<
"export LD_LIBRARY_PATH=" << alteraLibPath <<
"\n";
154 TCEString synthesisScript =
"quartus_synthesize.sh";
156 synthesis.open(synthesisScript.c_str());
159 "Couldn't open file " + synthesisScript +
" for writing";
160 IOException exc(__FILE__, __LINE__,
"QuartusProjectGenerator", msg);
164 <<
"#!/bin/bash" << endl
165 <<
"# Generated by QuartusProjectGenerator of TCE" << endl << endl
171 TCEString programmingScript =
"quartus_program_fpga.sh";
172 ofstream programming;
173 programming.open(programmingScript.c_str());
175 TCEString msg =
"Couldn't open file " + programmingScript
177 IOException exc(__FILE__, __LINE__,
"QuartusProjectGenerator", msg);
181 <<
"#!/bin/bash" << endl
182 <<
"# Generated by QuartusProjectGenerator of TCE" << endl << endl
184 <<
"quartus_pgm -c USB-Blaster -m JTAG -o p\\;"
const PlatformIntegrator * integrator() const
const PlatInt::SignalMapping * signalMapping(int index) const
virtual void writeProjectFiles()
static bool setFileExecutable(const std::string fileName)
TCEString toplevelEntity() const
int signalMappingCount() const
std::pair< TCEString, TCEString > SignalMapping
const std::vector< TCEString > & memInitFileList() const
QuartusProjectGenerator(TCEString toplevelEntity, const PlatformIntegrator *integrator)
virtual ~QuartusProjectGenerator()
const std::vector< TCEString > & hdlFileList() const
static std::string environmentVariable(const std::string &variable)