3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-15 12:00:28 +00:00
This commit is contained in:
Emil J 2025-10-09 02:08:25 +02:00 committed by GitHub
commit 88f6a7d6bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 96 additions and 13 deletions

View file

@ -34,6 +34,7 @@ module top;
endmodule
EOF
design -save before
box_derive -naming_attr final_name top
select -assert-mod-count 1 =aa1
@ -48,6 +49,45 @@ select -assert-mod-count 1 =cc1
select -assert-mod-count 0 =cc2
select -assert-mod-count 0 =cc3
# no instances of the new derived modules
# you could use wildcards like t:aa* here - if that wasn't just broken
select -assert-count 0 t:aa1 t:aa2 t:aa3
select -assert-count 0 t:bb1 t:bb2 t:bb3
select -assert-count 0 t:cc1 t:cc2 t:cc3
design -load before
# same command but with -apply_derived_type
box_derive -apply_derived_type -naming_attr final_name top
# same derived modules created as without -apply_derived_type
select -assert-mod-count 1 =aa1
select -assert-mod-count 1 =aa2
select -assert-mod-count 0 =aa3
select -assert-mod-count 1 =bb1
select -assert-mod-count 0 =bb2
select -assert-mod-count 1 =bb3
select -assert-mod-count 1 =cc1
select -assert-mod-count 0 =cc2
select -assert-mod-count 0 =cc3
# but we have instances of the new derived modules
select -assert-count 1 t:aa1
select -assert-count 1 t:aa2
select -assert-count 0 t:aa3
select -assert-count 1 t:bb1
select -assert-count 0 t:bb2
select -assert-count 1 t:bb3
select -assert-count 2 t:cc1
select -assert-count 0 t:cc2
select -assert-count 0 t:cc3
# we are expecting the original aa, bb, cc modules
# and 5 specializations generated by box_derive
select -assert-mod-count 8 =A:whitebox