Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] please give example how to run luna/examples #258

Open
hstarmans opened this issue May 31, 2024 · 1 comment
Open

[DOC] please give example how to run luna/examples #258

hstarmans opened this issue May 31, 2024 · 1 comment
Assignees
Labels
question question from the community that is not technical support

Comments

@hstarmans
Copy link

hstarmans commented May 31, 2024

Thank for your effort and keeping this repo up to date, I get several warning when using code from the repo and I am not sure how to use it anymore.
How do I run the blinky test?
I now do the following

git clone https://github.com/greatscottgadgets/luna.git
cd luna/
python3 -m venv .venv
source .venv/bin/activate
pip install .
pip install cynthion
pip install git+https://github.com/amaranth-lang/amaranth-boards
pip install yowasp-nextpnr-ecp5
pip install yowasp-yosys
export NEXTPNR_ECP5=yowasp-nextpnr-ecp5
export ECPPACK=yowasp-ecppack
export YOSYS=yowasp-yosys
export LUNA_PLATFORM=cynthion.gateware.platform.cynthion_r0_4:CynthionPlatformRev0D4
python examples/blinky/blinky.py --dry-run

This fails, also for more recent boards.

INFO    | __init__    | Building for Cynthion r0.4...
ERROR: Module `\SGSR' referenced in module `\top.cd_sync' in cell `\U$$2' is not part of the design.
Traceback (most recent call last):
  File "/home/hstarmans/python/luna/examples/blinky/blinky.py", line 41, in <module>
    top_level_cli(Blinky)
  File "/home/hstarmans/python/luna/.venv/lib/python3.10/site-packages/luna/__init__.py", line 113, in top_level_cli
    products = platform.build(fragment,
  File "/home/hstarmans/python/luna/.venv/lib/python3.10/site-packages/amaranth/build/plat.py", line 109, in build
    products = plan.execute_local(build_dir)
  File "/home/hstarmans/python/luna/.venv/lib/python3.10/site-packages/amaranth/build/run.py", line 104, in execute_local
    subprocess.check_call(["sh", f"{self.script}.sh"],
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 1.

Debug_spi seems still broken #101

INFO    | __init__    | Building for Cynthion r0.4...
/home/hstarmans/python/luna/.venv/lib/python3.10/site-packages/luna/gateware/utils/cdc.py:40: DriverConflict: Signal '(sig output__sdo__o)' is driven from multiple fragments: top, top.<unnamed #3>; hierarchy will be flattened
  output = Record.like(signal)
ERROR: Module `\SGSR' referenced in module `\top.cd_sync' in cell `\U$$2' is not part of the design.
Traceback (most recent call last):
``


@miek
Copy link
Member

miek commented Jun 6, 2024

I couldn't reproduce the issue when running the commands you posted:

INFO    | __init__    | Building for Cynthion r0.4...
Preparing to run yowasp-yosys. This might take a while...
Preparing to run yowasp-nextpnr-ecp5. This might take a while...
Preparing to run yowasp-ecppack. This might take a while...
INFO    | __init__    | Build complete.

Could try running blinky.py again with AMARANTH_verbose=1 and post the output?

@straithe straithe added the question question from the community that is not technical support label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question question from the community that is not technical support
Projects
None yet
Development

No branches or pull requests

3 participants