Skip to content

Non-channel argument in config of top-level proc gives very unhelpful error message #1850

@allight

Description

@allight

Describe the bug
The top proc of a dslx design must only contain 'channel' arguments to be convertable into IR. If code is given to ir_converter_main which does not match this requirement a highly confusing error message saying NOT_FOUND: Top-level type info not found for proc is emitted instead of a message that gives any information about what went wrong.

To Reproduce
Steps to reproduce the behavior:

  1. run ir_converter_main on the following DSLX code:
proc datasource {
  off: u32;
  o: chan<u32> out;
  config (o: chan<u32> out, val: u32) { (val, o) }
  init {()}
  next(state: ()) {
    send(join(), o, off);
  }
}

Expected behavior
An error saying something to the effect of 'val' is not constant expression.

Current behavior

Error: NOT_FOUND: Top-level type info not found for proc "datasource".

Additional info
This was brought to our attention by #1663

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions