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

Subversion Repositories socgen

[/] [socgen/] [trunk/] [tools/] [sys/] [gen_elab_child_filelist] - Diff between revs 134 and 135

Show entire file | Details | Blame | View Log

Rev 134 Rev 135
Line 1... Line 1...
eval 'exec `which perl` -S $0 ${1+"$@"}'
eval 'exec `which perl` -S $0 ${1+"$@"}'
   if 0;
   if 0;
 
 
#/**********************************************************************/
#/****************************************************************************/
#/*                                                                    */
 
#/*             -------                                                */
 
#/*            /   SOC  \                                              */
 
#/*           /    GEN   \                                             */
 
#/*          /    TOOL    \                                            */
 
#/*          ==============                                            */
 
#/*          |            |                                            */
 
#/*          |____________|                                            */
 
#/*                                                                    */
#/*                                                                    */
 
#/*   SOCGEN Design for Reuse toolset                                        */
#/*                                                                    */
#/*                                                                    */
 
#/*   Version 1.0.0                                                          */
#/*                                                                    */
#/*                                                                    */
#/*  Author(s):                                                        */
#/*  Author(s):                                                        */
#/*      - John Eaton, jt_eaton@opencores.org                          */
#/*      - John Eaton, z3qmtr45@gmail.com                                    */
#/*                                                                    */
#/*                                                                    */
#/**********************************************************************/
#/****************************************************************************/
#/*                                                                    */
#/*                                                                    */
#/*    Copyright (C) <2010-2011>                */
 
#/*                                                                    */
#/*                                                                    */
#/*  This source file may be used and distributed without              */
#/*             Copyright 2016 John T Eaton                                  */
#/*  restriction provided that this copyright statement is not         */
 
#/*  removed from the file and that any derivative work contains       */
 
#/*  the original copyright notice and the associated disclaimer.      */
 
#/*                                                                    */
 
#/*  This source file is free software; you can redistribute it        */
 
#/*  and/or modify it under the terms of the GNU Lesser General        */
 
#/*  Public License as published by the Free Software Foundation;      */
 
#/*  either version 2.1 of the License, or (at your option) any        */
 
#/*  later version.                                                    */
 
#/*                                                                    */
 
#/*  This source is distributed in the hope that it will be            */
 
#/*  useful, but WITHOUT ANY WARRANTY; without even the implied        */
 
#/*  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR           */
 
#/*  PURPOSE.  See the GNU Lesser General Public License for more      */
 
#/*  details.                                                          */
 
#/*                                                                    */
 
#/*  You should have received a copy of the GNU Lesser General         */
 
#/*  Public License along with this source; if not, download it        */
 
#/*  from http://www.opencores.org/lgpl.shtml                          */
 
#/*                                                                    */
#/*                                                                    */
#/**********************************************************************/
#/* Licensed under the Apache License, Version 2.0 (the "License");          */
 
#/* you may not use this file except in compliance with the License.         */
 
#/* You may obtain a copy of the License at                                  */
 
#/*                                                                          */
 
#/*    http://www.apache.org/licenses/LICENSE-2.0                            */
 
#/*                                                                          */
 
#/* Unless required by applicable law or agreed to in writing, software      */
 
#/* distributed under the License is distributed on an "AS IS" BASIS,        */
 
#/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
 
#/* See the License for the specific language governing permissions and      */
 
#/* limitations under the License.                                           */
 
#/*                                                                          */
 
#/*                                                                          */
 
#/****************************************************************************/
 
 
 
 
############################################################################
############################################################################
# General PERL config
# General PERL config
############################################################################
############################################################################
Line 109... Line 94...
 
 
my $parser = XML::LibXML->new();
my $parser = XML::LibXML->new();
my $spirit_component_file  = $parser->parse_file(yp::lib::find_ipxact_component($vendor,$library,$component,$version));
my $spirit_component_file  = $parser->parse_file(yp::lib::find_ipxact_component($vendor,$library,$component,$version));
my $comp_xml_sep           = yp::lib::find_comp_xml_sep($vendor,$library,$component,$version);
my $comp_xml_sep           = yp::lib::find_comp_xml_sep($vendor,$library,$component,$version);
my $lib_comp_sep           = yp::lib::find_lib_comp_sep($vendor,$library,$component);
my $lib_comp_sep           = yp::lib::find_lib_comp_sep($vendor,$library,$component);
 
