Line 68... |
Line 68... |
Getopt::Long::config("require_order", "prefix=-");
|
Getopt::Long::config("require_order", "prefix=-");
|
GetOptions("h",
|
GetOptions("h",
|
"envidentifier=s" => \$envidentifier,
|
"envidentifier=s" => \$envidentifier,
|
"prefix=s" => \$prefix,
|
"prefix=s" => \$prefix,
|
"vendor=s" => \$vendor,
|
"vendor=s" => \$vendor,
|
"project=s" => \$project,
|
"library=s" => \$library,
|
"version=s" => \$version,
|
"version=s" => \$version,
|
"component=s" => \$component,
|
"component=s" => \$component,
|
"dest_dir=s" => \$dest_dir,
|
"dest_dir=s" => \$dest_dir,
|
"bus_intf=s" => \$bus_intf
|
"bus_intf=s" => \$bus_intf
|
) || die "(use '$program_name -h' for help)";
|
) || die "(use '$program_name -h' for help)";
|
Line 81... |
Line 81... |
##############################################################################
|
##############################################################################
|
## Help option
|
## Help option
|
##############################################################################
|
##############################################################################
|
if ( $opt_h )
|
if ( $opt_h )
|
{
|
{
|
print "\n build_registers -envidentifier {sim|syn} -prefix /work -project project_name -component comp_name -version version_name -bus_intf bus_interface -dest_dir dest_dir";
|
print "\n build_registers -envidentifier {sim|syn} -prefix /work -library library_name -component comp_name -version version_name -bus_intf bus_interface -dest_dir dest_dir";
|
print "\n";
|
print "\n";
|
exit 1;
|
exit 1;
|
}
|
}
|
|
|
|
|
Line 97... |
Line 97... |
|
|
|
|
$home = cwd();
|
$home = cwd();
|
|
|
|
|
my $socgen_file = $parser->parse_file(yp::lib::find_componentConfiguration($vendor,$project,$component));
|
my $socgen_file = $parser->parse_file(yp::lib::find_componentConfiguration($vendor,$library,$component));
|
my $ip_name_base_macro = $socgen_file->findnodes("//socgen:componentConfiguration/socgen:ip_name_base_macro/text()")->to_literal;
|
my $ip_name_base_macro = $socgen_file->findnodes("//socgen:componentConfiguration/socgen:ip_name_base_macro/text()")->to_literal;
|
|
|
|
|
|
|
|
|
Line 111... |
Line 111... |
|
|
my $variant;
|
my $variant;
|
if($version) {$variant = "${component}_${version}";}
|
if($version) {$variant = "${component}_${version}";}
|
else {$variant = "${component}";}
|
else {$variant = "${component}";}
|
|
|
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 $comp_xml_sep = yp::lib::find_comp_xml_sep($vendor,$project,$component,$version);
|
my $comp_xml_sep = yp::lib::find_comp_xml_sep($vendor,$library,$component,$version);
|
|
|
#############################################################################
|
#############################################################################
|
##
|
##
|
##
|
##
|
#############################################################################
|
#############################################################################
|
|
|
print " Building RTL Registers for $prefix $vendor $project $component $variant in $dest_dir\n" ;
|
print " Building RTL Registers for $prefix $vendor $library $component $variant in $dest_dir\n" ;
|
|
|
|
|
|
|
my $path = "${home}${prefix}/${vendor}__${project}${lib_comp_sep}${component}${comp_xml_sep}/${dest_dir}";
|
my $path = "${home}${prefix}/${vendor}__${library}${lib_comp_sep}${component}${comp_xml_sep}/${dest_dir}";
|
mkdir $path,0755 unless( -e $path );
|
mkdir $path,0755 unless( -e $path );
|
|
|
|
|
|
|
my $name;
|
my $name;
|
my $library;
|
|
my $memmap_name;
|
my $memmap_name;
|
my $memmap_base;
|
my $memmap_base;
|
my $addblk_name;
|
my $addblk_name;
|
my $addblk_range;
|
my $addblk_range;
|
my $addblk_numrange;
|
my $addblk_numrange;
|
Line 180... |
Line 180... |
#/**********************************************************************/
|
#/**********************************************************************/
|
|
|
|
|
|
|
|
|
my $spirit_component_file = $parser->parse_file(yp::lib::find_ipxact_component($vendor,$project,$component,$version));
|
my $spirit_component_file = $parser->parse_file(yp::lib::find_ipxact_component($vendor,$library,$component,$version));
|
|
|
$name = $spirit_component_file->findnodes('//spirit:component/spirit:name/text()')->to_literal ;
|
$name = $spirit_component_file->findnodes('//spirit:component/spirit:name/text()')->to_literal ;
|
$version = $spirit_component_file->findnodes('//spirit:component/spirit:version/text()')->to_literal ;
|
$version = $spirit_component_file->findnodes('//spirit:component/spirit:version/text()')->to_literal ;
|
$vendor = $spirit_component_file->findnodes('//spirit:component/spirit:vendor/text()')->to_literal ;
|
$vendor = $spirit_component_file->findnodes('//spirit:component/spirit:vendor/text()')->to_literal ;
|
$library = $spirit_component_file->findnodes('//spirit:component/spirit:library/text()')->to_literal ;
|
$library = $spirit_component_file->findnodes('//spirit:component/spirit:library/text()')->to_literal ;
|
Line 224... |
Line 224... |
#/* Print header, module name and start parameters */
|
#/* Print header, module name and start parameters */
|
#/* */
|
#/* */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
|
|
my $outfile ="${home}${prefix}/${vendor}__${project}${lib_comp_sep}${component}${comp_xml_sep}/${dest_dir}/${name}_${version}_${memmap_name}";
|
my $outfile ="${home}${prefix}/${vendor}__${library}${lib_comp_sep}${component}${comp_xml_sep}/${dest_dir}/${name}_${version}_${memmap_name}";
|
open OUTFILE,">$outfile" or die "unable to open $outfile";
|
open OUTFILE,">$outfile" or die "unable to open $outfile";
|
|
|
print OUTFILE " /*********************************************/ \n";
|
print OUTFILE " /*********************************************/ \n";
|
print OUTFILE sprintf(" /* Vendor: %24s */ \n",$vendor);
|
print OUTFILE sprintf(" /* Vendor: %24s */ \n",$vendor);
|
print OUTFILE sprintf(" /* Library: %24s */ \n",$library);
|
print OUTFILE sprintf(" /* Library: %24s */ \n",$library);
|