file1 is common_modify.vhd which has following lines of codes
sum_1_SUM0_0 : XOR3
port map(A => b_c, B => a_c, C => c_c, Y => sum_c);
a_pad : INBUF
port map(PAD => a, Y => a_c);
sum_1_CO0_i : MAJ3
port map(A => a_c, B => c_c, C => b_c, Y => N_5);
####
file2 is nets.txt which has following lines of codes
a_c
b_c
c_c
##
##
file3 is enabled_nets.txt which has following lines of codes
a_e
b_e
c_e
##
##
open (IN1, "output_file.vhd") or die;
my @nets = ;
my @enabled_nets = ;
while () {
foreach $i (0..$#nets){
print OUT if (s/\=\>\s+$nets[$i]\,/\=\>
$enabled_nets[$i]\,/);
}
}
##
##
sum_1_SUM0_0 : XOR3
port map(A => b_e, B => a_e, C => c_e, Y => sum_c);
a_pad : INBUF
port map(PAD => a, Y => a_c);
sum_1_CO0_i : MAJ3
port map(A => a_e, B => c_e, C => b_e, Y => N_5);