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

Concatenation with an equality test result does not behave as expected #3967

Closed
sgherbst opened this issue May 10, 2024 · 6 comments
Closed

Comments

@sgherbst
Copy link

Noticed that a module doesn't get instantiated in a conditional statement in a generate block when the condition uses a parameter calculated by concatenating with an equality test result. It looks like this also happens if a relational operator is used.

A.v

module A;
    parameter N = {1'b0, (1 == 1)};
 
    generate
        if (N == 2'b01) begin
            B b();
        end
    endgenerate
endmodule

B.v

module B;
endmodule

Command:

surelog -nocache -parse -nouhdm +libext+.v -y . A.v

Output in slpp_all/file_elab.lst

/path/to/slpp_all/lib/work/A.v

Excepted result: seeing both A.v and B.v in file_elab.lst

Surelog 1.82
macOS 12.6.6

@alaindargelas
Copy link
Collaborator

alaindargelas commented May 14, 2024

Works like a charm, can't reproduce.
Rebuild Surelog from scratch.

@sgherbst
Copy link
Author

Thanks! Can confirm that this issue is resolved after building from the latest commit (97e3ae6). If you have a chance, would you mind creating a 1.83 release?

@hzeller
Copy link
Collaborator

hzeller commented May 14, 2024

I take care of creating a new release 1.83 of UHDM and Surelog if you don't mind @alaindargelas ?

@alaindargelas
Copy link
Collaborator

Sure @hzeller

@hzeller
Copy link
Collaborator

hzeller commented May 15, 2024

Alright, tagged UHDM and Surelog with 1.83

@sgherbst
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants