XOR_portmap file is as follows
m : XOR2 port map (A=> in1, B=> enable_c, Y => output);
####
uut_names file is as follows
M1
M2
M3
##
##
nets file is as follows
a_c
b_c
c_c
##
##
enabled_nets file is as follows
a_e
b_e
c_e
##
##
use strict;
use warnings;
open (IN1, ">XOR_portmap_nets.txt") or die;
my @uut_names = ;
my @nets = ;
my @enabled_nets = ;
chomp @uut_names;
chomp @nets;
chomp @enabled_nets;
while () {
foreach my $i ( 0..$#nets ) {
print OUT if ((s/m/$uut_names[$i]/) && (s/in1/$nets[$i]/) && (
+s/output/$enabled_nets[$i]/));
}
}
close (IN1);
close (IN2);
close (IN3);
close (IN4);
close (OUT);
##
##
M1
: XOR2 port map (A=> a_c
, B=> enable_c, Y => a_e
);
##
##
M1 : XOR2 port map (A=> a_c, B=> enable_c, Y => a_e);
M2 : XOR2 port map (A=> b_c, B=> enable_c, Y => b_e);
M3 : XOR2 port map (A=> c_c, B=> enable_c, Y => c_e);