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

cxxsim: ValueError: 4 is not a valid cxxrtl_type #671

Open
cestrauss opened this issue Dec 25, 2021 · 2 comments
Open

cxxsim: ValueError: 4 is not a valid cxxrtl_type #671

cestrauss opened this issue Dec 25, 2021 · 2 comments

Comments

@cestrauss
Copy link

cestrauss commented Dec 25, 2021

This code fails for me:

from amaranth import Signal, Module
from amaranth.sim import Simulator

m = Module()
s = Signal()
t = Signal()

m.d.sync += s.eq(0)
with m.If(s):
    m.d.comb += t.eq(1)

def process():
    yield t

sim = Simulator(m, engine="cxxsim")
sim.add_clock(1e-6)
sim.add_sync_process(process)
sim.run()

Final error message is: ValueError: 4 is not a valid cxxrtl_type
Full log attached

Tested with:
Amaranth cxxsim branch (1c0cf92)
Yosys 0.12+42 (git sha1 7407a7f3e, clang 7.0.1-8+deb10u2 -fPIC -Os) (master branch)
Yosys 0.12+30 (git sha1 fc049e84a, clang 7.0.1-8+deb10u2 -fPIC -Os) (cxxrtl-no-reset-elided branch)

@widlarizer
Copy link
Contributor

@whitequark
Copy link
Member

I'll have this fixed shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants