1
0
mirror of https://github.com/cclassic/model-ghdl synced 2024-11-21 08:25:05 +01:00

-gtkwave -> args for gtkwave;

-rargs -> args when running the program
This commit is contained in:
Markus Koch 2015-04-09 08:54:02 +02:00
parent 1c9e11ea55
commit 3e75adb07c

View File

@ -95,6 +95,7 @@ int main(int argc, char **argv) {
string simtime = ""; string simtime = "";
string ghdlargs = ""; string ghdlargs = "";
string wvargs = ""; string wvargs = "";
string gtkargs = "";
int i; int i;
char tempdir[256] = ""; // Compile dir char tempdir[256] = ""; // Compile dir
@ -113,9 +114,12 @@ int main(int argc, char **argv) {
else if (GETOPT("-ghdl")) { else if (GETOPT("-ghdl")) {
ghdlargs = argv[i]; ghdlargs = argv[i];
} }
else if (GETOPT("-gtkwave")) { else if (GETOPT("-rargs")) {
wvargs = argv[i]; wvargs = argv[i];
} }
else if (GETOPT("-gtkwave")) {
gtkargs = argv[i];
}
else { else {
if (argv[i][0] == '-') { if (argv[i][0] == '-') {
cerr << "INFO: Unknown command line opt: " << argv[i] << endl; cerr << "INFO: Unknown command line opt: " << argv[i] << endl;
@ -184,7 +188,7 @@ int main(int argc, char **argv) {
} }
else { else {
cout << "==> All done!" << endl; cout << "==> All done!" << endl;
string wv = "gtkwave " + string(tempdir) + "/" + top + ".ghw &"; string wv = "gtkwave " + string(tempdir) + "/" + top + ".ghw " + gtkargs + " &";
if (run("pidof gtkwave")) { if (run("pidof gtkwave")) {
if (system(wv.c_str())) { if (system(wv.c_str())) {
cerr << "Error: GtkWave failed."; cerr << "Error: GtkWave failed.";