ipyxact icon indicating copy to clipboard operation
ipyxact copied to clipboard

cannot load leon2 registers file

Open bat52 opened this issue 4 years ago • 1 comments

loading leon2 register description file https://github.com/bat52/cheap_pie/blob/master/devices/leon2_creg.xml fails with this error

ValueError: invalid literal for int() with base 10: '4 * (2 ** 10)'

bat52 avatar Oct 27 '21 23:10 bat52

In order to evaluate these expressions, we need to have a full systemverilog expression parser within ipyxact, which we don't. There are basically three ways to handle this.

  1. Write a full systemverilog expression parser in Python. This is probably a terrible idea that would require an insane amount of work
  2. Integrate an existing systemverilog expression parser. Perhaps we can use e.g. verible, surelog or verilator for this, but I haven't looked into how hard it would be to extract the expression parser from any of those.
  3. Handle this on a case-by-case basis and just keep adding support when we encounter issues. Long-term, this would be terrible, but might be a reasonable path forward short-term

olofk avatar Dec 14 '23 11:12 olofk