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

Cannot select and cutpoint blackbox modules #4561

Open
RCoeurjoly opened this issue Aug 22, 2024 · 1 comment
Open

Cannot select and cutpoint blackbox modules #4561

RCoeurjoly opened this issue Aug 22, 2024 · 1 comment
Labels
pending-verification This issue is pending verification and/or reproduction

Comments

@RCoeurjoly
Copy link
Contributor

Version

Yosys 0.44+39 (git sha1 32d770d64, g++ 13.2.0 -Og -fPIC)

On which OS did this happen?

Linux

Reproduction Steps

read_verilog <<EOT
(* blackbox *)
module passthrough(
    input wire in,  // Input signal
    output wire out // Output signal
);

    // Assign the output to be the same as the input
    assign out = in;

endmodule
EOT
cutpoint =*

I get:

  1. Executing CUTPOINT pass.

Note that if the module is not a blackbox:

read_verilog <<EOT
module passthrough(
    input wire in,  // Input signal
    output wire out // Output signal
);

    // Assign the output to be the same as the input
    assign out = in;

endmodule
EOT

cutpoint =*
  1. Executing CUTPOINT pass.
    Making all outputs of module passthrough cut points, removing module contents.

Expected Behavior

  1. Executing CUTPOINT pass.
    Making all outputs of module passthrough cut points, removing module contents.

Actual Behavior

  1. Executing CUTPOINT pass.
@RCoeurjoly RCoeurjoly added the pending-verification This issue is pending verification and/or reproduction label Aug 22, 2024
@RCoeurjoly
Copy link
Contributor Author

I prepend = to the pattern because the help tells so:

By default, patterns will not match black/white-box modules or their
contents. To include such objects, prefix the pattern with '='.

And it seems that it is correct because we get to here:
https://github.com/YosysHQ/yosys/blob/main/passes/cmds/select.cc#L772

@RCoeurjoly RCoeurjoly changed the title Cannot select blackbox modules Cannot select and cutpoint blackbox modules Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-verification This issue is pending verification and/or reproduction
Projects
None yet
Development

No branches or pull requests

1 participant