mirror of
https://github.com/cclassic/model-ghdl
synced 2024-12-01 09:13:29 +01:00
Improved readability of output, added -fexplicit to cflags
This commit is contained in:
parent
0a243ddd1e
commit
73db12b81a
@ -6,7 +6,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#define DEBUG_EN DEBUG_EN
|
//#define DEBUG_EN DEBUG_EN
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -153,19 +153,23 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
//bool ex = false;
|
//bool ex = false;
|
||||||
//while (!ex) {
|
//while (!ex) {
|
||||||
string cargs = "cd " + string(tempdir) + "; ghdl -m --ieee=synopsys --warn-no-vital-generic --workdir=" + string(tempdir) + " --work=" + work + " " + top;
|
cout << "Compiling..." << endl;
|
||||||
|
string cargs = "cd " + string(tempdir) + "; ghdl -m --ieee=synopsys --warn-no-vital-generic -fexplicit --workdir=" + string(tempdir) + " --work=" + work + " " + top;
|
||||||
if (run(cargs)) {
|
if (run(cargs)) {
|
||||||
cerr << "Error: Compilation failed." << endl;
|
cerr << "Error: Compilation failed." << endl;
|
||||||
run("zenity --error --text \"Compilation failed.\"");
|
run("zenity --error --text \"Compilation failed.\"");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
cout << "done." << endl;
|
||||||
cargs = "";
|
cargs = "";
|
||||||
string st = getSimulationTime();
|
string st = getSimulationTime();
|
||||||
if (st != "") {
|
if (st != "") {
|
||||||
|
cout << "Simulating..." << endl;
|
||||||
if (run("cd " + string(tempdir) + "; ./" + top + " --stop-time=" + st + " --vcd=" + top + ".vcd")) {
|
if (run("cd " + string(tempdir) + "; ./" + top + " --stop-time=" + st + " --vcd=" + top + ".vcd")) {
|
||||||
cerr << "Error: Simulation failed." << endl;
|
cerr << "Error: Simulation failed." << endl;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
cout << "==> All done!" << endl;
|
||||||
string wv = "gtkwave " + string(tempdir) + "/" + top + ".vcd &";
|
string wv = "gtkwave " + string(tempdir) + "/" + top + ".vcd &";
|
||||||
if (run("pidof gtkwave")) {
|
if (run("pidof gtkwave")) {
|
||||||
if (system(wv.c_str())) {
|
if (system(wv.c_str())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user