Line 71... |
Line 71... |
|
|
##############################################################################
|
##############################################################################
|
## Help option
|
## Help option
|
##############################################################################
|
##############################################################################
|
if ( $opt_h or $opt_help )
|
if ( $opt_h or $opt_help )
|
{ print "\n run_coverage project_name project_vendor";
|
{ print "\n run_coverage vendor library";
|
print "\n";
|
print "\n";
|
exit 1;
|
exit 1;
|
}
|
}
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* Process each project by finding any ip-xact file in any component */
|
#/* Process each library by finding any ip-xact file in any component */
|
#/* */
|
#/* */
|
#/* Each ip-xact file is parsed and it's filename and the names of any*/
|
#/* Each ip-xact file is parsed and it's filename and the names of any*/
|
#/* modules that it uses are saved. */
|
#/* modules that it uses are saved. */
|
#/* */
|
#/* */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
|
|
|
|
my $home = cwd();
|
my $home = cwd();
|
my $vendor ;
|
my $vendor ;
|
my $project ;
|
my $library ;
|
|
|
|
|
|
my $prefix = yp::lib::get_workspace();
|
|
|
$_ = $ARGV[0];
|
$_ = $ARGV[0];
|
my $work_site = $ARGV[1];
|
|
|
|
|
|
if(/(\S+)__(\S+)/)
|
if(/(\S+)__(\S+)/)
|
{
|
{
|
$vendor = $1;
|
$vendor = $1;
|
$project = $2;
|
$library = $2;
|
}
|
}
|
|
|
|
|
print "$work_site $vendor $project \n";
|
|
|
|
|
|
my $parser = XML::LibXML->new();
|
my $parser = XML::LibXML->new();
|
|
|
|
|
|
|
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 $socgen_file = $parser->parse_file(yp::lib::find_componentConfiguration($vendor,$project,$component));
|
|
|
my $socgen_filename = yp::lib::find_componentConfiguration($vendor,$library,$component);
|
|
if($socgen_filename)
|
|
{
|
|
|
|
my $socgen_file = $parser->parse_file($socgen_filename);
|
my $sim_library_path ;
|
my $sim_library_path ;
|
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);
|
my $sim_comp_path = $socgen_file->findnodes("//socgen:componentConfiguration/socgen:sim/socgen:comp_path/text()")->to_literal;
|
my $sim_comp_path = $socgen_file->findnodes("//socgen:componentConfiguration/socgen:sim/socgen:comp_path/text()")->to_literal;
|
|
|
if ($sim_comp_path)
|
if ($sim_comp_path)
|
{
|
{
|
$sim_library_path ="${lib_comp_sep}${sim_comp_path}";
|
$sim_library_path ="${lib_comp_sep}${sim_comp_path}";
|
Line 127... |
Line 135... |
else
|
else
|
{
|
{
|
$sim_library_path = $socgen_file->findnodes("//socgen:componentConfiguration/socgen:sim/socgen:library_path/text()")->to_literal;
|
$sim_library_path = $socgen_file->findnodes("//socgen:componentConfiguration/socgen:sim/socgen:library_path/text()")->to_literal;
|
}
|
}
|
|
|
print "XXXX- $vendor $project $component $sim_library_path \n";
|
print "XXXX- $vendor $library $component $sim_library_path \n";
|
|
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
#/ create coverage database .cdd file */
|
#/ create coverage database .cdd file */
|
#/ */
|
#/ */
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
Line 143... |
Line 151... |
my($tb_version) = $i_name ->findnodes('../../socgen:version/text()')->to_literal ;
|
my($tb_version) = $i_name ->findnodes('../../socgen:version/text()')->to_literal ;
|
|
|
if($tb_tool eq "coverage")
|
if($tb_tool eq "coverage")
|
{
|
{
|
print " COVERAGEs $tb_tool $tb_variant $tb_version \n";
|
print " COVERAGEs $tb_tool $tb_variant $tb_version \n";
|
chdir ".${work_site}/${vendor}__${project}${sim_library_path}/cov/${tb_variant}";
|
chdir "./${prefix}/${vendor}__${library}${sim_library_path}/cov/${tb_variant}";
|
|
|
$cmd ="make build_cdd \n";
|
$cmd ="make build_cdd \n";
|
if (system($cmd)) {}
|
if (system($cmd)) {}
|
|
|
|
|
Line 187... |
Line 195... |
|
|
|
|
|
|
}
|
}
|
|
|
|
}
|
|
|
|
|
|
|