3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-01-28 04:48:45 +00:00

Merge pull request #4269 from povik/icells_not_derived

Avoid `module_not_derived` on internal cells in techmap result
This commit is contained in:
Gus Smith 2026-01-26 14:48:40 -08:00 committed by GitHub
commit 09ceadfde7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 42 additions and 27 deletions

View file

@ -0,0 +1,31 @@
# Test 1: internal cells from alumacc/techmap must not keep module_not_derived.
read_verilog <<EOF_VERILOG
module top(a, b, y);
input wire [7:0] a;
input wire [7:0] b;
output wire [7:0] y;
assign y = a + b;
endmodule
EOF_VERILOG
prep
alumacc
techmap -max_iter 1
select -assert-any t:$lcu
select -assert-count 0 t:$lcu a:module_not_derived %i
design -reset
# Test 2: public module instances should still keep module_not_derived.
read_verilog <<EOF_VERILOG
module mycell(input a, output y);
assign y = a;
endmodule
module top(input a, output y);
mycell u0(.a(a), .y(y));
endmodule
EOF_VERILOG
hierarchy -top top
select -assert-any t:mycell a:module_not_derived %i