Line 112... |
Line 112... |
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
|
|
@filelist_sim = ( );
|
@filelist_sim = ( );
|
@filelist_cov = ( );
|
|
|
|
|
|
|
|
|
|
my @filelist = yp::lib::parse_component_file("$vendor","$project","$component","$version");
|
|
|
|
|
|
|
|
|
|
|
|
foreach $line (@filelist)
|
|
{
|
|
$_ = $line;
|
|
if(/::(\S+)::(\S+)::(\S+)::(\S+)::/)
|
|
{
|
|
$new_proj = $2;
|
|
$new_comp = $3;
|
|
$new_vendor = $1;
|
|
$new_version = $4;
|
|
}
|
|
|
|
|
|
|
|
#############################################################################
|
|
## Read destination from source xml file
|
|
##
|
|
#############################################################################
|
|
|
|
|
|
|
|
my $spirit_component_file = $parser->parse_file(yp::lib::find_ipxact("spirit:component",$new_vendor,$new_proj,$new_comp,$new_version));
|
|
|
|
|
|
|
|
|
|
if($new_version){$new_variant = "${new_comp}_${new_version}"}
|
|
else {$new_variant = $new_comp}
|
|
|
|
|
|
|
|
|
|
if(($new_vendor eq $vendor ) && ($new_proj eq $project ) && ($new_comp eq $component ) && ($new_version eq $version ) )
|
|
{
|
|
|
|
foreach my $i_name ($spirit_component_file->findnodes("//spirit:fileSets/spirit:fileSet/spirit:file/spirit:name"))
|
|
{
|
|
my($file_name) = $i_name ->findnodes('./text()')->to_literal ;
|
|
my($file_type) = $i_name ->findnodes('../spirit:userFileType/text()')->to_literal ;
|
|
my($logical_name) = $i_name ->findnodes('../spirit:logicalName/text()')->to_literal ;
|
|
my($view_file) = $i_name ->findnodes('../../spirit:name/text()')->to_literal ;
|
|
my $component_path = yp::lib::find_ipxact_component_path("spirit:component",$new_vendor,$new_proj,$new_comp,$new_version);
|
|
|
|
if( ($file_type eq "libraryDir") && ($view_file eq "fs-sim") && ($logical_name eq "dest_dir") )
|
|
{
|
|
push(@filelist_sim,"../../../../${new_comp}${component_path}/${file_name}${new_variant}.v\n");
|
|
};
|
|
|
|
if(($file_type eq "libraryDir")&& (($view_file eq "fs-lint") ) && ($logical_name eq "dest_dir") )
|
|
{
|
|
push(@filelist_cov,"-v ../../../../${new_comp}${component_path}/${file_name}${new_variant}.v\n");
|
|
};
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
foreach my $i_name ($spirit_component_file->findnodes("//spirit:fileSets/spirit:fileSet/spirit:file/spirit:name"))
|
|
{
|
|
my($file_name) = $i_name ->findnodes('./text()')->to_literal ;
|
|
my($file_type) = $i_name ->findnodes('../spirit:userFileType/text()')->to_literal ;
|
|
my($logical_name) = $i_name ->findnodes('../spirit:logicalName/text()')->to_literal ;
|
|
my($view_file) = $i_name ->findnodes('../../spirit:name/text()')->to_literal ;
|
|
my $library_path = yp::lib::find_ipxact_library_path("spirit:component",$new_vendor,$new_proj,$new_comp,$new_version);
|
|
|
|
|
|
if(($file_type eq "libraryDir")&& (($view_file eq "fs-sim") ) && ($logical_name eq "dest_dir") )
|
|
{
|
|
push(@filelist_sim,"../../../../../children/${new_vendor}__${new_proj}${library_path}/${file_name}${new_variant}.v\n");
|
|
};
|
|
if(($file_type eq "libraryDir")&& (($view_file eq "fs-lint") ) && ($logical_name eq "dest_dir") )
|
|
{
|
|
push(@filelist_cov,"-v ../../../../../children/${new_vendor}__${new_proj}${library_path}/${file_name}${new_variant}.v\n");
|
|
};
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#############################################################################
|
#############################################################################
|
Line 216... |
Line 129... |
|
|
print "Building SIM filelists for $work_site $vendor $project $component $version $variant \n" ;
|
print "Building SIM filelists for $work_site $vendor $project $component $version $variant \n" ;
|
|
|
my $spirit_component_file = $parser->parse_file(yp::lib::find_ipxact("spirit:component",$vendor,$project,$component,$version));
|
my $spirit_component_file = $parser->parse_file(yp::lib::find_ipxact("spirit:component",$vendor,$project,$component,$version));
|
my $sogen_file = $parser->parse_file(yp::lib::find_socgen("socgen:componentConfiguration",$vendor,$project,$component));
|
my $sogen_file = $parser->parse_file(yp::lib::find_socgen("socgen:componentConfiguration",$vendor,$project,$component));
|
|
|
my $sim_library_path = $sogen_file->findnodes("//socgen:componentConfiguration/socgen:sim/socgen:library_path/text()")->to_literal;
|
my $sim_library_path = $sogen_file->findnodes("//socgen:componentConfiguration/socgen:sim/socgen:library_path/text()")->to_literal;
|
|
|
|
|
|
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
Line 239... |
Line 151... |
{
|
{
|
my($parameter_name) = $i_name ->findnodes('socgen:name/text()')->to_literal ;
|
my($parameter_name) = $i_name ->findnodes('socgen:name/text()')->to_literal ;
|
my($parameter_default) = $i_name ->findnodes('socgen:value/text()')->to_literal ;
|
my($parameter_default) = $i_name ->findnodes('socgen:value/text()')->to_literal ;
|
$default_parameters{$parameter_name} = $parameter_default;
|
$default_parameters{$parameter_name} = $parameter_default;
|
push @parameter_order ,$parameter_name ;
|
push @parameter_order ,$parameter_name ;
|
# print "XXXXY $parameter_name $parameter_default \n";
|
|
}
|
}
|
|
|
|
|
|
|
|
|
Line 264... |
Line 175... |
print "rtl/gen directories for $project - $component VLNV $vendor - $library - $name - $variant \n";
|
print "rtl/gen directories for $project - $component VLNV $vendor - $library - $name - $variant \n";
|
$module_name = yp::lib::get_module_name($vendor,$library,$name,$version);
|
$module_name = yp::lib::get_module_name($vendor,$library,$name,$version);
|
}
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print "CREATING componentRef filelists for $project $component $name $variant \n";
|
print "CREATING componentRef filelists for $project $component $name $variant \n";
|
|
|
|
|
|
|
@filelist_cov = sys::lib::trim_sort(@filelist_cov);
|
|
@filelist_sim = sys::lib::trim_sort(@filelist_sim);
|
|
|
|
|
|
|
|
|
|
|
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
Line 301... |
Line 195... |
|
|
my $path ="${home}${work_site}/${vendor}__${project}${sim_library_path}/cov";
|
my $path ="${home}${work_site}/${vendor}__${project}${sim_library_path}/cov";
|
mkdir $path,0755 unless( -e $path );
|
mkdir $path,0755 unless( -e $path );
|
$path ="${home}${work_site}/${vendor}__${project}${sim_library_path}/cov/${variant}";
|
$path ="${home}${work_site}/${vendor}__${project}${sim_library_path}/cov/${variant}";
|
mkdir $path,0755 unless( -e $path );
|
mkdir $path,0755 unless( -e $path );
|
my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/cov/${variant}/filelist.cov";
|
|
open COVFILE,">$outfile" or die "unable to open $outfile";
|
|
|
|
foreach my $i_line (@filelist_cov) {print COVFILE "$i_line";}
|
|
|
|
my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/cov/${variant}/TestBench";
|
my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/cov/${variant}/TestBench";
|
open DUTFILE,">$outfile" or die "unable to open $outfile";
|
open DUTFILE,">$outfile" or die "unable to open $outfile";
|
print DUTFILE "`define SYNTHESIS \n";
|
|
print DUTFILE "`timescale 1ns/1ns \n";
|
print DUTFILE "`timescale 1ns/1ns \n";
|
print DUTFILE " module TB(); \n";
|
print DUTFILE " module TB(); \n";
|
print DUTFILE " $module_name test ( ); \n";
|
|
|
print DUTFILE " $module_name \n";
|
|
my $first =1;
|
|
foreach my $parameter_name (@parameter_order)
|
|
{
|
|
my($parameter_default) = $default_parameters{$parameter_name};
|
|
if($first)
|
|
{
|
|
print DUTFILE " #( .${parameter_name}(${parameter_default})";
|
|
$first = 0;
|
|
}
|
|
else
|
|
{
|
|
print DUTFILE ",\n .${parameter_name}(${parameter_default})";
|
|
}
|
|
}
|
|
if($first)
|
|
{
|
|
print DUTFILE " test \n (); \n\n\n\n";
|
|
}
|
|
else
|
|
{
|
|
print DUTFILE ") test \n (); \n\n\n\n";
|
|
}
|
|
|
|
|
print DUTFILE " endmodule \n";
|
print DUTFILE " endmodule \n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
}
|
|
|
|
|
|
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
Line 343... |
Line 270... |
|
|
|
|
my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/icarus/${simulation}/Makefile";
|
my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/icarus/${simulation}/Makefile";
|
open MAKSIMFILE,">$outfile" or die "unable to open $outfile";
|
open MAKSIMFILE,">$outfile" or die "unable to open $outfile";
|
|
|
my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/icarus/${simulation}/filelist.sim";
|
|
open SIMFILE,">$outfile" or die "unable to open $outfile";
|
|
|
|
my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/icarus/${simulation}/TestBench";
|
my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/icarus/${simulation}/TestBench";
|
open SIM_PARM_FILE,">$outfile" or die "unable to open $outfile";
|
open SIM_PARM_FILE,">$outfile" or die "unable to open $outfile";
|
|
|
print MAKSIMFILE "include ../../../../../bin/Makefile.root\n";
|
print MAKSIMFILE "include ${home}/tools/bin/Makefile.root\n";
|
print MAKSIMFILE "comp=${variant}\n";
|
print MAKSIMFILE "comp=${variant}\n";
|
print MAKSIMFILE "test=${simulation}\n";
|
print MAKSIMFILE "test=${simulation}\n";
|
|
print MAKSIMFILE "simulator=icarus\n";
|
|
|
|
|
|
|
foreach my $i_line (@filelist_sim){ print SIMFILE "$i_line";}
|
|
|
|
|
|
|
|
my %local_parameters = %default_parameters;
|
my %local_parameters = %default_parameters;
|
my @local_order = @parameter_order;
|
my @local_order = @parameter_order;
|
|
|
Line 437... |
Line 361... |
print SIM_PARM_FILE "@ (posedge clk); \n";
|
print SIM_PARM_FILE "@ (posedge clk); \n";
|
print SIM_PARM_FILE "@ (posedge clk); \n";
|
print SIM_PARM_FILE "@ (posedge clk); \n";
|
print SIM_PARM_FILE "@ (posedge clk) ; \n";
|
print SIM_PARM_FILE "@ (posedge clk) ; \n";
|
print SIM_PARM_FILE "START = 1; \n";
|
print SIM_PARM_FILE "START = 1; \n";
|
print SIM_PARM_FILE "end \n";
|
print SIM_PARM_FILE "end \n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print SIM_PARM_FILE "always@(posedge clk) \n";
|
print SIM_PARM_FILE "always@(posedge clk) \n";
|
print SIM_PARM_FILE "if(START && FINISH) \n";
|
print SIM_PARM_FILE "if(START && FINISH) \n";
|
print SIM_PARM_FILE "begin \n";
|
print SIM_PARM_FILE "begin \n";
|
print SIM_PARM_FILE " if(failed) \n";
|
print SIM_PARM_FILE " if(failed) \n";
|
print SIM_PARM_FILE " begin \n";
|
print SIM_PARM_FILE " begin \n";
|