mirror of
https://github.com/cclassic/model-ghdl
synced 2024-11-29 09:13:28 +01:00
Added support for multiple -ghdl arguments, added language args for vsim
This commit is contained in:
parent
ee19939e7c
commit
ea1b2aff3f
@ -138,7 +138,7 @@ int main(int argc, char **argv)
|
|||||||
vhdlver = "--std=08";
|
vhdlver = "--std=08";
|
||||||
}
|
}
|
||||||
else if (GETOPT("-ghdl")) {
|
else if (GETOPT("-ghdl")) {
|
||||||
ghdlargs = argv[i];
|
ghdlargs += string(argv[i]) + " ";
|
||||||
}
|
}
|
||||||
else if (GETOPT("-modelsimini")) {
|
else if (GETOPT("-modelsimini")) {
|
||||||
// Not used
|
// Not used
|
||||||
|
@ -97,6 +97,7 @@ int main(int argc, char **argv) {
|
|||||||
string wvargs = "";
|
string wvargs = "";
|
||||||
string gtkargs = "";
|
string gtkargs = "";
|
||||||
string gtksave = "";
|
string gtksave = "";
|
||||||
|
string vhdlver = ""; // VHDL Version
|
||||||
int i;
|
int i;
|
||||||
char tempdir[256] = ""; // Compile dir
|
char tempdir[256] = ""; // Compile dir
|
||||||
|
|
||||||
@ -112,8 +113,27 @@ int main(int argc, char **argv) {
|
|||||||
else if (GETOPT("-compiledir")) {
|
else if (GETOPT("-compiledir")) {
|
||||||
strcpy(tempdir, argv[i]);
|
strcpy(tempdir, argv[i]);
|
||||||
}
|
}
|
||||||
|
else if (ISOPT("-87")) {
|
||||||
|
vhdlver = "--std=87";
|
||||||
|
}
|
||||||
|
else if (ISOPT("-93")) {
|
||||||
|
vhdlver = "--std=93";
|
||||||
|
}
|
||||||
|
else if (ISOPT("-93c")) {
|
||||||
|
vhdlver = "--std=93c";
|
||||||
|
}
|
||||||
|
else if (ISOPT("-2000")) {
|
||||||
|
vhdlver = "--std=00";
|
||||||
|
}
|
||||||
|
else if (ISOPT("-2002")) {
|
||||||
|
vhdlver = "--std=02";
|
||||||
|
}
|
||||||
|
else if (ISOPT("-2008")) {
|
||||||
|
cerr << "WARN: VHDL 2008 is not yet fully supported by GHDL." << endl;
|
||||||
|
vhdlver = "--std=08";
|
||||||
|
}
|
||||||
else if (GETOPT("-ghdl")) {
|
else if (GETOPT("-ghdl")) {
|
||||||
ghdlargs = argv[i];
|
ghdlargs += string(argv[i]) + " ";
|
||||||
}
|
}
|
||||||
else if (GETOPT("-rargs")) {
|
else if (GETOPT("-rargs")) {
|
||||||
wvargs = argv[i];
|
wvargs = argv[i];
|
||||||
@ -173,7 +193,7 @@ int main(int argc, char **argv) {
|
|||||||
//bool ex = false;
|
//bool ex = false;
|
||||||
//while (!ex) {
|
//while (!ex) {
|
||||||
cout << "Compiling..." << endl;
|
cout << "Compiling..." << endl;
|
||||||
string cargs = "cd " + string(tempdir) + "; ghdl -m --warn-no-vital-generic " + ghdlargs + " -fexplicit --workdir=" + string(tempdir) + " --work=" + work + " " + top;
|
string cargs = "cd " + string(tempdir) + "; ghdl -m " + vhdlver + " " + ghdlargs + " --workdir=" + string(tempdir) + " --work=" + work + " " + top;
|
||||||
#ifdef DEBUG_EN
|
#ifdef DEBUG_EN
|
||||||
cout << "RUN: " << cargs << endl;
|
cout << "RUN: " << cargs << endl;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user