Line 101... |
Line 101... |
my $variant;
|
my $variant;
|
if($version) {$variant = "${component}_${version}";}
|
if($version) {$variant = "${component}_${version}";}
|
else {$variant = "${component}";}
|
else {$variant = "${component}";}
|
|
|
|
|
|
|
|
# print "XXXXXW $vendor $project $component $version GEN_VERILOG $view \n";
|
|
|
my $lib_comp_sep = yp::lib::find_lib_comp_sep($vendor,$project);
|
my $lib_comp_sep = yp::lib::find_lib_comp_sep($vendor,$project);
|
my $comp_xml_sep = yp::lib::find_ipxact_component_path("spirit:component",$vendor,$project,$component,$version);
|
my $comp_xml_sep = yp::lib::find_ipxact_component_path("spirit:component",$vendor,$project,$component,$version);
|
|
|
my $parser = XML::LibXML->new();
|
my $parser = XML::LibXML->new();
|
|
|
Line 121... |
Line 124... |
my %parameter_values = ();
|
my %parameter_values = ();
|
|
|
print " Building verilog for ${project} ${component} ${variant} \n ";
|
print " Building verilog for ${project} ${component} ${variant} \n ";
|
my $socgen_ip_file = $parser->parse_file(yp::lib::find_socgen("socgen:ip",$vendor,$project,$component));
|
my $socgen_ip_file = $parser->parse_file(yp::lib::find_socgen("socgen:ip",$vendor,$project,$component));
|
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 $spirit_design_file = yp::lib::find_ipxact_design_file($vendor,$project,$component,$version);
|
|
my $spirit_padring_file = yp::lib::find_ipxact_padring_file($vendor,$project,$component,$version);
|
|
my $spirit_padring_design_file = yp::lib::find_ipxact_padring_design_file($vendor,$project,$component,$version);
|
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* Every hier cell is constructed from the ipxact file with seperate */
|
#/* Every hier cell is constructed from the ipxact file with seperate */
|
Line 138... |
Line 137... |
#/* get fileset name */
|
#/* get fileset name */
|
#/* check that requested view exists */
|
#/* check that requested view exists */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
|
|
foreach my $comp_view ($spirit_component_file->findnodes('//spirit:component/spirit:model/spirit:views/spirit:view/spirit:fileSetRef'))
|
foreach my $comp_view ($spirit_component_file->findnodes("//spirit:component/spirit:model/spirit:views/spirit:view/spirit:name[text() = '$view']" ))
|
{
|
|
my($view_fileset_name) = $comp_view->findnodes('./spirit:localName/text()')->to_literal ;
|
|
my($view_name) = $comp_view->findnodes('../spirit:name/text()')->to_literal ;
|
|
|
|
if($view eq $view_name)
|
|
{
|
{
|
|
my($view_fileset_name) = $comp_view->findnodes('../spirit:fileSetRef/spirit:localName/text()')->to_literal ;
|
$outfile ="${home}${prefix}/${vendor}__${project}${lib_comp_sep}/${component}${comp_xml_sep}/${dest_dir}/${view}/${destination}";
|
$outfile ="${home}${prefix}/${vendor}__${project}${lib_comp_sep}/${component}${comp_xml_sep}/${dest_dir}/${view}/${destination}";
|
open DEST_FILE,">$outfile" or die "unable to open $outfile";
|
open DEST_FILE,">$outfile" or die "unable to open $outfile";
|
|
|
unless ($opt_fragment){ print DEST_FILE "\n module \n\n $variant \n ";}
|
unless ($opt_fragment){ print DEST_FILE "\n module \n\n $variant \n ";}
|
|
|
#/*****************************************************************************/
|
#/*****************************************************************************/
|
#/* wire_decs array holds all port and signal declarations */
|
#/* wire_decs array holds all port and signal declarations */
|
#/* :::name:::node_input_output:::wire_reg:::scaler_vector:::left:::right::: */
|
#/* :::name:::node_input_output:::wire_reg:::scaler_vector:::left:::right::: */
|
Line 171... |
Line 165... |
my %decl_types = ();
|
my %decl_types = ();
|
my %decl_vector = ();
|
my %decl_vector = ();
|
my %decl_lefts = ();
|
my %decl_lefts = ();
|
my %decl_rights = ();
|
my %decl_rights = ();
|
|
|
|
# component file
|
if($spirit_padring_file) {parse_component_file($spirit_padring_file);}
|
|
|
|
parse_component_file($spirit_component_file);
|
parse_component_file($spirit_component_file);
|
|
parse_design_files($spirit_component_file);
|
|
process_design_files($spirit_component_file);
|
|
|
|
|
|
|
|
|
|
|
|
|
# design file
|
|
|
|
if($spirit_padring_design_file) { parse_design_file($spirit_padring_design_file); }
|
|
if($spirit_design_file) { parse_design_file($spirit_design_file); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* pack ports and nodes into hashes */
|
#/* pack ports and nodes into hashes */
|
#/* */
|
#/* */
|
Line 204... |
Line 180... |
|
|
|
|
@wire_decs = sys::lib::trim_sort(@wire_decs);
|
@wire_decs = sys::lib::trim_sort(@wire_decs);
|
foreach $line (@wire_decs)
|
foreach $line (@wire_decs)
|
{
|
{
|
# print "X- $line \n";
|
|
$_ = $line;
|
$_ = $line;
|
if(/:::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::/)
|
if(/:::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::(\S+):::/)
|
{
|
{
|
$q_index = $1;
|
$q_index = $1;
|
$q_node_name = $2;
|
$q_node_name = $2;
|
Line 287... |
Line 262... |
#/* */
|
#/* */
|
#/* Print out module header , parameters and ports */
|
#/* Print out module header , parameters and ports */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
|
|
|
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* parse parameters and values */
|
#/* parse parameters and values */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
|
|
|
|
foreach my $i_name ($spirit_component_file->findnodes('//spirit:model/spirit:modelParameters/spirit:modelParameter/spirit:name'))
|
foreach my $i_name ($spirit_component_file->findnodes('//spirit:model/spirit:modelParameters/spirit:modelParameter/spirit:name'))
|
{
|
{
|
my($parameter_name) = $i_name ->to_literal;
|
my($parameter_name) = $i_name ->to_literal;
|
my($parameter_default) = $i_name ->findnodes('../spirit:value/text()')->to_literal ;
|
my($parameter_default) = $i_name ->findnodes('../spirit:value/text()')->to_literal ;
|
|
|
unless($parameter_values{$parameter_name}) {push ( @parameters, "$parameter_name");};
|
unless($parameter_values{$parameter_name}) {push ( @parameters, "$parameter_name");};
|
$parameter_values{$parameter_name} = ${parameter_default};
|
$parameter_values{$parameter_name} = ${parameter_default};
|
}
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* if configuration set then read parameters from socgen:ip file */
|
#/* if configuration set then read parameters from socgen:ip file */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
Line 324... |
Line 288... |
if($configuration)
|
if($configuration)
|
{
|
{
|
# print "XXX Reading configuration $configuration \n";
|
# print "XXX Reading configuration $configuration \n";
|
unless ($socgen_ip_file) { print "No socgen ip file \n";};
|
unless ($socgen_ip_file) { print "No socgen ip file \n";};
|
|
|
|
|
|
|
foreach my $socgen_cfg ($socgen_ip_file->findnodes("//socgen:ip/socgen:configurations/socgen:configuration/socgen:parameters/socgen:parameter/socgen:name"))
|
foreach my $socgen_cfg ($socgen_ip_file->findnodes("//socgen:ip/socgen:configurations/socgen:configuration/socgen:parameters/socgen:parameter/socgen:name"))
|
{
|
{
|
my($param_name) = $socgen_cfg->findnodes('./text()')->to_literal ;
|
my($param_name) = $socgen_cfg->findnodes('./text()')->to_literal ;
|
my($param_value) = $socgen_cfg->findnodes('../socgen:value/text()')->to_literal ;
|
my($param_value) = $socgen_cfg->findnodes('../socgen:value/text()')->to_literal ;
|
my($config_name) = $socgen_cfg->findnodes('../../../socgen:name/text()')->to_literal ;
|
my($config_name) = $socgen_cfg->findnodes('../../../socgen:name/text()')->to_literal ;
|
if($config_name eq $configuration )
|
if($config_name eq $configuration )
|
{
|
{
|
# print "XXX $config_name $param_name $param_value \n";
|
|
unless($parameter_values{$param_name}) {push ( @parameters, "$param_name");};
|
unless($parameter_values{$param_name}) {push ( @parameters, "$param_name");};
|
$parameter_values{$param_name} = ${param_value};
|
$parameter_values{$param_name} = ${param_value};
|
}
|
}
|
}
|
}
|
|
|
|
|
}
|
}
|
else {print "No configuration \n";};
|
else {print "No configuration \n";};
|
|
|
|
|
|
|
Line 393... |
Line 354... |
{
|
{
|
push (@port_list, "$decl_dirs{$x_name} $decl_types{$x_name} $q_width $decl_pnames{$x_name}");
|
push (@port_list, "$decl_dirs{$x_name} $decl_types{$x_name} $q_width $decl_pnames{$x_name}");
|
}
|
}
|
}
|
}
|
|
|
|
|
@port_list = sys::lib::trim_sort(@port_list);
|
@port_list = sys::lib::trim_sort(@port_list);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* Now add all ports with their type, size and direction */
|
#/* Now add all ports with their type, size and direction */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
Line 427... |
Line 381... |
print DEST_FILE ",\n ${port_line}";
|
print DEST_FILE ",\n ${port_line}";
|
}
|
}
|
|
|
}
|
}
|
|
|
|
|
|
|
|
|
if ($first == 0) { print DEST_FILE ");\n\n\n\n"; }
|
if ($first == 0) { print DEST_FILE ");\n\n\n\n"; }
|
elsif ($opt_no_port) { print DEST_FILE "\n\n\n\n"; }
|
elsif ($opt_no_port) { print DEST_FILE "\n\n\n\n"; }
|
else { print DEST_FILE "();\n\n\n\n";}
|
else { print DEST_FILE "();\n\n\n\n";}
|
|
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* Add any and all local parameters with their default values */
|
#/* Add any and all local parameters with their default values */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
Line 450... |
Line 398... |
foreach my $parameter_name (@parameters)
|
foreach my $parameter_name (@parameters)
|
{
|
{
|
my $parameter_value = $parameter_values{${parameter_name}};
|
my $parameter_value = $parameter_values{${parameter_name}};
|
print DEST_FILE "parameter ${parameter_name} = ${parameter_value};\n";
|
print DEST_FILE "parameter ${parameter_name} = ${parameter_value};\n";
|
}
|
}
|
|
|
|
|
}
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* Add all internal wires and regs with their sizes */
|
#/* Add all internal wires and regs with their sizes */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
Line 475... |
Line 416... |
}
|
}
|
|
|
print DEST_FILE "\n\n\n";
|
print DEST_FILE "\n\n\n";
|
|
|
|
|
|
while( my $line_out = shift(@instantiations)) { print DEST_FILE "$line_out";}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while( my $line_out = shift(@instantiations))
|
|
|
|
{ print DEST_FILE "$line_out";}
|
|
|
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* After all the data from the ip-xact file has been entered we now */
|
#/* After all the data from the ip-xact file has been entered we now */
|
#/* insert any and all verilog fragments at the end before closing */
|
#/* insert any and all verilog fragments at the end before closing */
|
Line 502... |
Line 430... |
|
|
|
|
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($rtl_file) = $i_name ->findnodes('./text()')->to_literal;
|
my($rtl_file) = $i_name ->findnodes('./text()')->to_literal;
|
my($file_type) = $i_name ->findnodes('../spirit:fileType/text()')->to_literal;
|
my($file_type) = $i_name ->findnodes('../spirit:userFileType/text()')->to_literal;
|
my($view_file) = $i_name ->findnodes('../../spirit:name/text()')->to_literal ;
|
my($view_file) = $i_name ->findnodes('../../spirit:name/text()')->to_literal ;
|
|
|
if(($file_type eq "verilogFragment")&& (($view_file eq $view_fileset_name)))
|
if(($file_type eq "fragment")&& (($view_file eq $view_fileset_name)))
|
{
|
{
|
$SRCFILE ="${home}${prefix}/${vendor}__${project}${lib_comp_sep}/${component}${comp_xml_sep}/${rtl_file}";
|
$SRCFILE ="${home}${prefix}/${vendor}__${project}${lib_comp_sep}/${component}${comp_xml_sep}/${rtl_file}";
|
open(SRCFILE) or die("Could not open src file. $SRCFILE ");
|
open(SRCFILE) or die("Could not open src file. $SRCFILE ");
|
foreach $line ()
|
foreach $line ()
|
{
|
{
|
Line 517... |
Line 445... |
print DEST_FILE "${line}\n";
|
print DEST_FILE "${line}\n";
|
}
|
}
|
}
|
}
|
}
|
}
|
unless ($opt_fragment ) {print DEST_FILE "\n\n\n endmodule\n\n";}
|
unless ($opt_fragment ) {print DEST_FILE "\n\n\n endmodule\n\n";}
|
|
|
}
|
}
|
}
|
|
|
|
#print "\n";
|
|
|
|
|
|
|
|
|
|
|
|
Line 558... |
Line 486... |
|
|
my @out_stack = ();
|
my @out_stack = ();
|
|
|
|
|
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 $spirit_design_file = yp::lib::find_ipxact_design_file($vendor,$project,$component,$version);
|
my @spirit_design_files = yp::lib::find_ipxact_design_files($vendor,$project,$component,$version);
|
|
|
|
|
my $busInterfaceTest = 0;
|
my $busInterfaceTest = 0;
|
|
|
my @mas_slave;
|
my @mas_slave;
|
push @mas_slave , "master";
|
push @mas_slave , "master";
|
Line 653... |
Line 582... |
if ( $busInterfaceTest){
|
if ( $busInterfaceTest){
|
@out_stack = sys::lib::trim_sort(@out_stack);
|
@out_stack = sys::lib::trim_sort(@out_stack);
|
return(@out_stack);
|
return(@out_stack);
|
}
|
}
|
|
|
if($spirit_design_file)
|
|
|
|
|
|
|
|
|
foreach my $sd_file (@spirit_design_files)
|
{
|
{
|
|
|
foreach my $x_name ($spirit_design_file->findnodes('//spirit:hierConnections/spirit:hierConnection/@spirit:interfaceRef'))
|
|
|
foreach my $x_name ($sd_file->findnodes('//spirit:hierConnections/spirit:hierConnection/@spirit:interfaceRef'))
|
{
|
{
|
my($hierConn_name) = $x_name ->to_literal ;
|
my($hierConn_name) = $x_name ->to_literal ;
|
my($hierConn_comref_name) = $x_name ->findnodes('../spirit:interface/@spirit:componentRef')->to_literal ;
|
my($hierConn_comref_name) = $x_name ->findnodes('../spirit:interface/@spirit:componentRef')->to_literal ;
|
my($hierConn_busref_name) = $x_name ->findnodes('../spirit:interface/@spirit:busRef')->to_literal ;
|
my($hierConn_busref_name) = $x_name ->findnodes('../spirit:interface/@spirit:busRef')->to_literal ;
|
if($busref eq $hierConn_name)
|
if($busref eq $hierConn_name)
|
{
|
{
|
foreach my $x_name ($spirit_design_file->findnodes("//spirit:design/spirit:componentInstances/spirit:componentInstance/spirit:instanceName[text() = '$hierConn_comref_name']"))
|
foreach my $x_name ($sd_file->findnodes("//spirit:design/spirit:componentInstances/spirit:componentInstance/spirit:instanceName[text() = '$hierConn_comref_name']"))
|
{
|
{
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* Lookup VLNV for each instantiated component */
|
#/* Lookup VLNV for each instantiated component */
|
#/* */
|
#/* */
|
Line 681... |
Line 613... |
$depth = $depth +1;
|
$depth = $depth +1;
|
@out_stack = parse_busInterface ($vendor_name, $library_name,$component_name,$version_name,$hierConn_busref_name,$depth );
|
@out_stack = parse_busInterface ($vendor_name, $library_name,$component_name,$version_name,$hierConn_busref_name,$depth );
|
}
|
}
|
}
|
}
|
}
|
}
|
|
|
|
}
|
|
|
@out_stack = sys::lib::trim_sort(@out_stack);
|
@out_stack = sys::lib::trim_sort(@out_stack);
|
return(@out_stack);
|
return(@out_stack);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/*********************************************************************************************/
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/*********************************************************************************************/
|
|
|
|
|
|
|
|
|
|
sub parse_design_files
|
|
{
|
|
my @params = @_;
|
|
my $spirit_component_file = pop(@params);
|
|
|
|
print "\n";
|
|
foreach my $new_comp ($spirit_component_file->findnodes("//spirit:component/spirit:vendor"))
|
|
{
|
|
my($new_vendor) = $new_comp->findnodes('./text()')->to_literal ;
|
|
my($new_library) = $new_comp->findnodes('../spirit:library/text()')->to_literal ;
|
|
my($new_name) = $new_comp->findnodes('../spirit:name/text()')->to_literal ;
|
|
my($new_version) = $new_comp->findnodes('../spirit:version/text()')->to_literal ;
|
|
# print "XXXXXX $new_vendor $new_library $new_name $new_version COMPONENT \n";
|
|
}
|
|
|
|
|
|
foreach my $new_comp ($spirit_component_file->findnodes("//spirit:component/spirit:model/spirit:views/spirit:view/spirit:hierarchyRef"))
|
|
{
|
|
my($new_vendor) = $new_comp->findnodes('./@spirit:vendor')->to_literal ;
|
|
my($new_library) = $new_comp->findnodes('./@spirit:library')->to_literal ;
|
|
my($new_name) = $new_comp->findnodes('./@spirit:name')->to_literal ;
|
|
my($new_version) = $new_comp->findnodes('./@spirit:version')->to_literal ;
|
|
|
|
|
|
my $foo = yp::lib::find_file_type($new_vendor,$new_library,$new_name,$new_version) ;
|
|
|
|
# print "XXXXXZ $new_vendor $new_library $new_name $new_version $foo\n";
|
|
|
|
if($foo eq "spirit:component")
|
|
{
|
|
parse_design_files($parser->parse_file(yp::lib::find_ipxact("spirit:component",$new_vendor,$new_library,$new_name,$new_version )) );
|
|
}
|
|
|
|
elsif($foo eq "spirit:design")
|
|
{
|
|
parse_design_file($parser->parse_file(yp::lib::find_ipxact("spirit:design",$new_vendor,$new_library,$new_name,$new_version )) );
|
|
# print "XXXXXA+ $new_vendor $new_library $new_name $new_version \n";
|
|
|
|
}
|
|
|
|
elsif($foo eq "spirit:designConfiguration")
|
|
{
|
|
|
|
my $spirit_designCfg_file
|
|
= $parser->parse_file(yp::lib::find_ipxact("spirit:designConfiguration",$new_vendor,$new_library,$new_name,$new_version ));
|
|
|
|
foreach my $design_ref_view ($spirit_designCfg_file->findnodes('//spirit:designConfiguration'))
|
|
{
|
|
my($hier_xref_vendor) = $design_ref_view->findnodes('./spirit:designRef/@spirit:vendor')->to_literal ;
|
|
my($hier_xref_library) = $design_ref_view->findnodes('./spirit:designRef/@spirit:library')->to_literal ;
|
|
my($hier_xref_component) = $design_ref_view->findnodes('./spirit:designRef/@spirit:name')->to_literal ;
|
|
my($hier_xref_version) = $design_ref_view->findnodes('./spirit:designRef/@spirit:version')->to_literal ;
|
|
parse_design_file($parser->parse_file(yp::lib::find_ipxact("spirit:design",$hier_xref_vendor,$hier_xref_library,$hier_xref_component,$hier_xref_version)));
|
|
# print "XXXXXA- $hier_xref_vendor $hier_xref_library $hier_xref_component $hier_xref_version \n";
|
|
}
|
|
}
|
|
|
}
|
}
|
|
|
}
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/*********************************************************************************************/
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/*********************************************************************************************/
|
|
|
|
|
|
|
|
|
|
sub process_design_files
|
|
{
|
|
my @params = @_;
|
|
my $spirit_component_file = pop(@params);
|
|
|
|
print "\n";
|
|
foreach my $new_comp ($spirit_component_file->findnodes("//spirit:component/spirit:vendor"))
|
|
{
|
|
my($new_vendor) = $new_comp->findnodes('./text()')->to_literal ;
|
|
my($new_library) = $new_comp->findnodes('../spirit:library/text()')->to_literal ;
|
|
my($new_name) = $new_comp->findnodes('../spirit:name/text()')->to_literal ;
|
|
my($new_version) = $new_comp->findnodes('../spirit:version/text()')->to_literal ;
|
|
# print "xXXXXX $new_vendor $new_library $new_name $new_version COMPONENT \n";
|
|
}
|
|
|
|
|
|
foreach my $new_comp ($spirit_component_file->findnodes("//spirit:component/spirit:model/spirit:views/spirit:view/spirit:hierarchyRef"))
|
|
{
|
|
my($new_vendor) = $new_comp->findnodes('./@spirit:vendor')->to_literal ;
|
|
my($new_library) = $new_comp->findnodes('./@spirit:library')->to_literal ;
|
|
my($new_name) = $new_comp->findnodes('./@spirit:name')->to_literal ;
|
|
my($new_version) = $new_comp->findnodes('./@spirit:version')->to_literal ;
|
|
|
|
|
|
my $foo = yp::lib::find_file_type($new_vendor,$new_library,$new_name,$new_version) ;
|
|
|
|
# print "xXXXXZ $new_vendor $new_library $new_name $new_version $foo\n";
|
|
|
|
if($foo eq "spirit:component")
|
|
{
|
|
process_design_files($parser->parse_file(yp::lib::find_ipxact("spirit:component",$new_vendor,$new_library,$new_name,$new_version )) );
|
|
}
|
|
|
|
elsif($foo eq "spirit:design")
|
|
{
|
|
process_design_file($parser->parse_file(yp::lib::find_ipxact("spirit:design",$new_vendor,$new_library,$new_name,$new_version )) );
|
|
# print "xXXXXA+ $new_vendor $new_library $new_name $new_version \n";
|
|
|
|
}
|
|
|
|
elsif($foo eq "spirit:designConfiguration")
|
|
{
|
|
|
|
my $spirit_designCfg_file
|
|
= $parser->parse_file(yp::lib::find_ipxact("spirit:designConfiguration",$new_vendor,$new_library,$new_name,$new_version ));
|
|
|
|
foreach my $design_ref_view ($spirit_designCfg_file->findnodes('//spirit:designConfiguration'))
|
|
{
|
|
my($hier_xref_vendor) = $design_ref_view->findnodes('./spirit:designRef/@spirit:vendor')->to_literal ;
|
|
my($hier_xref_library) = $design_ref_view->findnodes('./spirit:designRef/@spirit:library')->to_literal ;
|
|
my($hier_xref_component) = $design_ref_view->findnodes('./spirit:designRef/@spirit:name')->to_literal ;
|
|
my($hier_xref_version) = $design_ref_view->findnodes('./spirit:designRef/@spirit:version')->to_literal ;
|
|
process_design_file($parser->parse_file(yp::lib::find_ipxact("spirit:design",$hier_xref_vendor,$hier_xref_library,$hier_xref_component,$hier_xref_version)));
|
|
# print "xXXXXA- $hier_xref_vendor $hier_xref_library $hier_xref_component $hier_xref_version \n";
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
Line 710... |
Line 816... |
my $spirit_design_file = pop(@params);
|
my $spirit_design_file = pop(@params);
|
|
|
|
|
|
|
|
|
|
|
|
print "\n";
|
|
foreach my $new_comp ($spirit_design_file->findnodes("//spirit:design/spirit:vendor"))
|
|
{
|
|
my($new_vendor) = $new_comp->findnodes('./text()')->to_literal ;
|
|
my($new_library) = $new_comp->findnodes('../spirit:library/text()')->to_literal ;
|
|
my($new_name) = $new_comp->findnodes('../spirit:name/text()')->to_literal ;
|
|
my($new_version) = $new_comp->findnodes('../spirit:version/text()')->to_literal ;
|
|
# print "XXXXXX $new_vendor $new_library $new_name $new_version DESIGN \n";
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* Read each hierConnection and enter signals into wire_decs */
|
#/* Read each hierConnection and enter signals into wire_decs */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
Line 1048... |
Line 1170... |
else {$inst_right{"${t_instance}_${t_busref_name}_${t_index}"} = "${t_right}";}
|
else {$inst_right{"${t_instance}_${t_busref_name}_${t_index}"} = "${t_right}";}
|
|
|
}
|
}
|
}
|
}
|
}
|
}
|
|
|
|
|
@inst_names = sys::lib::trim_sort(@inst_names);
|
@inst_names = sys::lib::trim_sort(@inst_names);
|
|
|
foreach $i_name (@inst_names)
|
foreach $i_name (@inst_names)
|
{
|
{
|
|
|
|
|
unless($inst_Inames{$i_name} eq "none")
|
unless($inst_Inames{$i_name} eq "none")
|
{
|
{
|
if($inst_vector{$i_name} eq "vector" )
|
if($inst_vector{$i_name} eq "vector" )
|
{
|
{
|
|
|
|
|
|
|
push @inst_conns ,":::$inst_Inames{$i_name}:::adhoc:::$inst_ports{$i_name}:::$inst_sigs{$i_name}:::vector:::$inst_left{$i_name}:::$inst_right{$i_name}:::\n";
|
push @inst_conns ,":::$inst_Inames{$i_name}:::adhoc:::$inst_ports{$i_name}:::$inst_sigs{$i_name}:::vector:::$inst_left{$i_name}:::$inst_right{$i_name}:::\n";
|
}
|
}
|
else
|
else
|
{
|
{
|
push @inst_conns ,":::$inst_Inames{$i_name}:::adhoc:::$inst_ports{$i_name}:::$inst_sigs{$i_name}:::scaler:::none:::none:::\n";
|
push @inst_conns ,":::$inst_Inames{$i_name}:::adhoc:::$inst_ports{$i_name}:::$inst_sigs{$i_name}:::scaler:::none:::none:::\n";
|
|
|
}
|
}
|
}
|
}
|
|
}
|
}
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/*********************************************************************************************/
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/ */
|
|
#/*********************************************************************************************/
|
|
|
|
|
|
|
|
|
|
sub process_design_file
|
|
{
|
|
my @params = @_;
|
|
my $spirit_design_file = pop(@params);
|
|
|
|
|
|
|
|
|
|
|
|
print "\n";
|
|
foreach my $new_comp ($spirit_design_file->findnodes("//spirit:design/spirit:vendor"))
|
|
{
|
|
my($new_vendor) = $new_comp->findnodes('./text()')->to_literal ;
|
|
my($new_library) = $new_comp->findnodes('../spirit:library/text()')->to_literal ;
|
|
my($new_name) = $new_comp->findnodes('../spirit:name/text()')->to_literal ;
|
|
my($new_version) = $new_comp->findnodes('../spirit:version/text()')->to_literal ;
|
|
# print "XXXXXX- $new_vendor $new_library $new_name $new_version DESIGN \n";
|
|
}
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
Line 1182... |
Line 1317... |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/*********************************************************************************************/
|
#/*********************************************************************************************/
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
#/ */
|
Line 1202... |
Line 1339... |
my $spirit_component_file = pop(@params);
|
my $spirit_component_file = pop(@params);
|
|
|
|
|
|
|
|
|
|
print "\n";
|
|
foreach my $new_comp ($spirit_component_file->findnodes("//spirit:component/spirit:vendor"))
|
|
{
|
|
my($new_vendor) = $new_comp->findnodes('./text()')->to_literal ;
|
|
my($new_library) = $new_comp->findnodes('../spirit:library/text()')->to_literal ;
|
|
my($new_name) = $new_comp->findnodes('../spirit:name/text()')->to_literal ;
|
|
my($new_version) = $new_comp->findnodes('../spirit:version/text()')->to_literal ;
|
|
# print "XXXXXX $new_vendor $new_library $new_name $new_version COMPONENT \n";
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach my $new_comp ($spirit_component_file->findnodes("//spirit:component/spirit:model/spirit:views/spirit:view/spirit:hierarchyRef"))
|
|
{
|
|
my($new_vendor) = $new_comp->findnodes('./@spirit:vendor')->to_literal ;
|
|
my($new_library) = $new_comp->findnodes('./@spirit:library')->to_literal ;
|
|
my($new_name) = $new_comp->findnodes('./@spirit:name')->to_literal ;
|
|
my($new_version) = $new_comp->findnodes('./@spirit:version')->to_literal ;
|
|
|
|
|
|
my $foo = yp::lib::find_file_type($new_vendor,$new_library,$new_name,$new_version) ;
|
|
|
|
# print "XXXXXZ $new_vendor $new_library $new_name $new_version $foo\n";
|
|
|
|
if($foo eq "spirit:component")
|
|
{
|
|
my $spirit_sub_component_file = $parser->parse_file(yp::lib::find_ipxact("spirit:component",$new_vendor,$new_library,$new_name,$new_version));
|
|
parse_component_file($spirit_sub_component_file);
|
|
}
|
|
|
|
elsif($foo eq "spirit:design")
|
|
{
|
|
|
|
|
|
}
|
|
|
|
elsif($foo eq "spirit:designConfiguration")
|
|
{
|
|
|
|
my $spirit_designCfg_file
|
|
= $parser->parse_file(yp::lib::find_ipxact("spirit:designConfiguration",$new_vendor,$new_library,$new_name,$new_version ));
|
|
|
|
foreach my $design_ref_view ($spirit_designCfg_file->findnodes('//spirit:designConfiguration'))
|
|
{
|
|
my($hier_xref_vendor) = $design_ref_view->findnodes('./spirit:designRef/@spirit:vendor')->to_literal ;
|
|
my($hier_xref_library) = $design_ref_view->findnodes('./spirit:designRef/@spirit:library')->to_literal ;
|
|
my($hier_xref_component) = $design_ref_view->findnodes('./spirit:designRef/@spirit:name')->to_literal ;
|
|
my($hier_xref_version) = $design_ref_view->findnodes('./spirit:designRef/@spirit:version')->to_literal ;
|
|
|
|
my $spirit_design_file = $parser->parse_file(yp::lib::find_ipxact("spirit:design",$hier_xref_vendor,$hier_xref_library,$hier_xref_component,$hier_xref_version));
|
|
|
|
# print "XXXXXA $hier_xref_vendor $hier_xref_library $hier_xref_component $hier_xref_version \n";
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
#/**********************************************************************/
|
#/**********************************************************************/
|
#/* */
|
#/* */
|
#/* Read each busInterface and save master/slave direction */
|
#/* Read each busInterface and save master/slave direction */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|