Skip to content

Commit

Permalink
Do not filter out blackboxes in selected_modules and selected_whole_m…
Browse files Browse the repository at this point in the history
…odules
  • Loading branch information
RCoeurjoly committed Aug 26, 2024
1 parent 72f77dd commit 963507a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/rtlil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ std::vector<RTLIL::Module*> RTLIL::Design::selected_modules() const
std::vector<RTLIL::Module*> result;
result.reserve(modules_.size());
for (auto &it : modules_)
if (selected_module(it.first) && !it.second->get_blackbox_attribute())
if (selected_module(it.first))
result.push_back(it.second);
return result;
}
Expand All @@ -899,7 +899,7 @@ std::vector<RTLIL::Module*> RTLIL::Design::selected_whole_modules() const
std::vector<RTLIL::Module*> result;
result.reserve(modules_.size());
for (auto &it : modules_)
if (selected_whole_module(it.first) && !it.second->get_blackbox_attribute())
if (selected_whole_module(it.first))
result.push_back(it.second);
return result;
}
Expand Down
30 changes: 30 additions & 0 deletions tests/select/cutpoint_blackboxes.ys
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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 =*
select -assert-count 1 =t:$anyseq

design -reset

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 =*
select -assert-count 1 =t:$anyseq

0 comments on commit 963507a

Please sign in to comment.