2020-12-20 01:29:05 +00:00
|
|
|
# -*- Python -*-
|
2019-07-01 02:37:03 +00:00
|
|
|
# DESCRIPTION: Verilator: Internal C++ code lcov control file
|
|
|
|
#
|
2024-01-01 08:19:59 +00:00
|
|
|
# Copyright 2019-2024 by Wilson Snyder. This program is free software; you
|
2020-03-21 15:24:24 +00:00
|
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
2019-07-01 02:37:03 +00:00
|
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
# Version 2.0.
|
2020-03-21 15:24:24 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2019-07-01 02:37:03 +00:00
|
|
|
|
2020-12-20 01:29:05 +00:00
|
|
|
source_globs("src/*.cpp")
|
|
|
|
source_globs("src/*.h")
|
|
|
|
source_globs("src/*.l")
|
|
|
|
source_globs("src/*.y")
|
|
|
|
source_globs("src/obj_dbg/*.h")
|
|
|
|
source_globs("src/obj_dbg/*.cpp")
|
|
|
|
source_globs("include/*.c")
|
|
|
|
source_globs("include/*.cpp")
|
|
|
|
source_globs("include/*.h")
|
|
|
|
source_globs("include/*/*.h")
|
|
|
|
source_globs("include/*/*.cpp")
|
|
|
|
source_globs("include/*/*.c")
|
2019-07-01 02:37:03 +00:00
|
|
|
|
2020-06-05 00:23:55 +00:00
|
|
|
# Note *'s are removed when using fastcov
|
2020-12-20 01:29:05 +00:00
|
|
|
remove_source("/usr/*")
|
|
|
|
remove_source("*/include/sysc/*")
|
|
|
|
remove_source("*/V3Lexer_pregen.yy.cpp")
|
|
|
|
remove_source("*/V3PreLex_pregen.yy.cpp")
|
|
|
|
remove_source("*/verilog.c")
|
|
|
|
remove_source("*include/gtkwave/*")
|
2019-07-01 02:37:03 +00:00
|
|
|
# Something wrong in generation, unfortunately as would like this
|
|
|
|
#genhtml: ERROR: cannot read /svaha/wsnyder/SandBox/homecvs/v4/verilator/src/obj_dbg/verilog.y
|
2020-12-20 01:29:05 +00:00
|
|
|
#remove_source("*/src/obj_dbg/verilog.y")
|
|
|
|
remove_source("*test_regress/*")
|
|
|
|
remove_source("*examples/*")
|
2019-07-01 02:37:03 +00:00
|
|
|
|
2020-05-16 10:15:25 +00:00
|
|
|
# Remove collected coverage on each little test main file
|
|
|
|
# Would just be removed with remove_source in later step
|
2020-12-20 01:29:05 +00:00
|
|
|
remove_gcda_regexp(r'test_regress/.*/(Vt_|Vtop_).*\.gcda')
|
2019-07-01 02:37:03 +00:00
|
|
|
|
2020-06-05 01:40:40 +00:00
|
|
|
# Exclude line entirely, also excludes from function and branch coverage
|
2020-12-20 01:29:05 +00:00
|
|
|
exclude_line_regexp(r'\bv3fatalSrc\b')
|
|
|
|
exclude_line_regexp(r'\bfatalSrc\b')
|
2024-11-29 13:51:32 +00:00
|
|
|
exclude_line_regexp(r'\bVL_DELETED\b')
|
2020-12-20 01:29:05 +00:00
|
|
|
exclude_line_regexp(r'\bVL_UNCOVERABLE\b')
|
|
|
|
exclude_line_regexp(r'\bVL_UNREACHABLE\b')
|
|
|
|
exclude_line_regexp(r'\bVL_FATAL')
|
|
|
|
exclude_line_regexp(r'\bUASSERT')
|
|
|
|
exclude_line_regexp(r'\bNUM_ASSERT')
|
|
|
|
exclude_line_regexp(r'\bERROR_RSVD_WORD')
|
|
|
|
exclude_line_regexp(r'\bV3ERROR_NA')
|
|
|
|
exclude_line_regexp(r'\bUINFO\b')
|
2022-09-23 16:20:24 +00:00
|
|
|
exclude_line_regexp(r'\bVL_DEFINE_DEBUG_FUNCTIONS\b')
|
2019-07-01 02:37:03 +00:00
|
|
|
|
2020-06-05 01:40:40 +00:00
|
|
|
# Exclude for branch coverage only
|
2020-12-20 01:29:05 +00:00
|
|
|
exclude_branch_regexp(r'\bdebug\(\)')
|
|
|
|
exclude_branch_regexp(r'\bassert\(')
|
2021-03-28 18:05:16 +00:00
|
|
|
exclude_branch_regexp(r'\bBROKEN_BASE_RTN\(')
|
|
|
|
exclude_branch_regexp(r'\bBROKEN_RTN\(')
|
2020-12-20 01:29:05 +00:00
|
|
|
exclude_branch_regexp(r'\bSELF_CHECK')
|
2020-06-05 01:40:40 +00:00
|
|
|
|
2020-12-20 01:29:05 +00:00
|
|
|
True
|