stnolting / neorv32-riscof

✔️Port of RISCOF to check the NEORV32 for RISC-V ISA compatibility.
https://github.com/stnolting/neorv32
BSD 3-Clause "New" or "Revised" License
25 stars 6 forks source link

Syntax error when running run.sh #49

Closed fortyone041 closed 1 year ago

fortyone041 commented 1 year ago

I'm quite new to this and I am trying to run to understand riscof. When runnning sh run.sh I get this

fortyone@pop-os:~/Documents/project/neorv32-riscof$ sh run.sh 
    NEORV32 Version:
    65:  constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01070903"; -- NEORV32 version - no touchy!

    INFO | ****** RISCOF: RISC-V Architectural Test Framework 1.25.2 *******
    INFO | using riscv_isac version : 0.16.1
    INFO | using riscv_config version : 3.5.1
    INFO | Reading configuration from: /home/fortyone/Documents/project/neorv32-riscof/config.ini
    INFO | Preparing Models
Traceback (most recent call last):
  File "/home/fortyone/.pyenv/versions/3.6.8/bin/riscof", line 11, in <module>
    load_entry_point('riscof==1.25.2', 'console_scripts', 'riscof')()
  File "/home/fortyone/.pyenv/versions/3.6.8/lib/python3.6/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/fortyone/.pyenv/versions/3.6.8/lib/python3.6/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/fortyone/.pyenv/versions/3.6.8/lib/python3.6/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/fortyone/.pyenv/versions/3.6.8/lib/python3.6/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/fortyone/.pyenv/versions/3.6.8/lib/python3.6/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/fortyone/.pyenv/versions/3.6.8/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/fortyone/.pyenv/versions/3.6.8/lib/python3.6/site-packages/riscof/cli.py", line 272, in run
    ctx.obj.dut,ctx.obj.base = prepare_models(ctx.obj.config_dir,ctx.obj.config)
  File "/home/fortyone/.pyenv/versions/3.6.8/lib/python3.6/site-packages/riscof/cli.py", line 77, in prepare_models
    dut_plugin = importlib.import_module("riscof_" + dut_model)
  File "/home/fortyone/.pyenv/versions/3.6.8/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 674, in exec_module
  File "<frozen importlib._bootstrap_external>", line 781, in get_code
  File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<fstring>", line 1
    (test=)
         ^
SyntaxError: invalid syntax

May I get some help on this ? Thank you

stnolting commented 1 year ago

Maybe there is a problem with your Python installation. Which version are you using?

$ python --version
Python 3.8.10

With this Python version everything works fine.

fortyone041 commented 1 year ago

Ah I see. I am running Python 3.6.8. I will try running with version 3.8.10 to see if it works. I'll edit this comment with the results.

Edit: Okay got it running. Thanks! But test failed at ebreak though.

stnolting commented 1 year ago

Okay got it running.

Great to hear!

But test failed at ebreak though.

That is normal. There is a problem with the configuration options of the Sail reference module. That is why a patch is applied to the default RISCOF framework. See https://github.com/stnolting/neorv32-riscof#compatibility-issues

stnolting commented 1 year ago

@fortyone041 can we close this? ;)

fortyone041 commented 1 year ago

Sure. Thanks for the help!