mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
restricted debugging to 3.9 only
This commit is contained in:
parent
48f7a5897c
commit
19066e0656
@ -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?
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user