OpenCores
URL https://opencores.org/ocsvn/socgen/socgen/trunk

Subversion Repositories socgen

[/] [socgen/] [trunk/] [tools/] [simulation/] [build_icarus_filelists] - Diff between revs 126 and 127

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 126 Rev 127
Line 77... Line 77...
 
 
##############################################################################
##############################################################################
## Help option
## Help option
##############################################################################
##############################################################################
if ( $opt_h  or $opt_help)
if ( $opt_h  or $opt_help)
  { print "\n build_sim_filelists -work_site /work  -vendor vendor_name  -project project_name  -component component_name   ";
  { print "\n build_icarus_filelists -work_site /work  -vendor vendor_name  -project project_name  -component component_name   ";
    print "\n";
    print "\n";
    exit 1;
    exit 1;
  }
  }
 
 
 
 
Line 154... Line 154...
   else             {$new_variant   = $new_comp}
   else             {$new_variant   = $new_comp}
 
 
 
 
 
 
 
 
   if($new_proj eq $project )
   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"))
           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_name)      = $i_name ->findnodes('./text()')->to_literal ;
Line 217... Line 217...
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 $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 297... Line 297...
 
 
 
 
foreach  my   $i_name ($sogen_file->findnodes("//socgen:testbench[socgen:variant/text() = '$variant']/socgen:code_coverage"))
foreach  my   $i_name ($sogen_file->findnodes("//socgen:testbench[socgen:variant/text() = '$variant']/socgen:code_coverage"))
   {
   {
 
 
   my $path ="${home}${work_site}/${vendor}__${project}${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}${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}${library_path}/cov/${variant}/filelist.cov";
   my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/cov/${variant}/filelist.cov";
   open COVFILE,">$outfile" or die "unable to open $outfile";
   open COVFILE,">$outfile" or die "unable to open $outfile";
 
 
   foreach  my   $i_line (@filelist_cov) {print COVFILE  "$i_line";}
   foreach  my   $i_line (@filelist_cov) {print COVFILE  "$i_line";}
 
 
   my $outfile ="${home}${work_site}/${vendor}__${project}${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  "`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 test (   );   \n";
Line 340... Line 340...
      my($simulation)      = $i_name ->findnodes('socgen:name/text()')->to_literal ;
      my($simulation)      = $i_name ->findnodes('socgen:name/text()')->to_literal ;
      my($configuration)   = $i_name ->findnodes('socgen:configuration/text()')->to_literal ;
      my($configuration)   = $i_name ->findnodes('socgen:configuration/text()')->to_literal ;
      print " sim files for   $project  $component   $variant  $simulation $configuration          \n";
      print " sim files for   $project  $component   $variant  $simulation $configuration          \n";
 
 
 
 
      my $outfile ="${home}${work_site}/${vendor}__${project}${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}${library_path}/icarus/${simulation}/filelist.sim";
      my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/icarus/${simulation}/filelist.sim";
      open SIMFILE,">$outfile" or die "unable to open $outfile";
      open SIMFILE,">$outfile" or die "unable to open $outfile";
 
 
      my $outfile ="${home}${work_site}/${vendor}__${project}${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 ../../../../../bin/Makefile.root\n";
      print MAKSIMFILE  "comp=${variant}\n";
      print MAKSIMFILE  "comp=${variant}\n";
      print MAKSIMFILE  "test=${simulation}\n";
      print MAKSIMFILE  "test=${simulation}\n";

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.