aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorMartin Povišer <povik@cutebit.org>2023-01-12 17:03:13 +0100
committerMartin Povišer <povik@cutebit.org>2023-01-13 19:57:24 +0100
commit13700e12e5ef62a9d462ddf8ec883ab19ba1d700 (patch)
tree782c1f9a1a8a3bb7f774cbe95425a581a6019180 /passes
parente3709ce7767c0e23568cf89366fc049a47bdc5e1 (diff)
downloadyosys-13700e12e5ef62a9d462ddf8ec883ab19ba1d700.tar.gz
yosys-13700e12e5ef62a9d462ddf8ec883ab19ba1d700.tar.bz2
yosys-13700e12e5ef62a9d462ddf8ec883ab19ba1d700.zip
passes: show: s/idx/dot_idx/ for readability
Signed-off-by: Martin Povišer <povik@cutebit.org>
Diffstat (limited to 'passes')
-rw-r--r--passes/cmds/show.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/passes/cmds/show.cc b/passes/cmds/show.cc
index 850bd1889..bd9d1ef4e 100644
--- a/passes/cmds/show.cc
+++ b/passes/cmds/show.cc
@@ -239,9 +239,9 @@ struct ShowWorker
std::string net = gen_signode_simple(sig);
if (net.empty())
{
+ int dot_idx = single_idx_count++;
std::string label_string;
int pos = sig.size()-1;
- int idx = single_idx_count++;
for (int rep, i = int(sig.chunks().size())-1; i >= 0; i -= rep) {
const RTLIL::SigChunk &c = sig.chunks().at(i);
int cl, cr;
@@ -273,7 +273,7 @@ struct ShowWorker
if (driver) {
log_assert(!net.empty());
label_string += stringf("<s%d> %d:%d - %s%d:%d |", i, pos, pos-rep*c.width+1, repinfo.c_str(), cl, cr);
- net_conn_map[net].in.insert({stringf("x%d:s%d", idx, i), rep*c.width});
+ net_conn_map[net].in.insert({stringf("x%d:s%d", dot_idx, i), rep*c.width});
net_conn_map[net].color = nextColor(c, net_conn_map[net].color);
} else
if (net.empty()) {
@@ -286,24 +286,24 @@ struct ShowWorker
pos, pos-rep*c.width+1);
} else {
label_string += stringf("<s%d> %s%d:%d - %d:%d |", i, repinfo.c_str(), cl, cr, pos, pos-rep*c.width+1);
- net_conn_map[net].out.insert({stringf("x%d:s%d", idx, i), rep*c.width});
+ net_conn_map[net].out.insert({stringf("x%d:s%d", dot_idx, i), rep*c.width});
net_conn_map[net].color = nextColor(c, net_conn_map[net].color);
}
pos -= rep * c.width;
}
if (label_string[label_string.size()-1] == '|')
label_string = label_string.substr(0, label_string.size()-1);
- code += stringf("x%d [ shape=record, style=rounded, label=\"%s\" ];\n", idx, label_string.c_str());
+ code += stringf("x%d [ shape=record, style=rounded, label=\"%s\" ];\n", dot_idx, label_string.c_str());
if (!port.empty()) {
currentColor = xorshift32(currentColor);
log_warning("WIDTHLABEL %s %d\n", log_signal(sig), GetSize(sig));
if (driver)
- code += stringf("%s:e -> x%d:w [arrowhead=odiamond, arrowtail=odiamond, dir=both, %s, %s];\n", port.c_str(), idx, nextColor(sig).c_str(), widthLabel(sig.size()).c_str());
+ code += stringf("%s:e -> x%d:w [arrowhead=odiamond, arrowtail=odiamond, dir=both, %s, %s];\n", port.c_str(), dot_idx, nextColor(sig).c_str(), widthLabel(sig.size()).c_str());
else
- code += stringf("x%d:e -> %s:w [arrowhead=odiamond, arrowtail=odiamond, dir=both, %s, %s];\n", idx, port.c_str(), nextColor(sig).c_str(), widthLabel(sig.size()).c_str());
+ code += stringf("x%d:e -> %s:w [arrowhead=odiamond, arrowtail=odiamond, dir=both, %s, %s];\n", dot_idx, port.c_str(), nextColor(sig).c_str(), widthLabel(sig.size()).c_str());
}
if (node != nullptr)
- *node = stringf("x%d", idx);
+ *node = stringf("x%d", dot_idx);
}
else
{