mirror of
https://github.com/cclassic/model-ghdl
synced 2024-11-21 08:25:05 +01:00
Added support for GHDL warnings
This commit is contained in:
parent
ea2dffbb6d
commit
7189e18c19
6
main.c
6
main.c
@ -97,6 +97,7 @@ int run_ghdl(char *command, ...) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ../blink/src/top.vhd:32:19: no declaration for "counter_i2"
|
// ../blink/src/top.vhd:32:19: no declaration for "counter_i2"
|
||||||
|
// ../blink/src/abc.vhd:12:14:warning: package "mypack" does not require a body
|
||||||
// v
|
// v
|
||||||
// ** Error: /tmp/filename.vhd(32): (vcom-1136) Unknown identifier "counter_i2".
|
// ** Error: /tmp/filename.vhd(32): (vcom-1136) Unknown identifier "counter_i2".
|
||||||
|
|
||||||
@ -106,7 +107,7 @@ int run_ghdl(char *command, ...) {
|
|||||||
arrc = 0;
|
arrc = 0;
|
||||||
|
|
||||||
do { // Search for EOL
|
do { // Search for EOL
|
||||||
if (arrc < 4 && (*ptr == ':' || *ptr == '\0')) {
|
if (arrc < 5 && (*ptr == ':' || *ptr == '\0')) {
|
||||||
*ptr++ = 0;
|
*ptr++ = 0;
|
||||||
arr[arrc++] = start;
|
arr[arrc++] = start;
|
||||||
start = ptr;
|
start = ptr;
|
||||||
@ -116,6 +117,9 @@ int run_ghdl(char *command, ...) {
|
|||||||
if (arrc == 4) {
|
if (arrc == 4) {
|
||||||
printf("** Error: %s(%s): (ghdl) %s", arr[0], arr[1], arr[3]);
|
printf("** Error: %s(%s): (ghdl) %s", arr[0], arr[1], arr[3]);
|
||||||
}
|
}
|
||||||
|
else if (arrc = 5) {
|
||||||
|
printf("** Warning: %s(%s): (ghdl) %s", arr[0], arr[1], arr[4]);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
printf("** ghdl: %s", buf);
|
printf("** ghdl: %s", buf);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user