build/sim/core: fix coverage

This commit is contained in:
Florent Kermarrec 2019-01-11 15:01:58 +01:00
parent 482abf9b43
commit 387ee04130
2 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
include variables.mak
CC = gcc
CFLAGS = -Wall -O3 -ggdb
CFLAGS = -Wall -O3 -ggdb $(if $(COVERAGE), -DVM_COVERAGE)
LDFLAGS = -lpthread -ljson-c -lm -lstdc++ -ldl -levent
CC_SRCS ?= "--cc dut.v"

View File

@ -190,10 +190,12 @@ static void cb(int sock, short which, void *arg)
if(!s->tickfirst)
s->module->tick(s->session);
}
}
if (litex_sim_got_finish())
event_base_loopbreak(base);
if (litex_sim_got_finish()) {
event_base_loopbreak(base);
break;
}
}
if (!evtimer_pending(ev, NULL)) {
event_del(ev);
@ -232,7 +234,6 @@ int main()
goto out;
}
tv.tv_sec = 0;
tv.tv_usec = 0;
ev = event_new(base, -1, EV_PERSIST, cb, vdut);