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 2016 John T Eaton */
|
|
#/* */
|
|
#/* 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 */
|
#/* */
|
#/* */
|
#/* Copyright (C) <2010-2011> */
|
#/* 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. */
|
#/* */
|
#/* */
|
#/* This source file may be used and distributed without */
|
|
#/* 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 */
|
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/****************************************************************************/
|
|
|
|
|
use Getopt::Long;
|
use Getopt::Long;
|
use English;
|
use English;
|
use File::Basename;
|
use File::Basename;
|
use Cwd;
|
use Cwd;
|
Line 70... |
Line 58... |
|
|
|
|
my $prefix = yp::lib::get_workspace();
|
my $prefix = yp::lib::get_workspace();
|
$prefix = "/${prefix}";
|
$prefix = "/${prefix}";
|
|
|
|
my $child_dir = yp::lib::get_child_dir;
|
|
|
|
|
my $path = "${home}${prefix}";
|
my $path = "${home}${prefix}";
|
|
|
mkdir $path,0755 unless( -e $path );
|
mkdir $path,0755 unless( -e $path );
|
|
|
|
|
Line 134... |
Line 125... |
print "Vendor $vendor_status Library $library_status \n";
|
print "Vendor $vendor_status Library $library_status \n";
|
|
|
&link_sub( $root,$root, ".${prefix}/${vendor}__${library}" );
|
&link_sub( $root,$root, ".${prefix}/${vendor}__${library}" );
|
|
|
|
|
#/*********************************************************************************************/
|
my $path = "${home}/${child_dir}";
|
#/ */
|
|
#/ Each library is given access to the system tools by giving each of them a link to the */
|
|
#/ Master Makefiles in tools/bin */
|
|
#/ */
|
|
#/ */
|
|
#/*********************************************************************************************/
|
|
|
|
|
|
|
|
if (system("chmod 755 ${home}/${repo}/${vendor}/${library}/bin/* \n" )) {}
|
|
|
|
|
|
symlink( "${home}/tools/bin/Makefile.root", "${home}${prefix}/${vendor}__${library}/bin/Makefile.root");
|
|
symlink( "${home}/tools/bin/Makefile", "${home}${prefix}/${vendor}__${library}/bin/Makefile");
|
|
|
|
|
|
|
|
my $path = "${home}${prefix}/children";
|
|
mkdir $path,0755 unless( -e $path );
|
mkdir $path,0755 unless( -e $path );
|
|
|
my @components = yp::lib::find_components($vendor,$library);
|
my @components = yp::lib::find_components($vendor,$library);
|
foreach my $component (@components)
|
foreach my $component (@components)
|
{
|
{
|
Line 165... |
Line 138... |
|
|
|
|
my $socgen_filename = yp::lib::find_componentConfiguration($vendor,$library,$component);
|
my $socgen_filename = yp::lib::find_componentConfiguration($vendor,$library,$component);
|
if($socgen_filename)
|
if($socgen_filename)
|
{
|
{
|
|
|
my $socgen_file = $parser->parse_file(yp::lib::find_componentConfiguration($vendor,$library,$component));
|
my $socgen_file = $parser->parse_file(yp::lib::find_componentConfiguration($vendor,$library,$component));
|
|
|
|
|
|
|
|
|
my @versions = yp::lib::find_component_versions($vendor,$library,$component);
|
my @versions = yp::lib::find_component_versions($vendor,$library,$component);
|
|
|
foreach $comp_version (@versions)
|
foreach $comp_version (@versions)
|
{
|
{
|
$cmd ="./tools/sys/soc_link_child -prefix $prefix -vendor $vendor -library $library -component $component -version $comp_version \n";
|
$cmd ="./tools/sys/soc_link_child -prefix $prefix -vendor $vendor -library $library -component $component -version $comp_version \n";
|
Line 190... |
Line 158... |
|
|
$cmd ="./tools/sys/soc_link_child -prefix $prefix -vendor ${vendor} -library $library -component $component -version $tb_version \n";
|
$cmd ="./tools/sys/soc_link_child -prefix $prefix -vendor ${vendor} -library $library -component $component -version $tb_version \n";
|
if (system($cmd)) {}
|
if (system($cmd)) {}
|
}
|
}
|
|
|
#/*********************************************************************************************/
|
|
#/ link chip files for synthesys */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/*********************************************************************************************/
|
|
|
|
print "Linking synthesys targets for $vendor $library $component \n";
|
|
my $lib_comp_sep = yp::lib::find_lib_comp_sep($vendor,$library,$component);
|
|
|
|
|
|
foreach my $i_name ($socgen_file->findnodes("//socgen:syn/socgen:ise/socgen:chip/socgen:variant"))
|
|
{
|
|
my($chip_variant) = $i_name ->findnodes('./text()')->to_literal ;
|
|
my($chip_target) = $i_name ->findnodes('../socgen:target/socgen:library/text()')->to_literal ;
|
|
my($chip_part) = $i_name ->findnodes('../socgen:target/socgen:part/text()')->to_literal ;
|
|
$outfile ="${home}${prefix}/${vendor}__${library}${lib_comp_sep}${component}/syn/ise/${chip_variant}/Makefile";
|
|
open MAKSYNFILE,">$outfile" or die "unable to open $outfile";
|
|
print MAKSYNFILE "include ${home}/tools/bin/Makefile.root\n";
|
|
print MAKSYNFILE "Part=${chip_part}\n";
|
|
print MAKSYNFILE "board=${chip_target}\n";
|
|
print MAKSYNFILE "Design=${chip_variant}\n";
|
|
my $path = "${home}${prefix}/${vendor}__${library}${lib_comp_sep}${component}/syn/ise/${chip_variant}/target";
|
|
mkdir $path,0755 unless( -e $path );
|
|
&sys::lib::link_dir( "${home}/tools/synthesys/targets/ip/${chip_target}", "${home}${prefix}/${vendor}__${library}${lib_comp_sep}${component}/syn/ise/${chip_variant}/target" );
|
|
}
|
|
}
|
}
|
|
|
}
|
}
|
|
|
|
|