Go to the documentation of this file.
39 #include <boost/format.hpp>
67 BlockSourceCopier::BlockSourceCopier(
71 implementation_(
implementation), entityStr_(entityStr), language_(language){
101 string hdbFile = fuImpl.
hdbFile();
102 int id = fuImpl.
id();
103 HDBManager& manager = HDBRegistry::instance().hdb(hdbFile);
148 string decompressorTargetDir = dstDirectory +
DS +
"gcu_ic";
151 string errorMsg =
"Unable to create directory " +
152 decompressorTargetDir;
162 dstFile = decompressorTargetDir +
DS + file;
167 :
"idecompressor.vhdl.tmpl");
170 :
"idecompressor.vhdl");
171 dstFile = decompressorTargetDir +
DS + file;
178 string ifetchSrcFile;
182 string ifetchTargetDir = decompressorTargetDir;
184 string ifetchDstFile =
203 const std::string& srcFile,
const std::string& dstDirectory,
204 std::string newName) {
208 string errorMsg =
"Source file " + srcFile +
" not found.";
214 string errorMsg =
"Unable to create directory " +
223 if (newName ==
"0") {
224 dstFile = source.erase(source.find(
".tmpl", 0), string::npos);
230 srcFile, dstDirectory +
DS + dstFile);
253 const std::string& dstDirectory) {
256 HDBManager& manager = HDBRegistry::instance().hdb(hdbFile);
278 const std::string& hdbFile,
const std::string& dstDirectory) {
279 for (
int i = 0; i <
implementation.implementationFileCount(); i++) {
291 "Unable to find file mentioned in HDB: " + file.
pathToFile() +
299 string targetDir, targetFile;
303 targetDir = dstDirectory +
DS +
"vhdl";
306 targetDir = dstDirectory +
DS +
"verilog";
312 targetFile = targetDir +
DS + fileName;
315 bool directoryCreated =
317 if (!directoryCreated) {
318 string errorMsg =
"Unable to create directory " +
327 string errorMsg =
"Unable to copy file " + targetFile +
":";
331 __FILE__, __LINE__,
__func__, errorMsg);
std::set< std::string > copiedFiles_
Copied files.
virtual bool hasImplementation() const
static bool createDirectory(const std::string &path)
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
void copyFiles(const HDB::HWBlockImplementation &implementation, const std::string &hdbFile, const std::string &dstDirectory)
RFImplementationLocation & iuImplementation(const std::string &iu) const
HDLTemplateInstantiator instantiator_
Object that instantiates templates.
void copyBaseRFFiles(const IDF::RFImplementationLocation &implementation, const std::string &dstDirectory)
bool hasDecompressorFile() const
static std::string fileOfPath(const std::string pathName)
static const std::string UTILITY_VHDL_FILE
RFImplementationLocation & rfImplementation(const std::string &rf) const
#define assert(condition)
virtual ~BlockSourceCopier()
void instantiateHDLTemplate(const std::string &srcFile, const std::string &dstDirectory, std::string newName="0")
void copyProcessorSpecific(const std::string &dstDirectory)
static void copy(const std::string &source, const std::string &target)
std::string decompressorFile() const
int rfImplementationCount() const
void setCopied(const std::string &file)
RFImplementation & implementation() const
std::string pathToFile() const
std::string errorMessage() const
int iuImplementationCount() const
static const std::string DIRECTORY_SEPARATOR
static const std::string UTILITY_VERILOG_FILE
bool isCopied(const std::string &file) const
static std::vector< std::string > vhdlPaths(const std::string &hdbPath)
int fuImplementationCount() const
static bool fileExists(const std::string fileName)
void setEntityString(const TCEString &entityStr)
HDL
HDLs supported by ProGe.
HDLTemplateInstantiator & getTemplateInstatiator()
void copyShared(const std::string &dstDirectory)
virtual std::string hdbFile() const
void instantiateTemplateFile(const std::string &templateFile, const std::string &dstFile)
virtual bool hasImplementation() const
FUImplementationLocation & fuImplementation(const std::string &fu) const
FUImplementation & implementation() const
static std::string findFileInSearchPaths(const std::vector< std::string > &searchPaths, const std::string &file)
FUEntry * fuByEntryID(RowID id) const
const IDF::MachineImplementation & implementation_
The IDF object model.
static std::string dataDirPath(const std::string &prog)
RFEntry * rfByEntryID(RowID id) const