3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-25 01:55:33 +00:00
Commit graph

96 commits

Author SHA1 Message Date
Miodrag Milanović
637650597b
Merge pull request #2059 from boqwxp/logger-vector-to-dict
log: Use `dict` instead of `std::vector<std::pair>` for `log_expect_{error, warning, log}` to better express the intent that each element is unique.
2020-05-21 15:36:30 +02:00
Alberto Gonzalez
8297afe925
log: Use dict instead of std::vector<std::pair> for log_expect_{error, warning, log} to better express the intent that each element is unique. 2020-05-15 00:55:32 +00:00
Peter Crozier
495dcfc812 Consolidate Linux and Mac version of YS_DEBUGTRAP_IF_DEBUGGING. 2020-05-13 14:17:00 +01:00
Peter Crozier
3988f935b8 Extend YS_DEBUGTRAP to MacOS. 2020-05-13 13:11:49 +01:00
whitequark
e9f2d3f009 kernel: Trap in log_error() when a debugger is attached.
The workflow of debugging fatal pass errors in Yosys is flawed in
three ways:
 1. Running Yosys under a debugger is sufficient for the debugger
    to catch some fatal errors (segfaults, aborts, STL exceptions)
    but not others (`log_error()`, `log_cmd_error()`). This is
    neither obvious nor easy to remember.
 2. To catch Yosys-specific fatal errors, it is necessary to set
    a breakpoint at `logv_error_with_prefix()`, or at least,
    `logv_error()`. This is neither obvious nor easy to remember,
    and GDB's autocomplete takes many seconds to suggest function
    names due to the large amount of symbols in Yosys.
 3. If a breakpoint is not set and Yosys encounters with such
    a fatal error, the process terminates. When debugging a crash
    that takes a long time to reproduce (or a nondeterministic crash)
    this can waste a significant amount of time.

To solve this problem, add a macro `YS_DEBUGTRAP` that acts as a hard
breakpoint (if available), and a macro `YS_DEBUGTRAP_IF_DEBUGGING`
that acts as a hard breakpoint only if debugger is present.

Then, use `YS_DEBUGTRAP_IF_DEBUGGING` in `logv_error_with_prefix()`
to obviate the need for a breakpoint on nearly every platform.

Co-Authored-By: Alberto Gonzalez <boqwxp@airmail.cc>
2020-05-03 12:02:34 +00:00
Alberto Gonzalez
a4598d64ef
Hole value recovery and specialization implementation for qbfsat command. 2020-04-04 22:13:25 +00:00
Miodrag Milanovic
395daf6ced exclude clang from checking 2020-03-13 17:23:27 +01:00
Miodrag Milanovic
8f221118d2 Add YS_ prefix to macros, add explanation and apply to older version as well 2020-03-13 17:19:54 +01:00
Miodrag Milanovic
7c54e61979 Use boost xpressive for gcc 4.8 2020-03-13 14:58:35 +01:00
Miodrag Milanovic
d079ab9d19 Handle expect no warnings together with expected 2020-02-22 10:52:46 +01:00
Miodrag Milanovic
5641b0248f Option to expect no warnings 2020-02-17 15:36:06 +01:00
Miodrag Milanovic
31b7a9c312 Add expect option to logger command 2020-02-14 12:21:16 +01:00
Claire Wolf
5c2508cef8 Improve logging use of experimental features
Signed-off-by: Claire Wolf <clifford@clifford.at>
2020-01-28 17:51:50 +01:00
Claire Wolf
cef607c8b7 Add log_experimental() and experimental() API and "yosys -x"
Signed-off-by: Claire Wolf <clifford@clifford.at>
2020-01-27 18:27:47 +01:00
Eddie Hung
62c66406ad log_dump() to support State enum 2019-10-02 17:49:07 -07:00
Clifford Wolf
0c5db07cd6 Fix various NDEBUG compiler warnings, closes #1255
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-08-13 13:29:03 +02:00
Udi Finkelstein
ac10e7d96d Initial implementation of elaboration system tasks
(IEEE1800-2017 section 20.11)
This PR allows us to use $info/$warning/$error/$fatal **at elaboration time** within a generate block.
This is very useful to stop a synthesis of a parametrized block when an
illegal combination of parameters is chosen.
2019-05-03 03:10:43 +03:00
Clifford Wolf
e158ea2097 Add log_debug() framework
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-04-22 17:25:52 +02:00
Clifford Wolf
e70ebe557c Add optional nullstr argument to log_id()
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-01-15 11:06:48 +01:00
whitequark
efa278e232 Fix typographical and grammatical errors and inconsistencies.
The initial list of hits was generated with the codespell command
below, and each hit was evaluated and fixed manually while taking
context into consideration.

    DIRS="kernel/ frontends/ backends/ passes/ techlibs/"
    DIRS="${DIRS} libs/ezsat/ libs/subcircuit"
    codespell $DIRS -S *.o -L upto,iff,thru,synopsys,uint

More hits were found by looking through comments and strings manually.
2019-01-02 13:12:17 +00:00
Henner Zeller
1a60126a34 Provide source-location logging.
o Provide log_file_warning() and log_file_error() that prefix the log
  message with <filename>:<lineno>: to be easily picked up by IDEs that
  need to step through errors.
o Simplify some duplicate logging code in kernel/log.cc
o Use the new log functions in genrtlil.
2018-07-19 10:22:02 -07:00
Christian Krämer
c1ecb1b2f1 Add "#ifdef __FreeBSD__"
(Re-commit e3575a8 with corrected author field)
2018-05-13 13:08:26 +02:00
Clifford Wolf
1167538d26 Revert "Add "#ifdef __FreeBSD__""
This reverts commit e3575a86c5.
2018-05-13 13:06:36 +02:00
Johnny Sorocil
e3575a86c5 Add "#ifdef __FreeBSD__" 2018-05-05 13:02:44 +02:00
Clifford Wolf
5c03aeac60 Add "yosys -e regex" for turning warnings into errors
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-05-04 15:27:28 +02:00
Larry Doolittle
82fecc98c0 Harmonize uses of _WIN32 macro 2018-03-11 16:01:30 +01:00
Clifford Wolf
e5534a080e Improve handling of warning messages
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-03-04 22:35:59 +01:00
Clifford Wolf
2336d5508b Add log_warning_noprefix() API, Use for Verific warnings and errors 2017-07-27 12:17:04 +02:00
Clifford Wolf
c0ca99483c Store command history when terminating with an error 2017-06-20 04:41:58 +02:00
Clifford Wolf
828303791b Add "yosys -w" for suppressing warnings 2017-02-12 11:11:00 +01:00
Clifford Wolf
63dfdb5d7f Add log_wire() API 2017-02-11 11:08:36 +01:00
Clifford Wolf
a0dff87a57 Added "yosys -W regex" 2016-12-22 23:41:44 +01:00
Clifford Wolf
39da8eddae Added log_const() API 2016-08-09 19:56:10 +02:00
Clifford Wolf
a7b0769623 Added "read_verilog -dump_rtlil" 2016-07-27 15:40:17 +02:00
Clifford Wolf
f103bfb9ba Fixes for MXE build 2016-05-07 10:53:18 +02:00
Clifford Wolf
9aa4b3309c Added "yosys -D ALL" 2016-04-24 17:12:34 +02:00
Clifford Wolf
0bc95f1e04 Added "yosys -D" feature 2016-04-21 23:28:37 +02:00
Clifford Wolf
6f1b6dc322 Added log_dump() support for dict<> and pool<> containers 2016-03-31 09:57:44 +02:00
Andrei Errapart
744a5333f5 Microsoft Visual C++ fix for log.h. 2015-09-01 12:40:12 +02:00
Clifford Wolf
84bf862f7c Spell check (by Larry Doolittle) 2015-08-14 10:56:05 +02:00
Clifford Wolf
6c84341f22 Fixed trailing whitespaces 2015-07-02 11:14:30 +02:00
Clifford Wolf
98650a0609 Added log_dump() support for IdStrings 2015-06-08 14:49:02 +02:00
Clifford Wolf
e0e6d130cd YosysJS stuff 2015-02-19 13:36:54 +01:00
Clifford Wolf
2a9ad48eb6 Added ENABLE_NDEBUG makefile options 2015-01-24 12:16:46 +01:00
Clifford Wolf
8fe9ab50e5 Added #ifdef NDEBUG for log_assert() 2015-01-24 11:49:34 +01:00
Clifford Wolf
95f1eb9b87 Only enable code coverage counters on linux 2015-01-09 17:32:53 +01:00
Clifford Wolf
f9304e6c10 Print non-errors to stdout 2015-01-03 22:10:33 +01:00
Clifford Wolf
ecd64182c5 Added "yosys -X" 2014-12-29 13:33:33 +01:00
Clifford Wolf
9e6fb0b02c Replaced std::unordered_map as implementation for Yosys::dict 2014-12-26 21:35:22 +01:00
Clifford Wolf
e52d1f9b9a Added new_dict (hashmap.h) and re-enabled code coverage counters 2014-12-26 19:28:52 +01:00