mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
Made "cover" a compile-time option (disabled by default)
This commit is contained in:
parent
80869531b9
commit
a346c0bf2b
5 changed files with 10 additions and 6 deletions
|
@ -335,7 +335,7 @@ int main(int argc, char **argv)
|
|||
log("%s\n", out_count ? "" : " no commands executed");
|
||||
}
|
||||
|
||||
#ifdef COVER_ACTIVE
|
||||
#ifdef YOSYS_ENABLE_COVER
|
||||
if (getenv("YOSYS_COVER_DIR") || getenv("YOSYS_COVER_FILE"))
|
||||
{
|
||||
char filename_buffer[4096];
|
||||
|
|
|
@ -274,7 +274,7 @@ void log_cell(RTLIL::Cell *cell, std::string indent)
|
|||
// ---------------------------------------------------
|
||||
// This is the magic behind the code coverage counters
|
||||
// ---------------------------------------------------
|
||||
#ifdef COVER_ACTIVE
|
||||
#ifdef YOSYS_ENABLE_COVER
|
||||
|
||||
std::map<std::string, std::pair<std::string, int>> extra_coverage_data;
|
||||
|
||||
|
|
|
@ -87,8 +87,7 @@ static inline void log_assert_worker(bool cond, const char *expr, const char *fi
|
|||
// This is the magic behind the code coverage counters
|
||||
// ---------------------------------------------------
|
||||
|
||||
#if defined(__linux__) && !defined(NDEBUG)
|
||||
#define COVER_ACTIVE
|
||||
#ifdef YOSYS_ENABLE_COVER
|
||||
|
||||
#define cover(_id) do { \
|
||||
static CoverData __d __attribute__((section("yosys_cover_list"), aligned(1))) = { __FILE__, __FUNCTION__, _id, __LINE__, 0 }; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue