Skip to content

undriven-port warning is not flagged when the signal is driven in one of the if condition #1602

Description

@lewyitshien

Is your bug report related to the C++ slang project or the pyslang Python bindings?
C++ slang

Describe the bug
In below case, when COND_A parameter is assigned to 0, output "a" is not assigned to any value. But slang is able to build successfully without any warning.
This behaviour is consistent on slang version 9.1.194+343611be4 (from slang explorer).
It will happen when one of the if condition has output "a" assigned with value.

To Reproduce
Run with -Weverything

module testing #(
    parameter COND_A = 0
) (
    output logic a
);

generate
    if (COND_A) begin : cond_a
        assign a = 0;
    end
    else begin : default_case

    end
endgenerate

endmodule

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions