Skip to content

Commit f19d6bf

Browse files
committed
active_analyzer.py is updated to fix a wrong module name. controlflow_analyzer.py is updated to support various file formats as graphical output.
1 parent 66085d3 commit f19d6bf

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pyverilog/controlflow/active_analyzer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ def getActiveConditions_fsm(self, fsm_sig, funcdict):
6464
active_conditions = []
6565
fsm_sig_width = self.getWidth(fsm_sig)
6666
for condlist, func in sorted(funcdict.items(), key=lambda x:len(x[0])):
67-
node = state_transition.walkCondlist(condlist, fsm_sig, fsm_sig_width)
67+
node = transition.walkCondlist(condlist, fsm_sig, fsm_sig_width)
6868
state_node_list = []
69-
if isinstance(node, state_transition.StateNodeList):
69+
if isinstance(node, transition.StateNodeList):
7070
for n in node.nodelist: state_node_list.append(n)
7171
elif node:
7272
state_node_list.append(node)

pyverilog/controlflow/controlflow_analyzer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ def showVersion():
305305
default="TOP",help="Top module, Default=TOP")
306306
optparser.add_option("-s","--search",dest="searchtarget",action="append",
307307
default=[],help="Search Target Signal")
308+
optparser.add_option("--graphformat",dest="graphformat",
309+
default="png",help="Graph file format, Default=png")
308310
optparser.add_option("--nograph",action="store_true",dest="nograph",
309311
default=False,help="Non graph generation")
310312
optparser.add_option("--nolabel",action="store_true",dest="nolabel",
@@ -350,7 +352,7 @@ def showVersion():
350352
print('# DELAY CNT: %d' % fsm.delaycnt)
351353
fsm.view()
352354
if not options.nograph:
353-
fsm.tograph(filename=util.toFlatname(signame)+'.png', nolabel=options.nolabel)
355+
fsm.tograph(filename=util.toFlatname(signame)+'.'+options.graphformat, nolabel=options.nolabel)
354356
loops = fsm.get_loop()
355357
print('Loop')
356358
for loop in loops:

0 commit comments

Comments
 (0)