Add license to FUGen generated FUs
#include "Generatable.hh"
#include "HDLPort.hh"
#include "StringTools.hh"
+#include "LicenseGenerator.hh"
#include <boost/format.hpp>
#include <chrono>
#include <cmath>
@@ -1189,10 +1190,14 @@ namespace HDLGenerator {
auto now_c = std::chrono::system_clock::to_time_t(now);
char buffer[31];
std::stringstream ss;
+ TCEString licenseStr = LicenseGenerator::generateMITLicense(
+ "2023", "");
+ std::vector<TCEString> licenseStrs = licenseStr.split("\n");
+ for (unsigned int i = 0; i < licenseStrs.size(); i++) {
+ headerComment_.emplace_back(licenseStrs.at(i));
+ }
std::strftime(buffer, 30, "%c", std::localtime(&now_c));
ss << buffer; // std::put_time(std::localtime(&now_c), "%c");
- headerComment_.emplace_back(
- "Module generated by TTA Codesign Environment");
headerComment_.emplace_back("");
headerComment_.emplace_back(
std::string("Generated on ") + ss.str());
