URL
https://opencores.org/ocsvn/ssbcc/ssbcc/trunk
[/] [ssbcc/] [trunk/] [ssbccUtil.py] - Diff between revs 12 and 13
Show entire file |
Details |
Blame |
View Log
Rev 12 |
Rev 13 |
Line 128... |
Line 128... |
two integers.
|
two integers.
|
Allow underscores as per Verilog.
|
Allow underscores as per Verilog.
|
"""
|
"""
|
if re.match(r'(0|-?[1-9][0-9_]*)$',value):
|
if re.match(r'(0|-?[1-9][0-9_]*)$',value):
|
return True;
|
return True;
|
elif re.match(r'(-?[1-9][0-9_]*\(\*[1-9][0-9_]*\)+)$',value):
|
elif re.match(r'(-?[1-9][0-9_]*(\*[1-9][0-9_]*)+)$',value):
|
return True;
|
return True;
|
else:
|
else:
|
return False;
|
return False;
|
|
|
def IsPosInt(v):
|
def IsPosInt(v):
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.