From 19066e06569e6ee8ef0325ad04c39b8997949888 Mon Sep 17 00:00:00 2001 From: Josy Boelen Date: Sun, 7 Mar 2021 11:06:26 +0100 Subject: [PATCH] restricted debugging to 3.9 only --- myhdl/conversion/_analyze.py | 2 +- myhdl/conversion/_toVHDL.py | 4 ++-- myhdl/conversion/_toVerilog.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/myhdl/conversion/_analyze.py b/myhdl/conversion/_analyze.py index b42ebf55..e90a319f 100644 --- a/myhdl/conversion/_analyze.py +++ b/myhdl/conversion/_analyze.py @@ -682,7 +682,7 @@ class _AnalyzeVisitor(ast.NodeVisitor, _ConversionMixin): elif v == 1: node.edge = sig.posedge - if sys.version_info >= (3, 8, 0): + if sys.version_info >= (3, 9, 0): def visit_Constant(self, node): node.obj = None # safeguarding? diff --git a/myhdl/conversion/_toVHDL.py b/myhdl/conversion/_toVHDL.py index e3aec5c4..d7165c4e 100644 --- a/myhdl/conversion/_toVHDL.py +++ b/myhdl/conversion/_toVHDL.py @@ -1192,7 +1192,7 @@ class _ConvertVisitor(ast.NodeVisitor, _ConversionMixin): self.visit(right) self.write(suf) - if sys.version_info >= (3, 8, 0): + if sys.version_info >= (3, 9, 0): def visit_Constant(self, node): if isinstance(node.value, int): @@ -2291,7 +2291,7 @@ class _AnnotateTypesVisitor(ast.NodeVisitor, _ConversionMixin): right.vhd = vhd_signed(right.vhd.size + 1) node.vhdOri = copy(node.vhd) - if sys.version_info >= (3, 8, 0): + if sys.version_info >= (3, 9, 0): def visit_Constant(self, node): if isinstance(node.value, int): diff --git a/myhdl/conversion/_toVerilog.py b/myhdl/conversion/_toVerilog.py index e6e2499d..da790ac9 100644 --- a/myhdl/conversion/_toVerilog.py +++ b/myhdl/conversion/_toVerilog.py @@ -1133,7 +1133,7 @@ class _ConvertVisitor(ast.NodeVisitor, _ConversionMixin): elif isinstance(obj, int): s = self.IntRepr(obj) elif isinstance(obj, tuple): # Python3.9+ ast.Index serves a tuple - print(obj) + print('toVerilog', addSignBit, n, obj) s = n # # print(ast.dump(ast.parse('l[i]', mode='eval'))) # # Expression(body=Subscript(value=Name(id='l', ctx=Load()), slice=Index(value=Name(id='i', ctx=Load())), ctx=Load())) @@ -1647,7 +1647,7 @@ class _AnnotateTypesVisitor(ast.NodeVisitor, _ConversionMixin): return self.generic_visit(node) - if sys.version_info >= (3, 8, 0): + if sys.version_info >= (3, 9, 0): def visit_Constant(self, node): node.signed = False