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

Subversion Repositories socgen

[/] [socgen/] [trunk/] [tools/] [sys/] [soc_link_child] - Diff between revs 119 and 120

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

Rev 119 Rev 120
Line 134... Line 134...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
#/*********************************************************************************************/
#/*********************************************************************************************/
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
Line 150... Line 153...
my      @filelist_hier = (  );
my      @filelist_hier = (  );
my      @filelist      = (  );
my      @filelist      = (  );
 
 
@filelist_hier = (  );
@filelist_hier = (  );
@filelist = (  );
@filelist = (  );
@filelist = parse_hier("$vendor","$project","$component","$version");
 
 
@filelist = parse_component_file("$vendor","$project","$component","$version");
@filelist = sys::lib::trim_sort(@filelist);
@filelist = sys::lib::trim_sort(@filelist);
 
 
 
 
 
 
foreach $line (@filelist)
foreach $line (@filelist)
   {
   {
   $_ = $line;
   $_ = $line;
   if(/::(\S+)::(\S+)::(\S+)::/)
   if(/::(\S+)::(\S+)::(\S+)::(\S+)::/)
     {
     {
     $new_vendor      = $1;
     $new_vendor      = $1;
     $new_proj        = $2;
     $new_proj        = $2;
     $new_comp        = $3;
     $new_comp        = $3;
 
     $new_version     = $4;
     if(($new_vendor ne $vendor ) or  ($new_proj ne $project ) )
     if(($new_vendor ne $vendor ) or  ($new_proj ne $project ) )
 
 
       { &link_child( $vendor,$project,$new_comp, $new_proj ,$new_vendor); }
       { &link_child( $vendor,$project,$new_comp, $new_proj ,$new_vendor); }
     }
     }
   }
   }
Line 200... Line 205...
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children";
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children";
                 mkdir $path,0755             unless( -e $path );
                 mkdir $path,0755             unless( -e $path );
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}";
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}";
                 mkdir $path,0755             unless( -e $path );
                 mkdir $path,0755             unless( -e $path );
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}/bin";
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}/bin";
                 mkdir $path,0755             unless( -e $path );
 
 
                 unless( -e $path )
 
                   {
 
                   mkdir $path,0755;
                 $root = "${home}/${projects_dir}/${child_vendor}/${child_library}/bin";
                 $root = "${home}/${projects_dir}/${child_vendor}/${child_library}/bin";
                 $dest = "${home}${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}/bin";
                 $dest = "${home}${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}/bin";
                 &sys::lib::link_dir( "$root", "$dest"  );
                 &sys::lib::link_dir( "$root", "$dest"  );
                 symlink( "${home}/tools/bin/Makefile.root", "${home}${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}/bin/Makefile.root");
                 symlink( "${home}/tools/bin/Makefile.root", "${home}${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}/bin/Makefile.root");
                 symlink( "${home}/tools/bin/Makefile",      "${home}${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}/bin/Makefile");
                 symlink( "${home}/tools/bin/Makefile",      "${home}${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}/bin/Makefile");
 
                   }
 
 
 
 
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}/sw";
                 my $lib_sw_dir     = yp::lib::find_lib_sw_dir($child_vendor,$child_library);
                 mkdir $path,0755             unless( -e $path );
 
                 $root = "${home}/${projects_dir}/${child_vendor}/${child_library}/sw";
 
                 $dest = "${home}${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}/sw";
 
                 &sys::lib::link_dir( "$root", "$dest"  );
 
 
 
 
 
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}${lib_comp_sep}";
                 if($lib_sw_dir)
 
                   {
 
                   my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}${lib_sw_dir}";
 
                   unless( -e $path )
 
                     {
 
                     mkdir $path,0755;
 
                     $root = "${home}/${projects_dir}/${child_vendor}/${child_library}${lib_sw_dir}";
 
                     $dest = "${home}${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}${lib_sw_dir}";
 
                     &sys::lib::link_dir( "$root", "$dest"  );
 
                     }
 
                   }
 
 
