Skip to content

Consider splitting proc state into separate values #548

Closed

Description

@meheff

Currently the state of a proc is a single arbitrarily-typed value. To support multiple state elements, a tuple can be used. However, tuple state is more awkward to manipulate than separate values. One important issue is that tuples unnecessarily couple state values together which makes scheduling complicated.

A motivating example is a proc with two state elements: A and B. The next value can be computed for each state element in one-cycle which theoretically permits an initiation interval of one. However, the state parameter and next state node artificially couple these separate state values together which may make the total latency of the computing both next values together greater than one which prevents an II of 1.

Other potential wins:

  • A name may be given for each state value parameter which would persist to Verilog.
  • (minor) Identifying and removing invariant state elements is trivial.

Allowing multiple proc state values doesn't fundamentally improve expressiveness. There are ways of working around this coupling issue with extra work in the scheduler and elsewhere. However, it might be much cleaner to allow multiple state values at the cost of a a minorish refactor.

Activity

  1. self-assigned this
    on Apr 4, 2022
  2. meheff commented on May 12, 2022

    @meheff
    CollaboratorAuthor

    This was done with 14bda70 and some followup changes.

  3. meheff commented on May 18, 2022

    @meheff
    CollaboratorAuthor

    Looks like the JIT still needs to support this.

  4. reopened this on May 18, 2022
  5. added a commit that references this issue on Jun 7, 2022
    89839e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions