From 2fd87d4bafe5c756b76063bc8ca401e44565cfbd Mon Sep 17 00:00:00 2001 From: Makise Kurisu Date: Sun, 22 Mar 2015 11:04:27 +0100 Subject: [PATCH] Removed synopsys default for VHDL2008 support --- vcom/main.cpp | 16 ++++++++++------ vsim/main.cpp | 12 +++++++++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/vcom/main.cpp b/vcom/main.cpp index db735ab..8e405c7 100644 --- a/vcom/main.cpp +++ b/vcom/main.cpp @@ -6,7 +6,7 @@ #include #include -// #define DEBUG_EN DEBUG_EN + #define DEBUG_EN DEBUG_EN /* @@ -29,13 +29,13 @@ Errors: 2, Warnings: 0 COMPILATION: -> ghdl -i --ieee=synopsys --warn-no-vital-generic --workdir=. --work=design ../blink/src/ *.vhd -> ghdl -m --ieee=synopsys --warn-no-vital-generic --workdir=. --work=work top +> ghdl -i --warn-no-vital-generic --workdir=. --work=design ../blink/src/ *.vhd +> ghdl -m --warn-no-vital-generic --workdir=. --work=work top ../blink/src/top.vhd:32:19: no declaration for "counter_i2" SYNTAX CHECKING: -> ghdl -s --ieee=synopsys --warn-no-vital-generic --workdir=. --work=design ../blink/src/ *.vhd +> ghdl -s --warn-no-vital-generic --workdir=. --work=design ../blink/src/ *.vhd ../blink/src/top.vhd:32:19: no declaration for "counter_i2" @@ -178,9 +178,13 @@ int main(int argc, char **argv) myfile.flush(); myfile.close(); - string cargs = "ghdl -i --ieee=synopsys " + vhdlver + " --warn-no-vital-generic " + ghdlargs + " --workdir=" + string(tempdir) + " --work=" + work + " " + vhdl + " 2>&1"; - string sargs = "ghdl -s --ieee=synopsys " + vhdlver + " --warn-no-vital-generic " + ghdlargs + " --workdir=" + string(tempdir) + " --work=" + work + " " + vhdl + " 2>&1"; + string cargs = "ghdl -i " + vhdlver + " --warn-no-vital-generic " + ghdlargs + " --workdir=" + string(tempdir) + " --work=" + work + " " + vhdl + " 2>&1"; + string sargs = "ghdl -s " + vhdlver + " --warn-no-vital-generic " + ghdlargs + " --workdir=" + string(tempdir) + " --work=" + work + " " + vhdl + " 2>&1"; +#ifdef DEBUG_EN + cout << "RUN: " << cargs << endl; + cout << "RUN: " << sargs << endl; +#endif // Launch GHDL if (run(cargs) || run(sargs)) { cerr << "** Error: Error in model-ghdl." << endl; diff --git a/vsim/main.cpp b/vsim/main.cpp index d61ad3d..bc340d3 100644 --- a/vsim/main.cpp +++ b/vsim/main.cpp @@ -7,12 +7,12 @@ #include #include -// #define DEBUG_EN DEBUG_EN +#define DEBUG_EN DEBUG_EN using namespace std; // Source: vsim -gui design.top(RTL) -// Target: ghdl -m --ieee=synopsys --warn-no-vital-generic --workdir=simu --work=work testb_file +// Target: ghdl -m --warn-no-vital-generic --workdir=simu --work=work testb_file // ./testb_file --stop-time=500ns --vcdgz=testb_file.vcdgz // gunzip --stdout testb_file.vcdgz | gtkwave --vcd @@ -166,7 +166,10 @@ int main(int argc, char **argv) { //bool ex = false; //while (!ex) { cout << "Compiling..." << endl; - string cargs = "cd " + string(tempdir) + "; ghdl -m --ieee=synopsys --warn-no-vital-generic " + ghdlargs + " -fexplicit --workdir=" + string(tempdir) + " --work=" + work + " " + top; + string cargs = "cd " + string(tempdir) + "; ghdl -m --warn-no-vital-generic " + ghdlargs + " -fexplicit --workdir=" + string(tempdir) + " --work=" + work + " " + top; +#ifdef DEBUG_EN + cout << "RUN: " << cargs << endl; +#endif if (run(cargs)) { cerr << "Error: Compilation failed." << endl; run("zenity --error --text \"Compilation failed.\""); @@ -177,6 +180,9 @@ int main(int argc, char **argv) { string st = getSimulationTime(); if (st != "") { cout << "Simulating..." << endl; +#ifdef DEBUG_EN + cout << "RUN: " << "cd " + string(tempdir) + "; ./" + top + " " + wvargs + " --stop-time=" + st + " --vcd=" + top + ".vcd" << endl; +#endif if (run("cd " + string(tempdir) + "; ./" + top + " " + wvargs + " --stop-time=" + st + " --vcd=" + top + ".vcd")) { cerr << "Error: Simulation failed." << endl; }