Skip to content

sequential_block_in_always_comb conflicts with multiline_if_begin #317

Description

@Ravenslofty

Consider the following snippet from my own code:

always_comb begin
    if (from_write.valid && from_write.uop.rs1 == from_read.uop.rs1) begin
        rs1 = from_write.rd;
    end else begin
        rs1 = from_read.rs1;
    end
end

This triggers sequential_block_in_always_comb, because of the begin/end. If one removes them:

always_comb
    if (from_write.valid && from_write.uop.rs1 == from_read.uop.rs1)
        rs1 = from_write.rd;
    else
        rs1 = from_read.rs1;

This triggers multiline_if_begin, which wants you to add begin/end, leading to the original code which triggers sequential_block_in_always_comb.

I bring this up because both of these rules are included in designintent, which is apparently a sensible default.

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