#  only works for simple single item paths
#  only works for simple single item paths
 
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}${lib_comp_sep}";
                 mkdir $path,0755             unless( -e $path );
                 mkdir $path,0755             unless( -e $path );
 
 
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}${lib_comp_sep}/${child_component}";
                 my $path  = ".${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}${lib_comp_sep}/${child_component}";
                 mkdir $path,0755             unless( -e $path );
 
 
                 unless( -e $path )
 
                   {
 
                   mkdir $path,0755;
                 $root = "${home}/${projects_dir}/${child_vendor}/${child_library}${lib_comp_sep}/${child_component}";
                 $root = "${home}/${projects_dir}/${child_vendor}/${child_library}${lib_comp_sep}/${child_component}";
                 $dest = "${home}${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}${lib_comp_sep}/${child_component}";
                 $dest = "${home}${prefix}/${parent_vendor}__${parent_library}/children/${child_vendor}__${child_library}${lib_comp_sep}/${child_component}";
                 &sys::lib::link_dir( "$root", "$dest"  );
                 &sys::lib::link_dir( "$root", "$dest"  );
 
                   }
 
               }
 
 
 
 
 
 
 
 
 
 
 
 
 
#/*********************************************************************************************/
 
#/                                                                                            */
 
#/                                                                                            */
 
#/                                                                                            */
 
#/                                                                                            */
 
#/                                                                                            */
 
#/                                                                                            */
 
#/*********************************************************************************************/
 
 
 
 
 
 
 
 
 
