Skip to content

[enhancement] allow constexpr for fifo attribute parameters #4360

Description

@proppy

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

Currently DSLX supports channel attributes like:

#[channel(depth=2, fifo_wrapper=my_custom_fifo)]
let (tx, rx) = chan<u32>("my_channel");

but requires those parameter to be literals.

This make it hard to reuse / expose those constant to other part of the design or the testing infrastructure w/o creating duplication.

Current best alternative workaround (limit 100 words)

Duplicate the value as DSLX constant and rely on careful maintainance to keep them in sync.

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

It would be nice to have full support for constexpr for specifying those parameter, this would also allow for more complex calculation when those are derived from other micro-architecture parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dslxDSLX (domain specific language) implementation / front-endenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions