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:
|
elif v == 1:
|
||||||
node.edge = sig.posedge
|
node.edge = sig.posedge
|
||||||
|
|
||||||
if sys.version_info >= (3, 8, 0):
|
if sys.version_info >= (3, 9, 0):
|
||||||
|
|
||||||
def visit_Constant(self, node):
|
def visit_Constant(self, node):
|
||||||
node.obj = None # safeguarding?
|
node.obj = None # safeguarding?
|
||||||
|
@ -1192,7 +1192,7 @@ class _ConvertVisitor(ast.NodeVisitor, _ConversionMixin):
|
|||||||
self.visit(right)
|
self.visit(right)
|
||||||
self.write(suf)
|
self.write(suf)
|
||||||
|
|
||||||
if sys.version_info >= (3, 8, 0):
|
if sys.version_info >= (3, 9, 0):
|
||||||
|
|
||||||
def visit_Constant(self, node):
|
def visit_Constant(self, node):
|
||||||
if isinstance(node.value, int):
|
if isinstance(node.value, int):
|
||||||
@ -2291,7 +2291,7 @@ class _AnnotateTypesVisitor(ast.NodeVisitor, _ConversionMixin):
|
|||||||
right.vhd = vhd_signed(right.vhd.size + 1)
|
right.vhd = vhd_signed(right.vhd.size + 1)
|
||||||
node.vhdOri = copy(node.vhd)
|
node.vhdOri = copy(node.vhd)
|
||||||
|
|
||||||
if sys.version_info >= (3, 8, 0):
|
if sys.version_info >= (3, 9, 0):
|
||||||
|
|
||||||
def visit_Constant(self, node):
|
def visit_Constant(self, node):
|
||||||
if isinstance(node.value, int):
|
if isinstance(node.value, int):
|
||||||
|
@ -1133,7 +1133,7 @@ class _ConvertVisitor(ast.NodeVisitor, _ConversionMixin):
|
|||||||
elif isinstance(obj, int):
|
elif isinstance(obj, int):
|
||||||
s = self.IntRepr(obj)
|
s = self.IntRepr(obj)
|
||||||
elif isinstance(obj, tuple): # Python3.9+ ast.Index serves a tuple
|
elif isinstance(obj, tuple): # Python3.9+ ast.Index serves a tuple
|
||||||
print(obj)
|
print('toVerilog', addSignBit, n, obj)
|
||||||
s = n
|
s = n
|
||||||
# # print(ast.dump(ast.parse('l[i]', mode='eval')))
|
# # 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()))
|
# # 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
|
return
|
||||||
self.generic_visit(node)
|
self.generic_visit(node)
|
||||||
|
|
||||||
if sys.version_info >= (3, 8, 0):
|
if sys.version_info >= (3, 9, 0):
|
||||||
|
|
||||||
def visit_Constant(self, node):
|
def visit_Constant(self, node):
|
||||||
node.signed = False
|
node.signed = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user