sub parse_component_file
 
   {
 
   my @params     = @_;
 
   my $version    = pop(@params);
 
   my $component  = pop(@params);
 
   my $library    = pop(@params);
 
   my $vendor     = pop(@params);
 
   my $spirit_component_file         = $parser->parse_file(yp::lib::find_ipxact("spirit:component",$vendor,$library,$component,$version ));
 
 
 
 
 
   push(@filelist_hier,"::${vendor}::${library}::${component}::${version}::");
 
 
 
foreach my $new_comp ($spirit_component_file->findnodes("//spirit:component/spirit:model/spirit:views/spirit:view/spirit:hierarchyRef"))
 
   {
 
            my($new_vendor)        = $new_comp->findnodes('./@spirit:vendor')->to_literal ;
 
            my($new_library)       = $new_comp->findnodes('./@spirit:library')->to_literal ;
 
            my($new_name)          = $new_comp->findnodes('./@spirit:name')->to_literal ;
 
            my($new_version)       = $new_comp->findnodes('./@spirit:version')->to_literal ;
 
            my $hier_ref_type      = yp::lib::find_file_type($new_vendor,$new_library,$new_name,$new_version) ;
 
 
 
     if($hier_ref_type eq "spirit:component")
 
     {
 
     my  @filelist_sub = parse_component_file($new_vendor,$new_library,$new_name,$new_version);
 
        foreach $line (@filelist_sub) { push(@filelist_hier,"$line"); }
               }
               }
 
 
 
 
 
     elsif($hier_ref_type eq "spirit:designConfiguration")
 
     {
 
 
 
        my $spirit_designCfg_file
 
         = $parser->parse_file(yp::lib::find_ipxact("spirit:designConfiguration",$new_vendor,$new_library,$new_name,$new_version ));
 
 
 
        foreach my $design_ref_view ($spirit_designCfg_file->findnodes('//spirit:designConfiguration'))
 
           {
 
           $new_vendor         = $design_ref_view->findnodes('./spirit:designRef/@spirit:vendor')->to_literal ;
 
           $new_library        = $design_ref_view->findnodes('./spirit:designRef/@spirit:library')->to_literal ;
 
           $new_component      = $design_ref_view->findnodes('./spirit:designRef/@spirit:name')->to_literal ;
 
           $new_version        = $design_ref_view->findnodes('./spirit:designRef/@spirit:version')->to_literal ;
 
           $hier_ref_type                ="spirit:design";
 
           }
 
     }
 
 
 
     if($hier_ref_type eq "spirit:design")
 
     {
 
     my  @filelist_sub = parse_design_file($new_vendor,$new_library,$new_component,$new_version);
 
     foreach $line (@filelist_sub) { push(@filelist_hier,"$line"); }
 
     }
 
  }
 
 
 
   @filelist_hier     =       sys::lib::trim_sort(@filelist_hier);
 
   return(@filelist_hier);
 
 
 
}
 
 
#/*********************************************************************************************/
#/*********************************************************************************************/
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/                                                                                            */
#/*********************************************************************************************/
#/*********************************************************************************************/
 
 
sub parse_hier
sub parse_design_file
   {
   {
   my @params     = @_;
   my @params     = @_;
   my $version    = pop(@params);
   my $version    = pop(@params);
   my $component  = pop(@params);
   my $component  = pop(@params);
   my $project    = pop(@params);
   my $library    = pop(@params);
   my $vendor     = pop(@params);
   my $vendor     = pop(@params);
 
 
   $home = cwd();
   $home = cwd();
 
 
   push(@filelist_hier,"::${vendor}::${project}::${component}::");
   push(@filelist_hier,"::${vendor}::${library}::${component}::${version}::");
 
 
 
   my $spirit_design_file = $parser->parse_file(yp::lib::find_ipxact("spirit:design",$vendor,$library,$component,$version ));
 
 
   my $spirit_design_file = yp::lib::find_ipxact_design_file($vendor,$project,$component,$version );
 
   my $spirit_padring_design_file = yp::lib::find_ipxact_padring_design_file($vendor,$project,$component,$version );
 
 
 
   #/*********************************************************************************************/
   #/*********************************************************************************************/
   #/                                                                                            */
   #/                                                                                            */
   #/  Create filelists for simulation, code coverage, linting and synthesis                     */
   #/  Create filelists for simulation, code coverage, linting and synthesis                     */
   #/                                                                                            */
   #/                                                                                            */
Line 274... Line 357...
        my($vendor_name)         = $i_name  ->to_literal ;
        my($vendor_name)         = $i_name  ->to_literal ;
        my($library_name)        = $i_name  ->findnodes('../@spirit:library')->to_literal ;
        my($library_name)        = $i_name  ->findnodes('../@spirit:library')->to_literal ;
        my($component_name)      = $i_name  ->findnodes('../@spirit:name')->to_literal ;
        my($component_name)      = $i_name  ->findnodes('../@spirit:name')->to_literal ;
        my($version_name)        = $i_name  ->findnodes('../@spirit:version')->to_literal ;
        my($version_name)        = $i_name  ->findnodes('../@spirit:version')->to_literal ;
 
 
        my  @filelist_sub = parse_hier("$vendor_name","$library_name","$component_name","$version_name");
   my  @filelist_sub = parse_component_file($vendor_name,$library_name,$component_name,$version_name);
        foreach $line (@filelist_sub) { push(@filelist_hier,"$line"); }
        foreach $line (@filelist_sub) { push(@filelist_hier,"$line"); }
        }
 
    }
 
 
 
   if($spirit_padring_design_file)
 
    {
 
   foreach  my   $i_name ($spirit_padring_design_file->findnodes("//spirit:design/spirit:componentInstances/spirit:componentInstance/spirit:componentRef/\@spirit:vendor"))
 
        {
 
        my($vendor_name)         = $i_name  ->to_literal ;
 
        my($library_name)        = $i_name  ->findnodes('../@spirit:library')->to_literal ;
 
        my($component_name)      = $i_name  ->findnodes('../@spirit:name')->to_literal ;
 
        my($version_name)        = $i_name  ->findnodes('../@spirit:version')->to_literal ;
 
 
 
        my  @filelist_sub = parse_hier("$vendor_name","$library_name","$component_name","$version_name");
 
        foreach $line (@filelist_sub) { push(@filelist_hier,"$line"); }
 
        }
        }
    }
    }
 
 
 
 
 
 
   @filelist_hier     =       sys::lib::trim_sort(@filelist_hier);
   @filelist_hier     =       sys::lib::trim_sort(@filelist_hier);
   return(@filelist_hier);
   return(@filelist_hier);
 
 
 
 
   }
   }
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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