mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-24 16:12:33 +00:00
Merge remote-tracking branch 'upstream' into merge3
This commit is contained in:
commit
3783a820ee
655 changed files with 11031 additions and 9437 deletions
|
|
@ -217,7 +217,7 @@ struct CheckPass : public Pass {
|
|||
|
||||
const int threshold = 1024;
|
||||
|
||||
// if the multiplication may overflow we will catch it here
|
||||
// if the multiplication may overflow we will catch it here
|
||||
if (in_widths + out_widths >= threshold)
|
||||
return true;
|
||||
|
||||
|
|
@ -400,7 +400,7 @@ struct CheckPass : public Pass {
|
|||
|
||||
message += stringf(" cell %s (%s)%s\n", driver, driver->type.unescape(), driver_src);
|
||||
|
||||
if (!coarsened_cells.count(driver)) {
|
||||
if (!coarsened_cells.count(driver)) {
|
||||
MatchingEdgePrinter printer(message, sigmap, prev, bit);
|
||||
printer.add_edges_from_cell(driver);
|
||||
} else {
|
||||
|
|
@ -414,7 +414,7 @@ struct CheckPass : public Pass {
|
|||
std::string src_attr = wire->get_src_attribute();
|
||||
wire_src = stringf(" source: %s", src_attr);
|
||||
}
|
||||
message += stringf(" wire %s%s\n", log_signal(SigBit(wire, pair.second)), wire_src);
|
||||
message += stringf(" wire %s%s\n", log_signal(SigBit(wire, pair.second)), wire_src);
|
||||
}
|
||||
|
||||
prev = bit;
|
||||
|
|
@ -502,12 +502,12 @@ struct CheckMemPass : public Pass {
|
|||
for (auto &init : mem.inits) {
|
||||
int start = init.addr.as_int();
|
||||
if (start < min_addr) {
|
||||
log_warning("Mem %s.%s starts at %d but initializes address %d.\n", log_id(module), log_id(mem.mem), min_addr, start);
|
||||
log_warning("Mem %s.%s starts at %d but initializes address %d.\n", module, mem.mem, min_addr, start);
|
||||
counter++;
|
||||
}
|
||||
int end = start + (GetSize(init.data) / mem.width) - 1;
|
||||
if (end > max_addr) {
|
||||
log_warning("Mem %s.%s ends at %d but initializes address %d.\n", log_id(module), log_id(mem.mem), max_addr, end);
|
||||
log_warning("Mem %s.%s ends at %d but initializes address %d.\n", module, mem.mem, max_addr, end);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
|
@ -516,7 +516,7 @@ struct CheckMemPass : public Pass {
|
|||
if (addr_sig.is_fully_const()) {
|
||||
auto addr = addr_sig.as_int();
|
||||
if (addr < min_addr || addr > max_addr) {
|
||||
log_warning("Mem %s.%s contains entries for addresses %d..%d but %s address %d.\n", log_id(module), log_id(mem.mem), min_addr, max_addr, access, addr);
|
||||
log_warning("Mem %s.%s contains entries for addresses %d..%d but %s address %d.\n", module, mem.mem, min_addr, max_addr, access, addr);
|
||||
counter++;
|
||||
}
|
||||
} else if (nonconst_mode) {
|
||||
|
|
@ -525,7 +525,7 @@ struct CheckMemPass : public Pass {
|
|||
int addr_sig_min = 0;
|
||||
int addr_sig_max = (1 << addr_sig.size()) - 1;
|
||||
if (min_addr > addr_sig_min || max_addr < addr_sig_max) {
|
||||
log_warning("Mem %s.%s contains entries for addresses %d..%d but has a potentially dangerous non-const input %s\n", log_id(module), log_id(mem.mem), min_addr, max_addr, log_signal(addr_sig));
|
||||
log_warning("Mem %s.%s contains entries for addresses %d..%d but has a potentially dangerous non-const input %s\n", module, mem.mem, min_addr, max_addr, log_signal(addr_sig));
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -401,4 +401,3 @@ struct DesignPass : public Pass {
|
|||
} DesignPass;
|
||||
|
||||
YOSYS_NAMESPACE_END
|
||||
|
||||
|
|
|
|||
|
|
@ -158,7 +158,6 @@ struct ExecPass : public Pass {
|
|||
int status = 0;
|
||||
int retval = 0;
|
||||
|
||||
#ifndef EMSCRIPTEN
|
||||
FILE *f = popen(cmd.c_str(), "r");
|
||||
if (f == nullptr)
|
||||
log_cmd_error("errno %d after popen() returned NULL.\n", errno);
|
||||
|
|
@ -183,7 +182,6 @@ struct ExecPass : public Pass {
|
|||
}
|
||||
}
|
||||
status = pclose(f);
|
||||
#endif
|
||||
|
||||
if(WIFEXITED(status)) {
|
||||
retval = WEXITSTATUS(status);
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ struct CoveragePass : public Pass {
|
|||
|
||||
std::map<std::string, std::set<int>> uncovered_lines;
|
||||
std::map<std::string, std::set<int>> all_lines;
|
||||
|
||||
|
||||
for (auto module : design->modules())
|
||||
{
|
||||
log_debug("Module %s:\n", module);
|
||||
|
|
@ -136,7 +136,7 @@ struct CoveragePass : public Pass {
|
|||
fout << "DA:" << l << ",";
|
||||
if (uncovered_lines.count(file_entry.first) && uncovered_lines[file_entry.first].count(l))
|
||||
fout << "0";
|
||||
else
|
||||
else
|
||||
fout << "1";
|
||||
fout << "\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ struct LinuxPerf : public Pass {
|
|||
bool formatted_help() override
|
||||
{
|
||||
auto *help = PrettyHelp::get_current();
|
||||
|
||||
|
||||
auto content_root = help->get_root();
|
||||
|
||||
content_root->usage("linux_perf [on|off]");
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ struct LoggerPass : public Pass {
|
|||
}
|
||||
if (args[argidx] == "-warn" && argidx+1 < args.size()) {
|
||||
std::string pattern = args[++argidx];
|
||||
if (pattern.front() == '\"' && pattern.back() == '\"') pattern = pattern.substr(1, pattern.size() - 2);
|
||||
if (pattern.front() == '\"' && pattern.back() == '\"') pattern = pattern.substr(1, pattern.size() - 2);
|
||||
try {
|
||||
log("Added regex '%s' for warnings to warn list.\n", pattern);
|
||||
log_warn_regexes.push_back(YS_REGEX_COMPILE(pattern));
|
||||
|
|
@ -118,7 +118,7 @@ struct LoggerPass : public Pass {
|
|||
}
|
||||
if (args[argidx] == "-nowarn" && argidx+1 < args.size()) {
|
||||
std::string pattern = args[++argidx];
|
||||
if (pattern.front() == '\"' && pattern.back() == '\"') pattern = pattern.substr(1, pattern.size() - 2);
|
||||
if (pattern.front() == '\"' && pattern.back() == '\"') pattern = pattern.substr(1, pattern.size() - 2);
|
||||
try {
|
||||
log("Added regex '%s' for warnings to nowarn list.\n", pattern);
|
||||
log_nowarn_regexes.push_back(YS_REGEX_COMPILE(pattern));
|
||||
|
|
@ -130,7 +130,7 @@ struct LoggerPass : public Pass {
|
|||
}
|
||||
if (args[argidx] == "-werror" && argidx+1 < args.size()) {
|
||||
std::string pattern = args[++argidx];
|
||||
if (pattern.front() == '\"' && pattern.back() == '\"') pattern = pattern.substr(1, pattern.size() - 2);
|
||||
if (pattern.front() == '\"' && pattern.back() == '\"') pattern = pattern.substr(1, pattern.size() - 2);
|
||||
try {
|
||||
log("Added regex '%s' for warnings to werror list.\n", pattern);
|
||||
log_werror_regexes.push_back(YS_REGEX_COMPILE(pattern));
|
||||
|
|
|
|||
|
|
@ -1472,7 +1472,7 @@ struct SelectPass : public Pass {
|
|||
const char *common_flagset = "-add, -del, -assert-none, -assert-any, -assert-mod-count, -assert-count, -assert-max, or -assert-min";
|
||||
|
||||
if (common_flagset_tally > 1)
|
||||
log_cmd_error("Options %s can not be combined.\n", common_flagset);
|
||||
log_cmd_error("Options %s can not be combined.\n", common_flagset);
|
||||
|
||||
if ((list_mode || !write_file.empty() || count_mode) && common_flagset_tally)
|
||||
log_cmd_error("Options -list, -list-mod, -write and -count can not be combined with %s.\n", common_flagset);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ struct setunset_t
|
|||
if (!RTLIL::SigSpec::parse(sig_value, nullptr, set_value))
|
||||
log_cmd_error("Can't decode value '%s'!\n", set_value);
|
||||
value = sig_value.as_const();
|
||||
value.tag_bare_integer_const(set_value);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -47,14 +47,14 @@ struct SetenvPass : public Pass {
|
|||
std::string name = args[1];
|
||||
std::string value = args[2];
|
||||
if (value.front() == '\"' && value.back() == '\"') value = value.substr(1, value.size() - 2);
|
||||
|
||||
|
||||
#if defined(_WIN32)
|
||||
_putenv_s(name.c_str(), value.c_str());
|
||||
#else
|
||||
if (setenv(name.c_str(), value.c_str(), 1))
|
||||
log_cmd_error("Invalid name \"%s\".\n", name);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
} SetenvPass;
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ struct EstimateSta {
|
|||
if (aigs.at(fingerprint).name.empty()) {
|
||||
log_error("Unsupported cell '%s' in module '%s'",
|
||||
cell->type.unescape(), m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
combinational.push_back(cell);
|
||||
|
|
@ -217,9 +217,9 @@ struct EstimateSta {
|
|||
|
||||
if (!topo.sort())
|
||||
log_error("Module '%s' contains combinational loops", m);
|
||||
|
||||
|
||||
// now we determine how long it takes for signals to stabilize
|
||||
|
||||
|
||||
// `levels` records the time after a clock edge after which a signal is stable
|
||||
dict<std::tuple<SigBit, Cell *, AigNode *>, arrivalint> levels;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue