You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the "xx" is not identified as an integer. here are the 3 form of the same:
(3 downto 0) -- passes
(03 downto 0) -- fails
( 3 downto 0) -- fails.
it returns that error: Cannot use str_expression on
The function
`
def str_expression(item):
'''
Returns a string representation of the mathematical equation.
>>> str_expression(Addition([Term(number=3, expression='fish'), Term(number=1, expression='bear')]))
'(3*fish+bear)'
'''
if isinstance(item, str):
o = item
elif isinstance(item, int):
o = str(item)
elif isinstance(item, float):
if int(item) == item:
o = str(int(item))
else:
o = str(item)
elif hasattr(item, 'str_expression'):
o = item.str_expression()
else:
raise MathParsingError('Cannot use str_expression on {}'.format(item))
return o
`
is in "math_parser.py"
when I write my own code, it's not an issue. I can workaround the limitation. When using open source IPs that uses the two failing form, it forces to modifiy the original source code and rework it every time we fetch from the source. I found the bug parsing https://github.com/stnolting/neorv32/blob/main/rtl/core/neorv32_package.vhd
Even with this bug, slvcodec advantages outway by far the little maintenance after a fetch from origin. Thanks for this great utility.
The text was updated successfully, but these errors were encountered:
the "xx" is not identified as an integer. here are the 3 form of the same:
(3 downto 0) -- passes
(03 downto 0) -- fails
( 3 downto 0) -- fails.
it returns that error:
Cannot use str_expression on
The function
`
def str_expression(item):
'''
Returns a string representation of the mathematical equation.
`
is in "math_parser.py"
when I write my own code, it's not an issue. I can workaround the limitation. When using open source IPs that uses the two failing form, it forces to modifiy the original source code and rework it every time we fetch from the source. I found the bug parsing
https://github.com/stnolting/neorv32/blob/main/rtl/core/neorv32_package.vhd
Even with this bug, slvcodec advantages outway by far the little maintenance after a fetch from origin. Thanks for this great utility.
The text was updated successfully, but these errors were encountered: