-
Notifications
You must be signed in to change notification settings - Fork 902
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
Add -blackbox option to cutpoint pass #4854
base: main
Are you sure you want to change the base?
Conversation
Replace the contents of all blackboxes in the design with a formal cut point. Includes test script.
Also adds "blackbox" as a valid TYPE.
Modify `cutpoint_blackbox.ys` to check that parameters on blackbox modules are maintained after the cutpoint. Also adjusts the test to check that each instance gets the `$anyseq` cell.
From #4812:
So I take it this new approach doesn't support parametrizable widths. |
Uhhh, pass? module top(input a, b, output o);
wire c, d, e, f;
bb #(.SOME_PARAM(1)) bb1 (.a (a), .b (b), .o (c));
wb wb1 (.a (a), .b (b), .o (d));
bb #(.SOME_PARAM(2)) bb2 (.a ({a,b}), .b ({c,d}), .o ({e,f}));
some_mod some_inst (.a (c), .b (d), .c (e), .o (o));
endmodule
(* blackbox *)
module bb #( parameter SOME_PARAM=0 ) (input [SOME_PARAM-1:0] a, b, output [SOME_PARAM-1:0] o);
assign o = a | b;
specify
(a => o) = 1;
endspecify
endmodule
(* whitebox *)
module wb(input a, b, output o);
assign o = a ^ b;
endmodule
(* keep_hierarchy *)
module some_mod(input a, b, c, output o);
assign o = a & (b | c);
endmodule
|
I'm not seeing any change in behaviour there; the |
I understood inserting the |
I don't have any examples that demonstrate whatever problems are being encountered with the current options when it comes to blackboxes in verific, but as far as I can tell changing the cell outputs (i.e the Rather than it no longer being required, I would say that if this implementation is not meeting that requirement then I don't see how #4812 was. |
I wasn't there for the original dev JF discussion, but when we discussed #4812 in docs JF about whether calling
(or at least that's what is in the minutes) |
Replace module instances instead of module contents. This fixes parametrisable width mismatch with read_verilog frontend, but not verific frontend.
But only if it's also a blackbox module with parameters (i.e. it *could* be parametrizable width).
I worked out that calling I also added an extra flag to So this does now properly support modules from verific with parametrisable widths, but I'm not sure if there are any cases where skipping the resize could cause problems that would make this unsafe. Also whether the Thoughts, @povik ? |
What are the reasons/motivation for this change?
Supersedes #4812.
Explain how this is achieved.
Calling
cutpoint -blackbox [options]
will replace the contents of all (black)boxes in the design with a formal cut point ($anyseq
cell by default).This is preferable to #4812, which instead calls
cutpoint
on instances of (black)box modules.Since the module now has contents, it is also no longer a (black)box so we can remove those attributes.
If applicable, please suggest to reviewers how they can test the change.