Skip to content

[enhancement] Allow specifying custom names for proc instances #3311

@rw1nkler

Description

@rw1nkler

What's hard to do? (limit 100 words)

When creating a new proc using spawn, it is not possible to assign a custom name to the spawned instance. This makes it harder to track and identify procs in larger designs after generating IR or SystemVerilog, as the mangled names can become less readable in designs with nested hierarchy.

Current best alternative workaround (limit 100 words)

Currently, developers must rely on auto-generated long names. This is inconvenient and prone to confusion when analyzing the system’s behavior or checking signal traces in tools like waveform viewers or simulators.

Your view of the "best case XLS enhancement" (limit 100 words)

It would be useful to allow naming procs when spawning them, in the same way channels can be named during creation. An optional keyword argument such as name= could be used for this purpose. For example:

let x = spawn MyProc(a, b, c, name="my_proc");

The name could be preserved and used as the instance name in the generated SystemVerilog.

Preserving these names would make designs much easier to follow in trace viewers like GTKWave or surfer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions