Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] variables driven in multiple processes / assignment statements #331

Closed
nblei opened this issue Jul 31, 2023 · 0 comments · Fixed by #573
Closed

[Bug] variables driven in multiple processes / assignment statements #331

nblei opened this issue Jul 31, 2023 · 0 comments · Fixed by #573
Labels
bug Something isn't working

Comments

@nblei
Copy link
Contributor

nblei commented Jul 31, 2023

module double_use
(
    clk : input logic,
)
{
    var a: logic;

    assign a = 1'bx;
    always_comb { a = 1'b0; }
    always_comb { a = 1'b1; }
    always_ff (clk) { a = 1'b0; }
    assign a = 1'bz;
}

Veryl emits:

module double_use_double_use (
    input logic clk
);
    logic a;

    assign a = 1'bx;
    always_comb begin
        a = 1'b0;
    end
    always_comb begin
        a = 1'b1;
    end
    always_ff @ (posedge clk) begin
        a <= 1'b0;
    end
    assign a = 1'bz;
endmodule

I think there is currently a lack of a mechanism to check if a variable is already being driven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants