amaranth icon indicating copy to clipboard operation
amaranth copied to clipboard

cxxsim: ValueError: 4 is not a valid cxxrtl_type

Open cestrauss opened this issue 4 years ago • 2 comments

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 (1c0cf92888a16e774768b18fb633ba59a0145704) 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)

cestrauss avatar Dec 25 '21 21:12 cestrauss

Same issue with my design: https://gitlab.com/tywonemi-school-stuff/risc-je-zisk/-/tree/cxxsim

Exact error

widlarizer avatar Jan 05 '22 11:01 widlarizer

I'll have this fixed shortly.

whitequark avatar Jan 05 '22 11:01 whitequark