mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-22 04:12:06 +00:00
Add expect option to logger command
This commit is contained in:
parent
0ba2a2b1fa
commit
31b7a9c312
4 changed files with 113 additions and 3 deletions
17
kernel/log.h
17
kernel/log.h
|
@ -135,6 +135,23 @@ void log_backtrace(const char *prefix, int levels);
|
|||
void log_reset_stack();
|
||||
void log_flush();
|
||||
|
||||
struct LogExpectedItem
|
||||
{
|
||||
LogExpectedItem(std::string pattern, int expected) :
|
||||
expected_count(expected),
|
||||
current_count(0),
|
||||
pattern(pattern)
|
||||
{
|
||||
}
|
||||
|
||||
int expected_count;
|
||||
int current_count;
|
||||
std::string pattern;
|
||||
};
|
||||
|
||||
extern std::vector<std::pair<std::regex,LogExpectedItem>> log_expect_log, log_expect_warning, log_expect_error;
|
||||
void log_check_expected();
|
||||
|
||||
const char *log_signal(const RTLIL::SigSpec &sig, bool autoint = true);
|
||||
const char *log_const(const RTLIL::Const &value, bool autoint = true);
|
||||
const char *log_id(RTLIL::IdString id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue