Skip to content

gen-verilog: slice params ([]T) lower to single scalars — mac_dot_product is silently wrong for len>1 #2410

Description

@gHashTag

Found while growing the conformance vvp registry (#2241): fn mac_dot_product(a: []TernaryWord, b: []TernaryWord, len, unit) lowers to 'input [31:0] a; input [31:0] b;' — the slice becomes ONE word, so the loop's per-element access indexes bits of a scalar and the function is semantically wrong for any len > 1 (the vector cases use len 2). Same class as the historical 'array-param indexing read 1 bit' defect (#1748), but for slice-typed params, which never got the packed-vector treatment. The two remaining mac vector groups (mac_dot_product, mac_matrix_vector) stay as NAMED debt in the registry until slices lower as packed vectors with part-select indexing; executing them today would fail on a known unimplemented feature rather than a regression. Refs #2241.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions