aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/scripts/generator/cpp
ModeNameSize
-rwxr-xr-x__init__.py0logstatsplain
-rwxr-xr-xast.py62772logstatsplain
-rwxr-xr-xgmock_class.py8293logstatsplain
-rwxr-xr-xgmock_class_test.py11356logstatsplain
-rwxr-xr-xkeywords.py2004logstatsplain
-rwxr-xr-xtokenize.py9752logstatsplain
-rwxr-xr-xutils.py1153logstatsplain
2; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/python3

from pyosys import libyosys as ys

import matplotlib.pyplot as plt
import numpy as np

design = ys.Design()
ys.run_pass("read_verilog ../../tests/simple/fiedler-cooley.v", design);
ys.run_pass("prep", design)
ys.run_pass("opt -full", design)

cell_stats = {}
for module in design.selected_whole_modules_warn():
  for cell in module.selected_cells():
    if cell.type.str() in cell_stats:
      cell_stats[cell.type.str()] += 1
    else:
      cell_stats[cell.type.str()] = 1
plt.bar(range(len(cell_stats)), height = list(cell_stats.values()),align='center')
plt.xticks(range(len(cell_stats)), list(cell_stats.keys()))
plt.show()