mirror of
https://github.com/cclassic/model-ghdl
synced 2024-11-29 09:13:28 +01:00
Removed synopsys default for VHDL2008 support
This commit is contained in:
parent
935294ab41
commit
2fd87d4baf
@ -6,7 +6,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
// #define DEBUG_EN DEBUG_EN
|
#define DEBUG_EN DEBUG_EN
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -29,13 +29,13 @@ Errors: 2, Warnings: 0
|
|||||||
|
|
||||||
|
|
||||||
COMPILATION:
|
COMPILATION:
|
||||||
> ghdl -i --ieee=synopsys --warn-no-vital-generic --workdir=. --work=design ../blink/src/ *.vhd
|
> ghdl -i --warn-no-vital-generic --workdir=. --work=design ../blink/src/ *.vhd
|
||||||
> ghdl -m --ieee=synopsys --warn-no-vital-generic --workdir=. --work=work top
|
> ghdl -m --warn-no-vital-generic --workdir=. --work=work top
|
||||||
../blink/src/top.vhd:32:19: no declaration for "counter_i2"
|
../blink/src/top.vhd:32:19: no declaration for "counter_i2"
|
||||||
|
|
||||||
|
|
||||||
SYNTAX CHECKING:
|
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"
|
../blink/src/top.vhd:32:19: no declaration for "counter_i2"
|
||||||
|
|
||||||
|
|
||||||
@ -178,9 +178,13 @@ int main(int argc, char **argv)
|
|||||||
myfile.flush();
|
myfile.flush();
|
||||||
myfile.close();
|
myfile.close();
|
||||||
|
|
||||||
string cargs = "ghdl -i --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 --ieee=synopsys " + 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
|
// Launch GHDL
|
||||||
if (run(cargs) || run(sargs)) {
|
if (run(cargs) || run(sargs)) {
|
||||||
cerr << "** Error: Error in model-ghdl." << endl;
|
cerr << "** Error: Error in model-ghdl." << endl;
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
// #define DEBUG_EN DEBUG_EN
|
#define DEBUG_EN DEBUG_EN
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// Source: vsim -gui design.top(RTL)
|
// 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
|
// ./testb_file --stop-time=500ns --vcdgz=testb_file.vcdgz
|
||||||
// gunzip --stdout testb_file.vcdgz | gtkwave --vcd
|
// gunzip --stdout testb_file.vcdgz | gtkwave --vcd
|
||||||
|
|
||||||
@ -166,7 +166,10 @@ 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 --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)) {
|
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.\"");
|
||||||
@ -177,6 +180,9 @@ int main(int argc, char **argv) {
|
|||||||
string st = getSimulationTime();
|
string st = getSimulationTime();
|
||||||
if (st != "") {
|
if (st != "") {
|
||||||
cout << "Simulating..." << endl;
|
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")) {
|
if (run("cd " + string(tempdir) + "; ./" + top + " " + wvargs + " --stop-time=" + st + " --vcd=" + top + ".vcd")) {
|
||||||
cerr << "Error: Simulation failed." << endl;
|
cerr << "Error: Simulation failed." << endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user