3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

Merge pull request #1949 from YosysHQ/eddie/select_blackbox

select: do not select inside black-/white- boxes unless '=' prefix used
This commit is contained in:
Eddie Hung 2020-04-22 15:35:05 -07:00 committed by GitHub
commit fa9df06c9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 9 deletions

View file

@ -0,0 +1,28 @@
read_verilog -specify <<EOT
module top(input a, b, output o);
assign o = a & b;
endmodule
(* blackbox *)
module bb(input a, b, output o);
assign o = a | b;
specify
(a => o) = 1;
endspecify
endmodule
(* whitebox *)
module wb(input a, b, output o);
assign o = a ^ b;
endmodule
EOT
clean
select -assert-count 1 c:*
select -assert-none t:* t:$and %d
select -assert-count 3 w:*
select -assert-count 4 *
select -assert-count 3 =c:*
select -assert-count 10 =w:*
select -assert-count 13 =*