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

Documentation: 'domain' in Past et al is a string #199

Closed
RobertBaruch opened this issue Sep 8, 2019 · 0 comments
Closed

Documentation: 'domain' in Past et al is a string #199

RobertBaruch opened this issue Sep 8, 2019 · 0 comments
Milestone

Comments

@RobertBaruch
Copy link

Kept getting errors when doing things like:

Past(signal, domain=m.d.pos)

where m.d.pos is a ClockDomain.

That resulted in this stack trace:

  File "/home/robertbaruch/.local/lib/python3.6/site-packages/nmigen/cli.py", line 76, in main
    main_runner(parser, parser.parse_args(), *args, **kwargs)
  File "/home/robertbaruch/.local/lib/python3.6/site-packages/nmigen/cli.py", line 56, in main_runner
    output = rtlil.convert(fragment, name=name, ports=ports)
  File "/home/robertbaruch/.local/lib/python3.6/site-packages/nmigen/back/rtlil.py", line 945, in convert
    fragment = ir.Fragment.get(elaboratable, platform).prepare(**kwargs)
  File "/home/robertbaruch/.local/lib/python3.6/site-packages/nmigen/hdl/ir.py", line 537, in prepare
    new_domains = fragment._propagate_domains(missing_domain)
  File "/home/robertbaruch/.local/lib/python3.6/site-packages/nmigen/hdl/ir.py", line 388, in _propagate_domains
    new_domains = self.create_missing_domains(missing_domain)
  File "/home/robertbaruch/.local/lib/python3.6/site-packages/nmigen/hdl/ir.py", line 368, in create_missing_domains
    value = missing_domain(domain_name)
  File "/home/robertbaruch/.local/lib/python3.6/site-packages/nmigen/hdl/ir.py", line 533, in <lambda>
    def prepare(self, ports=None, missing_domain=lambda name: ClockDomain(name)):
  File "/home/robertbaruch/.local/lib/python3.6/site-packages/nmigen/hdl/cd.py", line 55, in __init__
    if name.startswith("cd_"):
AttributeError: '_ModuleBuilderDomainExplicit' object has no attribute 'startswith'

That kind of clued me in that maybe the domain argument wanted a name and not a ClockDomain.

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

No branches or pull requests

2 participants