Line 71... |
Line 71... |
|
|
##############################################################################
|
##############################################################################
|
## Help option
|
## Help option
|
##############################################################################
|
##############################################################################
|
if ( $opt_h or $opt_help )
|
if ( $opt_h or $opt_help )
|
{ print "\n run_lint project_name project_vendor";
|
{ print "\n run_lint 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();
|
|
$prefix = "/${prefix}";
|
$_ = $ARGV[0];
|
$_ = $ARGV[0];
|
my $work_site = $ARGV[1];
|
|
|
|
|
|
if(/(\S+)__(\S+)/)
|
if(/(\S+)__(\S+)/)
|
{
|
{
|
$vendor = $1;
|
$vendor = $1;
|
$project = $2;
|
$library = $2;
|
}
|
}
|
|
|
|
|
|
|
|
|
Line 114... |
Line 114... |
|
|
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)
|
{
|
{
|
Line 145... |
Line 150... |
my($sim_name) = $i_name ->findnodes('./text()')->to_literal ;
|
my($sim_name) = $i_name ->findnodes('./text()')->to_literal ;
|
my($sim_configuration) = $i_name ->findnodes('../socgen:configuration/text()')->to_literal ;
|
my($sim_configuration) = $i_name ->findnodes('../socgen:configuration/text()')->to_literal ;
|
my($sim_variant) = $i_name ->findnodes('../socgen:variant/text()')->to_literal ;
|
my($sim_variant) = $i_name ->findnodes('../socgen:variant/text()')->to_literal ;
|
|
|
print " lint $sim_name $sim_configuration $sim_variant ";
|
print " lint $sim_name $sim_configuration $sim_variant ";
|
chdir ".${work_site}/${vendor}__${project}${sim_library_path}/rtl_check/${sim_name}";
|
|
|
|
$cmd ="make lint";
|
$cmd ="cd .${prefix}/${vendor}__${library}${sim_library_path}/rtl_check/${sim_name};make lint";
|
if (system($cmd)) {}
|
if (system($cmd)) {}
|
|
|
chdir $home;
|
chdir $home;
|
|
|
|
}
|
|
|
}
|
}
|
|
|
}
|
}
|
|
|