3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-05 19:00:26 +00:00

tracy: init, zones per pass execute method, pointer-colored

This commit is contained in:
Emil J. Tywoniak 2024-05-28 23:51:17 +02:00
parent 5579685673
commit 0fb3f3a78e
180 changed files with 567 additions and 4 deletions

View file

@ -152,6 +152,9 @@ struct AddPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
std::string command;
std::string arg_name;
std::string enable_name = "";

View file

@ -101,6 +101,9 @@ struct AutonamePass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
{

View file

@ -36,6 +36,9 @@ struct BlackboxPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
{

View file

@ -399,6 +399,9 @@ struct BugpointPass : public Pass {
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
string yosys_cmd = "yosys", yosys_arg, grep, runner;
bool fast = false, clean = false;
bool modules = false, ports = false, cells = false, connections = false, processes = false, assigns = false, updates = false, wires = false, has_part = false;

View file

@ -62,6 +62,9 @@ struct CheckPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
int counter = 0;
bool noinit = false;
bool initdrv = false;

View file

@ -128,6 +128,9 @@ struct ChformalPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool assert2assume = false;
bool assume2assert = false;
bool live2fair = false;

View file

@ -42,6 +42,9 @@ struct ChtypePass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
IdString set_type;
dict<IdString, IdString> map_types;

View file

@ -52,6 +52,9 @@ struct CleanZeroWidthPass : public Pass {
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
{

View file

@ -80,6 +80,9 @@ struct ConnectPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool flag_nounset = false, flag_nomap = false, flag_assert = false;
std::string set_lhs, set_rhs, unset_expr;
std::string port_cell, port_port, port_expr;

View file

@ -167,6 +167,9 @@ struct ConnwrappersPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
ConnwrappersWorker worker;
size_t argidx;

View file

@ -38,6 +38,9 @@ struct CopyPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
if (args.size() != 3)
log_cmd_error("Invalid number of arguments!\n");

View file

@ -85,6 +85,9 @@ struct CoverPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
std::vector<FILE*> out_files;
std::vector<std::string> patterns;
bool do_log = true;

View file

@ -42,6 +42,9 @@ struct DeletePass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool flag_input = false;
bool flag_output = false;

View file

@ -107,6 +107,9 @@ struct DesignPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool got_mode = false;
bool reset_mode = false;
bool reset_vlog_mode = false;

View file

@ -972,6 +972,9 @@ struct DftTagPass : public Pass {
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
DftTagOptions options;
log_header(design, "Executing DFT_TAG pass.\n");

View file

@ -37,6 +37,9 @@ struct EdgetypePass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++) {
// if (args[argidx] == "-ltr") {

View file

@ -73,6 +73,9 @@ struct ExecPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
std::string cmd = "";
char buf[1024] = {};
std::string linebuf = "";

View file

@ -119,6 +119,9 @@ struct FuturePass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
FutureOptions options;
log_header(design, "Executing FUTURE pass.\n");

View file

@ -517,6 +517,9 @@ struct GliftPass : public Pass {
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool opt_create_precise_model = false, opt_create_imprecise_model = false, opt_create_instrumented_model = false;
bool opt_taintconstants = false, opt_keepoutputs = false, opt_simplecostmodel = false, opt_nocostmodel = false;
bool opt_instrumentmore = false;

View file

@ -65,6 +65,9 @@ struct LogPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design* design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx;
bool to_stdout = false;
bool to_stderr = false;

View file

@ -73,6 +73,9 @@ struct LoggerPass : public Pass {
void execute(std::vector<std::string> args, RTLIL::Design * design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
{

View file

@ -156,6 +156,9 @@ struct LtpPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool noff = false;
log_header(design, "Executing LTP pass (find longest path).\n");

View file

@ -142,6 +142,9 @@ struct PluginPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
std::string plugin_filename;
std::vector<std::string> plugin_aliases;
bool list_mode = false;

View file

@ -41,6 +41,9 @@ struct PortlistPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool m_mode = false;
size_t argidx;

View file

@ -50,6 +50,9 @@ struct PrintAttrsPass : public Pass {
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx = 1;
extra_args(args, argidx, design);

View file

@ -810,6 +810,9 @@ struct QwpPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
QwpConfig config;
xorshift32_state = 123456789;

View file

@ -256,6 +256,9 @@ struct RenamePass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
std::string pattern_prefix = "_", pattern_suffix = "_";
std::string cell_suffix = "";
bool flag_src = false;

View file

@ -43,6 +43,9 @@ struct ScatterPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
CellTypes ct(design);
extra_args(args, 1, design);

View file

@ -294,6 +294,9 @@ struct SccPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
dict<std::string, std::string> setAttr;
bool allCellTypes = false;
bool selectMode = false;

View file

@ -66,6 +66,9 @@ struct ScratchpadPass : public Pass {
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
{

View file

@ -1254,6 +1254,9 @@ struct SelectPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool add_mode = false;
bool del_mode = false;
bool clear_mode = false;
@ -1622,6 +1625,9 @@ struct CdPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
if (args.size() != 1 && args.size() != 2)
log_cmd_error("Invalid number of arguments.\n");
@ -1713,6 +1719,9 @@ struct LsPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx = 1;
extra_args(args, argidx, design);

View file

@ -71,6 +71,9 @@ struct SetattrPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
std::vector<setunset_t> setunset_list;
bool flag_mod = false;
@ -140,6 +143,9 @@ struct WbflipPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
{
@ -181,6 +187,9 @@ struct SetparamPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
vector<setunset_t> setunset_list;
string new_cell_type;
@ -236,6 +245,9 @@ struct ChparamPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
std::vector<setunset_t> setunset_list;
dict<RTLIL::IdString, RTLIL::Const> new_parameters;
bool list_mode = false;

View file

@ -150,6 +150,9 @@ struct SetundefPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
int got_value = 0;
bool undriven_mode = false;
bool expose_mode = false;

View file

@ -752,6 +752,9 @@ struct ShowPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
log_header(design, "Generating Graphviz representation of design.\n");
log_push();

View file

@ -289,6 +289,9 @@ struct SplicePass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool sel_by_cell = false;
bool sel_by_wire = false;
bool sel_any_bit = false;

View file

@ -220,6 +220,9 @@ struct SplitcellsPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
std::string format;
log_header(design, "Executing SPLITCELLS pass (splitting up multi-bit cells).\n");

View file

@ -119,6 +119,9 @@ struct SplitnetsPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool flag_ports = false;
bool flag_driver = false;
std::string format = "[]:";

View file

@ -287,6 +287,9 @@ struct StaPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
log_header(design, "Executing STA pass (static timing analysis).\n");
/*

View file

@ -404,6 +404,9 @@ struct StatPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool width_mode = false, json_mode = false;
RTLIL::Module *top_mod = nullptr;
std::map<RTLIL::IdString, statdata_t> mod_stat;

View file

@ -54,6 +54,9 @@ struct TeePass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
std::vector<FILE*> backup_log_files, files_to_close;
std::vector<std::ostream*> backup_log_streams;
std::vector<std::string> backup_log_scratchpads;

View file

@ -45,6 +45,9 @@ struct TorderPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool noautostop = false;
dict<IdString, pool<IdString>> stop_db;

View file

@ -72,6 +72,9 @@ struct TracePass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
{
@ -107,6 +110,9 @@ struct DebugPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
{

View file

@ -889,6 +889,9 @@ struct VizPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
log_header(design, "Generating Graphviz representation of design.\n");
log_push();

View file

@ -46,6 +46,9 @@ struct WriteFileFrontend : public Frontend {
}
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design*) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
bool append_mode = false;
std::string output_filename;

View file

@ -1154,6 +1154,9 @@ struct XpropPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
ZoneScoped;
ZoneText(pass_name.c_str(), pass_name.length());
ZoneColor((uint32_t)(size_t)pass_name.c_str());
XpropOptions options;
log_header(design, "Executing XPROP pass.\n");