mirror of
https://github.com/cclassic/model-ghdl
synced 2024-11-22 08:35:05 +01:00
GtkWave integration OK
This commit is contained in:
parent
708b7c5e1d
commit
43dd80f6ef
@ -99,17 +99,22 @@ int main(int argc, char **argv) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
string cargs = "ghdl -m --ieee=synopsys --warn-no-vital-generic --workdir=" + string(tempdir) + " --work=" + work + " " + top;
|
string cargs = "cd " + string(tempdir) + "; ghdl -m --ieee=synopsys --warn-no-vital-generic --workdir=" + string(tempdir) + " --work=" + work + " " + top;
|
||||||
|
|
||||||
if (!run(cargs)) {
|
if (run(cargs)) {
|
||||||
cerr << "Error: Compilation failed." << endl;
|
cerr << "Error: Compilation failed." << endl;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cargs = "";
|
cargs = "";
|
||||||
// ./testb_file --stop-time=500ns --vcdgz=testb_file.vcdgz
|
// ./testb_file --stop-time=500ns --vcdgz=testb_file.vcdgz
|
||||||
if (run("./" + top + " --stop-time=500ns --vcdgz=" + top + ".vcdgz")) {
|
if (run("cd " + string(tempdir) + "; ./" + top + " --stop-time=500ns --vcdgz=" + top + ".vcdgz")) {
|
||||||
cerr << "Error: Simulation failed." << endl;
|
cerr << "Error: Simulation failed." << endl;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (run("gunzip --stdout " + string(tempdir) + "/" + top + ".vcdgz | gtkwave --vcd")) {
|
||||||
|
cerr << "Error: GtkWave failed.";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user