OpenCores
URL https://opencores.org/ocsvn/socgen/socgen/trunk

Subversion Repositories socgen

[/] [socgen/] [trunk/] [tools/] [yp/] [create_yp] - Diff between revs 118 and 120

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 118 Rev 120
Line 84... Line 84...
##############################################################################
##############################################################################
 
 
my $home                     = cwd();
my $home                     = cwd();
my $index_filename           = "./tools/yp/index.xml";
my $index_filename           = "./tools/yp/index.xml";
 
 
 
 
 
 
 
 
 
 
 
 
open   OUTFILE,">$index_filename" or die "unable to open $index_filename";
open   OUTFILE,">$index_filename" or die "unable to open $index_filename";
 
 
 
 
print  OUTFILE "\n";
print  OUTFILE "\n";
print  OUTFILE "\n";
print  OUTFILE "\n";
Line 161... Line 166...
          {
          {
          $_ = $item;
          $_ = $item;
          if(/(\S+).xml/)
          if(/(\S+).xml/)
             {
             {
             my $t_name                = $1;
             my $t_name                = $1;
 
 
          $_ = $src;
          $_ = $src;
 
 
          if(/${home}(\S+)/) { $t_local = $1; }
          if(/${home}(\S+)/) { $t_local = $1; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
if($t_name eq "design")
if($t_name eq "design")
{
{
 
 
my $socgen_file    = $parser->parse_file("${home}${t_local}/${t_name}.xml");
my $socgen_file    = $parser->parse_file("${home}${t_local}/${t_name}.xml");
foreach my $design ($socgen_file->findnodes('//socgen:ip'))
foreach my $design ($socgen_file->findnodes('//socgen:ip'))
   {
   {
   $name     = $design->findnodes('./socgen:component/text()')->to_literal ;
   $name     = $design->findnodes('./socgen:component/text()')->to_literal ;
   $vendor   = $design->findnodes('./socgen:vendor/text()')->to_literal ;
   $vendor   = $design->findnodes('./socgen:vendor/text()')->to_literal ;
   $library  = $design->findnodes('./socgen:library/text()')->to_literal ;
   $library  = $design->findnodes('./socgen:library/text()')->to_literal ;
   $version  = "";
   $version  = "";
   $type     = "socgen:ip";
   $type     = "socgen:ip";
   }
   }
}
}
 
 
 
 
 
elsif($t_name eq "library")
 
{
 
my $socgen_file    = $parser->parse_file("${home}${t_local}/${t_name}.xml");
 
 
 
 
 
foreach my $design ($socgen_file->findnodes('//socgen:lib'))
 
   {
 
   $vendor   = $design->findnodes('./socgen:vendor/text()')->to_literal ;
 
   $library  = $design->findnodes('./socgen:library/text()')->to_literal ;
 
   $lib_ip_dir  = $design->findnodes('./socgen:lib_ip_dir/text()')->to_literal ;
 
   $lib_sw_dir  = $design->findnodes('./socgen:lib_sw_dir/text()')->to_literal ;
 
   $version  = "";
 
   $name     = "";
 
   $type     = "socgen:lib";
 
 
 
 
 
 
 
   }
 
}
 
 
 
 
 
 
 
 
else
else
{
{
my $spirit_file    = $parser->parse_file("${home}${t_local}/${t_name}.xml");
my $spirit_file    = $parser->parse_file("${home}${t_local}/${t_name}.xml");
 
 
 
 
Line 262... Line 289...
          if(/\S+($vendor_match)(\S+)/)                     { $vendor_path      = $2; }
          if(/\S+($vendor_match)(\S+)/)                     { $vendor_path      = $2; }
          else                                              { $vendor_path      = ""; }
          else                                              { $vendor_path      = ""; }
          if(/\S+($library_match)(\S+)/)                    { $library_path     = $2; }
          if(/\S+($library_match)(\S+)/)                    { $library_path     = $2; }
          else                                              { $library_path     = ""; }
          else                                              { $library_path     = ""; }
          if(/\S+($library_match)(\S+)($name_match)(\S+)/)  { $lib_comp_sep     = $2; }
          if(/\S+($library_match)(\S+)($name_match)(\S+)/)  { $lib_comp_sep     = $2; }
          else                                              { $lib_comp_path    = ""; }
          else                                              { $lib_comp_sep     = ""; }
          if(/\S?($name_match)(\S+)/)                       { $component_path   = $2; }
          if(/\S?($name_match)(\S+)/)                       { $component_path   = $2; }
          else                                              { $component_path   = ""; }
          else                                              { $component_path   = ""; }
 
 
 
 
 
 
Line 280... Line 307...
             print  OUTFILE "   ${t_local}\n";
             print  OUTFILE "   ${t_local}\n";
             print  OUTFILE "   ${vendor_path}\n";
             print  OUTFILE "   ${vendor_path}\n";
             print  OUTFILE "   ${library_path}\n";
             print  OUTFILE "   ${library_path}\n";
             print  OUTFILE "   ${component_path}\n";
             print  OUTFILE "   ${component_path}\n";
             print  OUTFILE "   ${lib_comp_sep}\n";
             print  OUTFILE "   ${lib_comp_sep}\n";
 
             print  OUTFILE "   ${lib_ip_dir}\n";
 
             print  OUTFILE "   ${lib_sw_dir}\n";
             print  OUTFILE " \n\n";
             print  OUTFILE " \n\n";
 
 
 
          $lib_ip_dir = "";
 
          $lib_sw_dir = "";
             }
             }
 
 
          &link_dir("$src/$item" );
          &link_dir("$src/$item" );
          }
          }
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.