Line 63... |
Line 63... |
#/ A special work area is created that is the image of the database using symbolic links */
|
#/ A special work area is created that is the image of the database using symbolic links */
|
#/ */
|
#/ */
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
|
|
my $home = cwd();
|
my $home = cwd();
|
my $root = $ARGV[0];
|
|
my $prefix = $ARGV[1];
|
|
|
|
chomp($root);
|
|
chomp($prefix);
|
|
|
|
|
|
$_ = $root;
|
|
|
|
if(/\/(\S+)\/(\S+)\/(\S+)/)
|
my $prefix = yp::lib::get_workspace();
|
|
$prefix = "/${prefix}";
|
|
|
|
my $path = "${home}${prefix}";
|
|
|
|
mkdir $path,0755 unless( -e $path );
|
|
|
|
|
|
my $vendor = $ARGV[0];
|
|
my $library = $ARGV[1];
|
|
|
|
chomp($vendor);
|
|
chomp($library);
|
|
|
|
|
|
$_ = $vendor;
|
|
|
|
if(/(\S+)\/(\S+)/)
|
{
|
{
|
$projects_dir = $1;
|
$vendor = $1;
|
$vendor = $2;
|
$library = $2;
|
$project = $3;
|
|
}
|
}
|
|
|
$root = "${projects_dir}/${vendor}/${project}/";
|
|
|
|
|
my $repo = yp::lib::find_library_repo($vendor,$library);
|
|
my $root = ".${repo}/${vendor}/${library}/";
|
|
|
|
|
unless ( -e $root )
|
unless ( -e $root )
|
{
|
{
|
print "ERROR: Project $root does not exist \n";
|
print "ERROR: Library $vendor $library does not exist \n";
|
exit(0);
|
exit(0);
|
}
|
}
|
|
|
|
|
unless ( $prefix )
|
|
{
|
|
$prefix = "/work";
|
|
}
|
|
|
|
|
|
my $path = "${home}${prefix}";
|
|
|
|
mkdir $path,0755 unless( -e $path );
|
|
|
|
|
|
$path = "${home}${prefix}/${vendor}__${project}";
|
|
|
|
|
$path = "${home}${prefix}/${vendor}__${library}";
|
mkdir $path,0755 unless( -e $path );
|
mkdir $path,0755 unless( -e $path );
|
|
|
|
my $vendor_status = yp::lib::get_vendor_status($vendor);
|
|
my $library_status = yp::lib::get_library_status($vendor,$library);
|
|
|
print "Building Workspace ${prefix}/${vendor}__${project} from ./${projects_dir}/${vendor}/${project}/ \n";
|
|
|
|
|
print "Building Workspace ${prefix}/${vendor}__${library} from .${repo}/${vendor}/${library}/ $vendor_status $library_status \n";
|
|
|
&link_sub( $root,$root, ".${prefix}/${vendor}__${project}" );
|
|
|
|
|
|
|
$vendor_status = yp::lib::set_vendor_status($vendor,"active");
|
|
$vendor_status = yp::lib::get_vendor_status($vendor);
|
|
|
|
$library_status = yp::lib::set_library_status($vendor,$library,"active");
|
|
$library_status = yp::lib::get_library_status($vendor,$library);
|
|
|
|
|
|
print "Vendor $vendor_status Library $library_status \n";
|
|
|
|
&link_sub( $root,$root, ".${prefix}/${vendor}__${library}" );
|
|
|
|
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
#/ */
|
#/ */
|
#/ Each project is given access to the system tools by giving each of them a link to the */
|
#/ Each library is given access to the system tools by giving each of them a link to the */
|
#/ Master Makefiles in tools/bin */
|
#/ Master Makefiles in tools/bin */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
|
|
|
|
|
|
if (system("chmod 755 ${home}/${projects_dir}/${vendor}/${project}/bin/* \n" )) {}
|
if (system("chmod 755 ${home}/${repo}/${vendor}/${library}/bin/* \n" )) {}
|
|
|
|
|
symlink( "${home}/tools/bin/Makefile.root", "${home}${prefix}/${vendor}__${project}/bin/Makefile.root");
|
symlink( "${home}/tools/bin/Makefile.root", "${home}${prefix}/${vendor}__${library}/bin/Makefile.root");
|
symlink( "${home}/tools/bin/Makefile", "${home}${prefix}/${vendor}__${project}/bin/Makefile");
|
symlink( "${home}/tools/bin/Makefile", "${home}${prefix}/${vendor}__${library}/bin/Makefile");
|
|
|
|
|
|
|
my $path = "${home}${prefix}/${vendor}__${project}/children";
|
my $path = "${home}${prefix}/${vendor}__${library}/children";
|
mkdir $path,0755 unless( -e $path );
|
mkdir $path,0755 unless( -e $path );
|
|
|
my @components = yp::lib::find_components($vendor,$project);
|
my @components = yp::lib::find_components($vendor,$library);
|
foreach my $component (@components)
|
foreach my $component (@components)
|
{
|
{
|
my $parser = XML::LibXML->new();
|
my $parser = XML::LibXML->new();
|
print " $vendor,$project,$component \n";
|
print " $vendor,$library,$component \n";
|
my $socgen_file = $parser->parse_file(yp::lib::find_componentConfiguration($vendor,$project,$component));
|
|
my @versions = yp::lib::find_component_versions($vendor,$project,$component);
|
|
|
my $socgen_filename = yp::lib::find_componentConfiguration($vendor,$library,$component);
|
|
if($socgen_filename)
|
|
{
|
|
|
|
my $socgen_file = $parser->parse_file(yp::lib::find_componentConfiguration($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 -project $project -component $component -version $comp_version $projects_dir \n";
|
$cmd ="./tools/sys/soc_link_child -prefix $prefix -vendor $vendor -library $library -component $component -version $comp_version \n";
|
if (system($cmd)) {}
|
if (system($cmd)) {}
|
}
|
}
|
|
|
print "Linking simulations for $vendor $project $component \n";
|
print "Linking simulations for $vendor $library $component \n";
|
|
|
foreach my $i_name ($socgen_file->findnodes("//socgen:sim/socgen:testbenches/socgen:testbench/socgen:version"))
|
foreach my $i_name ($socgen_file->findnodes("//socgen:sim/socgen:testbenches/socgen:testbench/socgen:version"))
|
{
|
{
|
|
|
my($tb_version) = $i_name ->findnodes('./text()')->to_literal ;
|
my($tb_version) = $i_name ->findnodes('./text()')->to_literal ;
|
|
|
$cmd ="./tools/sys/soc_link_child -prefix $prefix -vendor ${vendor} -project $project -component $component -version $tb_version $projects_dir \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 */
|
#/ link chip files for synthesys */
|
Line 165... |
Line 199... |
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
|
|
print "Linking synthesys targets for $vendor $project $component \n";
|
print "Linking synthesys targets for $vendor $library $component \n";
|
my $lib_comp_sep = yp::lib::find_lib_comp_sep($vendor,$project,$component);
|
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:variant"))
|
foreach my $i_name ($socgen_file->findnodes("//socgen:syn/socgen:ise/socgen:chip/socgen:variant"))
|
{
|
{
|
my($chip_name) = $i_name ->findnodes('./text()')->to_literal ;
|
my($chip_name) = $i_name ->findnodes('./text()')->to_literal ;
|
my($chip_target) = $i_name ->findnodes('../socgen:target/socgen:library/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 ;
|
my($chip_part) = $i_name ->findnodes('../socgen:target/socgen:part/text()')->to_literal ;
|
$outfile ="${home}${prefix}/${vendor}__${project}${lib_comp_sep}${component}/syn/ise/${chip_name}/Makefile";
|
$outfile ="${home}${prefix}/${vendor}__${library}${lib_comp_sep}${component}/syn/ise/${chip_name}/Makefile";
|
open MAKSYNFILE,">$outfile" or die "unable to open $outfile";
|
open MAKSYNFILE,">$outfile" or die "unable to open $outfile";
|
print MAKSYNFILE "include ${home}/tools/bin/Makefile.root\n";
|
print MAKSYNFILE "include ${home}/tools/bin/Makefile.root\n";
|
print MAKSYNFILE "Part=${chip_part}\n";
|
print MAKSYNFILE "Part=${chip_part}\n";
|
print MAKSYNFILE "board=${chip_target}\n";
|
print MAKSYNFILE "board=${chip_target}\n";
|
print MAKSYNFILE "Design=${chip_name}\n";
|
print MAKSYNFILE "Design=${chip_name}\n";
|
my $path = "${home}${prefix}/${vendor}__${project}${lib_comp_sep}${component}/syn/ise/${chip_name}/target";
|
my $path = "${home}${prefix}/${vendor}__${library}${lib_comp_sep}${component}/syn/ise/${chip_name}/target";
|
mkdir $path,0755 unless( -e $path );
|
mkdir $path,0755 unless( -e $path );
|
&sys::lib::link_dir( "${home}/tools/synthesys/targets/ip/${chip_target}", "${home}${prefix}/${vendor}__${project}${lib_comp_sep}${component}/syn/ise/${chip_name}/target" );
|
&sys::lib::link_dir( "${home}/tools/synthesys/targets/ip/${chip_target}", "${home}${prefix}/${vendor}__${library}${lib_comp_sep}${component}/syn/ise/${chip_name}/target" );
|
}
|
}
|
}
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|