my $child_dir              = yp::lib::get_child_dir;
 
 
 
 
 
 
 
 
 print "\n---GEN_elab_child_filelist -prefix $prefix -envidentifier $envidentifier  -vendor $vendor  -library $library  -component $component -version $version  \n";
 print "\n---GEN_elab_child_filelist -prefix $prefix -envidentifier $envidentifier  -vendor $vendor  -library $library  -component $component -version $version  \n";
 
 
foreach my $X_view ($spirit_component_file->findnodes('//spirit:component/spirit:model/spirit:views/spirit:view'))
foreach my $X_view ($spirit_component_file->findnodes('//ipxact:component/ipxact:model/ipxact:views/ipxact:view'))
         {
         {
         my($Xview_name)            = $X_view->findnodes('./spirit:name/text()')->to_literal ;
         my($Xview_name)            = $X_view->findnodes('./ipxact:name/text()')->to_literal ;
         my($Xview_envidentifier)   = $X_view->findnodes('./spirit:envIdentifier/text()')->to_literal ;
         my($Xview_envidentifier)   = $X_view->findnodes('./ipxact:envIdentifier/text()')->to_literal ;
         my($Xview_filesetref_name)  = $X_view->findnodes('./spirit:fileSetRef/spirit:localName/text()')->to_literal ;
         my($Xview_filesetref_name)  = $X_view->findnodes('./ipxact:fileSetRef/ipxact:localName/text()')->to_literal ;
 
 
#print  "XXXXX   $Xview_name || $Xview_envidentifier || $Xview_filesetref_name  \n";
#print  "XXXXX   $Xview_name || $Xview_envidentifier || $Xview_filesetref_name  \n";
 
 
         if($envidentifier eq $Xview_envidentifier )
         if($envidentifier eq $Xview_envidentifier )
              {
              {
Line 207... Line 193...
 
 
       ( ${ven},${lib},${cmp},${ver},${cfg}) = split( /:/ , $value);
       ( ${ven},${lib},${cmp},${ver},${cfg}) = split( /:/ , $value);
 
 
#       print "FIND  ${ven} ${lib} ${cmp} ${ver} ${cfg} $view \n";
#       print "FIND  ${ven} ${lib} ${cmp} ${ver} ${cfg} $view \n";
       my $filename = find_filename( $filesetref_name, $ven, $lib,$cmp,$ver);
       my $filename = find_filename( $filesetref_name, $ven, $lib,$cmp,$ver);
#       print SIMFILE "${home}${prefix}/children/${filename}_${cfg}.v \n";
#       print SIMFILE "${home}/${child_dir}/${filename}_${cfg}.v \n";
       push @simfilelist,"${home}${prefix}/children/${filename}_${cfg}.v \n";
       push @simfilelist,"${home}/${child_dir}/${filename}_${cfg}.v \n";
 
 
       }
       }
     }
     }
    }
    }
 
 
Line 328... Line 314...
     $new_version        = $4;
     $new_version        = $4;
 
 
     my $spirit_component_file    = $parser->parse_file(yp::lib::find_ipxact_component($new_vendor,$new_library,$new_component,$new_version));
     my $spirit_component_file    = $parser->parse_file(yp::lib::find_ipxact_component($new_vendor,$new_library,$new_component,$new_version));
 
 
 
 
           foreach  my   $i_name ($spirit_component_file->findnodes("//spirit:fileSets/spirit:fileSet/spirit:file/spirit:name"))
           foreach  my   $i_name ($spirit_component_file->findnodes("//ipxact:fileSets/ipxact:fileSet/ipxact:file/ipxact:name"))
              {
              {
              my($file_name)      = $i_name ->findnodes('./text()')->to_literal ;
              my($file_name)      = $i_name ->findnodes('./text()')->to_literal ;
              my($file_type)      = $i_name ->findnodes('../spirit:userFileType/text()')->to_literal ;
              my($file_type)      = $i_name ->findnodes('../ipxact:userFileType/text()')->to_literal ;
              my($logical_name)   = $i_name ->findnodes('../spirit:logicalName/text()')->to_literal ;
              my($logical_name)   = $i_name ->findnodes('../ipxact:logicalName/text()')->to_literal ;
              my($view_file)      = $i_name ->findnodes('../../spirit:name/text()')->to_literal ;
              my($view_file)      = $i_name ->findnodes('../../ipxact:name/text()')->to_literal ;
              if(($file_type eq "libraryDir") &&  ($logical_name eq "dest_dir")  )
              if(($file_type eq "libraryDir") &&  ($logical_name eq "dest_dir")  )
                 {
                 {
 
 
                 if( $view_file eq  $filesetref_name )
                 if( $view_file eq  $filesetref_name )
                   {
                   {

powered by: WebSVN 2.1.0

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