Skip to content

Commit

Permalink
Remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jandecaluwe committed Jan 30, 2016
1 parent 1971a56 commit 82f43f0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion myhdl/conversion/_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ def isboundmethod(m):
return ismethod(m) and m.__self__ is not None


def _analyzeTopFunc(top_inst, func, *args, **kwargs):
def _analyzeTopFunc(func, *args, **kwargs):
tree = _makeAST(func)
v = _AnalyzeTopFuncVisitor(func, tree, *args, **kwargs)
v.visit(tree)
Expand Down
18 changes: 5 additions & 13 deletions myhdl/conversion/_toVHDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ def __call__(self, func, *args, **kwargs):
_annotateTypes(genlist)

### infer interface
top_inst = h.hierarchy[0]
intf = _analyzeTopFunc(top_inst, func, *args, **kwargs)
intf = _analyzeTopFunc(func, *args, **kwargs)
intf.name = name
# sanity checks on interface
for portname in intf.argnames:
Expand Down Expand Up @@ -476,13 +475,13 @@ def _convertGens(genlist, siglist, memlist, vfile):
if w <= 31:
pre, suf = "to_signed(", ", %s)" % w
else:
pre, suf = "signed'(", ")"
pre, suf = "signed'(", ")"
c = '"%s"' % bin(c, w)
else:
if w <= 31:
pre, suf = "to_unsigned(", ", %s)" % w
else:
pre, suf = "unsigned'(", ")"
pre, suf = "unsigned'(", ")"
c = '"%s"' % bin(c, w)
else:
raise ToVHDLError("Unexpected type for constant signal", s._name)
Expand Down Expand Up @@ -1093,7 +1092,7 @@ def visit_Expr(self, node):
self.write(';')

def visit_IfExp(self, node):
# propagate the node's vhd attribute
# propagate the node's vhd attribute
node.body.vhd = node.orelse.vhd = node.vhd
self.write('tern_op(')
self.write('cond => ')
Expand Down Expand Up @@ -1310,7 +1309,7 @@ def getName(self, node):
if isinstance(node.vhd, vhd_int):
s = self.IntRepr(obj)
elif isinstance(node.vhd, vhd_boolean):
s = "%s" % bool(obj)
s = "%s" % bool(obj)
elif isinstance(node.vhd, vhd_std_logic):
s = "'%s'" % int(obj)
elif isinstance(node.vhd, vhd_unsigned):
Expand Down Expand Up @@ -2257,10 +2256,3 @@ def _annotateTypes(genlist):
continue
v = _AnnotateTypesVisitor(tree)
v.visit(tree)







7 changes: 2 additions & 5 deletions myhdl/conversion/_toVerilog.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def __call__(self, func, *args, **kwargs):
genlist = _analyzeGens(arglist, h.absnames)
siglist, memlist = _analyzeSigs(h.hierarchy)
_annotateTypes(genlist)
top_inst = h.hierarchy[0]
intf = _analyzeTopFunc(top_inst, func, *args, **kwargs)

intf = _analyzeTopFunc(func, *args, **kwargs)
intf.name = name
doc = _makeDoc(inspect.getdoc(func))

Expand Down Expand Up @@ -1570,6 +1570,3 @@ def _annotateTypes(genlist):
continue
v = _AnnotateTypesVisitor(tree)
v.visit(tree)



3 changes: 3 additions & 0 deletions myhdl/test/conversion/toVHDL/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ ghdl:

clean:
- rm *.o *.out *.v *.vhd *.pyc *~ *.vcd* *.log *_ghdl

gitclean:
git clean -dfx

0 comments on commit 82f43f0

Please sign in to comment.