Skip to content

cxxsim: error: ‘p_sub_2e_s’ was not declared in this scope #669

Closed
@cestrauss

Description

@cestrauss

Consider the following test case:

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

m = Module()
sub = Module()
m.submodules.sub = sub
s = Signal()
t = Signal()
sub.d.comb += t.eq(s)

sim = Simulator(m, engine="cxxsim")
sim.run()

When run, it fails for me with:

sim.cc: In member function ‘virtual void cxxrtl_design::p_top::reset()’:
sim.cc:38:2: error: ‘p_sub_2e_s’ was not declared in this scope
  p_sub_2e_s = value<1>{0u};
  ^~~~~~~~~~

Full log attached.
bug28.log

Versions:
Amaranth: cxxsim branch (1c0cf92)
Yosys 0.12+40 (git sha1 229980d66, clang 7.0.1-8+deb10u2 -fPIC -Os)
OS: Debian 10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions