46 std::vector<std::string> hdlFiles,
58 errors.push_back(
"Couldn't create work dir");
63 errors.push_back(
"Couldn't change directory to " + baseDir);
84 errors.push_back(
"Couldn't change directory to " + baseDir);
90 command =
"./testbench 2>&1";
94 command = string(
"ghdl -r --std=08 --ieee=synopsys --workdir=") +
workDir()
98 std::cout << command << std::endl;
100 vector<string> messages;
104 return rv == 0 && errors.size() == 0;
109 std::string file, std::vector<std::string>& errors) {
110 string command =
"ghdl -i --std=08 --ieee=synopsys --workdir="
114 std::cout << command << std::endl;
121 string command =
"ghdl -m -Wno-hide --std=08 --ieee=synopsys --workdir="
122 +
workDir() +
" testbench 2>&1";
125 std::cout << command << std::endl;
static int runShellCommandAndGetOutput(const std::string &command, std::vector< std::string > &outputLines, std::size_t maxOutputLines=DEFAULT_MAX_OUTPUT_LINES, bool includeStdErr=false)
static bool changeWorkingDir(const std::string &path)
static bool fileExists(const std::string fileName)
virtual bool compile(std::vector< std::string > &errors)
bool compileDesign(std::vector< std::string > &errors)
GhdlSimulator(std::string tbFile, std::vector< std::string > hdlFiles, bool verbose, bool leaveDirty)
bool importFile(std::string file, std::vector< std::string > &errors)
virtual bool simulate(std::vector< std::string > &errors)
std::string workDir() const
std::string tbFile() const
virtual std::string createWorkDir()
std::string tbDirectory() const
std::string file(int index) const
void parseErrorMessages(std::vector< std::string > &inputMsg, std::vector< std::string > &errors)