#!/usr/local/bin/perl #launch VCS with gui #select Search Files tab at the buttom. #Select Show Directory levels : full path #search module #right click and select Save Content As #The script is invoked from vim and extracts lines of the kind: #/mnt/pkrengel/kuku-1.2.3/installation/hw/kuku_gnt_delay.v:1: module kuku_gnt_delay ( #/mnt/pkrengel/kuku-1.2.3/installation/hw/kuku_gnt_delay.v:58: endmodule #/mnt/pkrengel/kuku-1.2.3/installation/hw/kuku_ism.v:1: module kuku_ism #/mnt/pkrengel/kuku-1.2.3/installation/hw/kuku_ism.v:264: endmodule while () { chomp($_); if($_ =~ /(.*[a-zA-Z].*\.v):[0-9][0-9]*:.*module/) { push(@a, $1); } elsif($_ =~ /(.*[a-zA-Z].*\.vh):[0-9][0-9]*:.*module/) { push(@a, $1); } elsif($_ =~ /(.*[a-zA-Z].*\.sv):[0-9][0-9]*:.*module/) { push(@a, $1); } }# end while @a_s=sort @a; $k=""; foreach $j ( @a_s ) { if($j ne $k) { print("$j\n"); } $k = $j; }