实际上最好是这样,把 “_invof"加到$net 的后面,这样若$cell 是在子模块中,$invnet也会在子模块中,而不是在Current Design中。上面的code会产生很多端口
my @cells = get_cells("-hier", "-ref", "NAND2BX*");
foreach my $cell (@cells){
my $net = get_net_of("$cell/AN");
my $invnet = $net."_invof";
if(exist_wire($invnet)==0){
new_net($invnet, "INVX1", "", "$net");
}
change_gate($cell, "NAND2X2", ".A($invnet)");
} |