Discussion:
line coverage problem with gcov
Ciro Ceissler
2014-08-07 21:10:56 UTC
Permalink
Hello,

I trying to do coverage using gcov and can't reach 100% for line
coverage, for example:

#####: 32: SC_MODULE(test) {
-: 33: sc_in<bool> clk;
-: 34: sc_in<bool> arst_n;
-: 35:
-: 36: void func1 ();
-: 37: void func2 ();
-: 38:
18: 39: SC_CTOR(test) {
18: 40: SC_CTHREAD(func1, clk.pos())
18: 41: async_reset_signal_is(arst_n, false);
-: 42:
18: 43: SC_CTHREAD(func2, clk.pos());
18: 44: async_reset_signal_is(arst_n, false);
-: 45:
-: 46: } // end of SC_CTOR
-: 47: }; // end of SC_MODULE
From other project, I have another behavior (just put a stub from
module), here above:

18: 32: SC_MODULE(test2) {
-: 33: sc_in<bool> clk;
-: 34: sc_in<bool> arst_n;
-: 35:
18: 36: void func1 ();
18: 37: void func2 ();
-: 38:
18: 39: SC_CTOR(test2) {
18: 40: SC_CTHREAD(func1, clk.pos())
18: 41: async_reset_signal_is(arst_n, false);
-: 42:
18: 43: SC_CTHREAD(func2, clk.pos());
18: 44: async_reset_signal_is(arst_n, false);
-: 45:
-: 46: } // end of SC_CTOR
-: 47: }; // end of SC_MODULE

I don't understand why SC_MODULE wasn't covered from the first
example, but SC_CTOR was.

Can anyone tell me why this happen or could suggest another tool for coverage?

Thanks,
--
Ciro Ceissler
Loading...