Line 1... |
Line 1... |
eval 'exec `which perl` -S $0 ${1+"$@"}'
|
eval 'exec `which perl` -S $0 ${1+"$@"}'
|
if 0;
|
if 0;
|
#/**********************************************************************/
|
#/****************************************************************************/
|
#/* */
|
|
#/* ------- */
|
|
#/* / SOC \ */
|
|
#/* / GEN \ */
|
|
#/* / TOOL \ */
|
|
#/* ============== */
|
|
#/* | | */
|
|
#/* |____________| */
|
|
#/* */
|
|
#/* */
|
#/* */
|
|
#/* SOCGEN Design for Reuse toolset */
|
#/* */
|
#/* */
|
|
#/* Version 1.0.0 */
|
#/* */
|
#/* */
|
#/* Author(s): */
|
#/* Author(s): */
|
#/* - John Eaton, jt_eaton@opencores.org */
|
#/* - John Eaton, z3qmtr45@gmail.com */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/****************************************************************************/
|
#/* */
|
#/* */
|
#/* Copyright (C) <2010-2011> */
|
|
#/* */
|
#/* */
|
#/* This source file may be used and distributed without */
|
#/* Copyright 2016 John T Eaton */
|
#/* restriction provided that this copyright statement is not */
|
|
#/* removed from the file and that any derivative work contains */
|
|
#/* the original copyright notice and the associated disclaimer. */
|
|
#/* */
|
#/* */
|
#/* This source file is free software; you can redistribute it */
|
#/* Licensed under the Apache License, Version 2.0 (the "License"); */
|
#/* and/or modify it under the terms of the GNU Lesser General */
|
#/* you may not use this file except in compliance with the License. */
|
#/* Public License as published by the Free Software Foundation; */
|
#/* You may obtain a copy of the License at */
|
#/* either version 2.1 of the License, or (at your option) any */
|
|
#/* later version. */
|
|
#/* */
|
#/* */
|
#/* This source is distributed in the hope that it will be */
|
#/* http://www.apache.org/licenses/LICENSE-2.0 */
|
#/* useful, but WITHOUT ANY WARRANTY; without even the implied */
|
|
#/* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR */
|
|
#/* PURPOSE. See the GNU Lesser General Public License for more */
|
|
#/* details. */
|
|
#/* */
|
#/* */
|
#/* You should have received a copy of the GNU Lesser General */
|
#/* Unless required by applicable law or agreed to in writing, software */
|
#/* Public License along with this source; if not, download it */
|
#/* distributed under the License is distributed on an "AS IS" BASIS, */
|
#/* from http://www.opencores.org/lgpl.shtml */
|
#/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
|
#/* See the License for the specific language governing permissions and */
|
|
#/* limitations under the License. */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/* */
|
|
#/****************************************************************************/
|
|
|
|
|
############################################################################
|
############################################################################
|
# General PERL config
|
# General PERL config
|
############################################################################
|
############################################################################
|
Line 144... |
Line 130... |
|
|
if ($sim_comp_path) {$sim_library_path ="${lib_comp_sep}${sim_comp_path}";}
|
if ($sim_comp_path) {$sim_library_path ="${lib_comp_sep}${sim_comp_path}";}
|
else {$sim_library_path = $socgen_file->findnodes("//socgen:componentConfiguration/socgen:sim/socgen:library_path/text()")->to_literal;}
|
else {$sim_library_path = $socgen_file->findnodes("//socgen:componentConfiguration/socgen:sim/socgen:library_path/text()")->to_literal;}
|
|
|
|
|
foreach my $X_view ($spirit_component_file->findnodes("//spirit:component/spirit:model/spirit:views/spirit:view/spirit:envIdentifier[text() = '$envidentifier']"))
|
foreach my $X_view ($spirit_component_file->findnodes("//ipxact:component/ipxact:model/ipxact:views/ipxact:view/ipxact:envIdentifier[text() = '$envidentifier']"))
|
{
|
{
|
$view = $X_view->findnodes('../spirit:name/text()')->to_literal ;
|
$view = $X_view->findnodes('../ipxact:name/text()')->to_literal ;
|
}
|
}
|
|
|
my $path = "${home}${prefix}/${vendor}__${library}${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 );
|
|
|
Line 200... |
Line 186... |
#/* 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:name[text() = '$view']" ))
|
foreach my $comp_view ($spirit_component_file->findnodes("//ipxact:component/ipxact:model/ipxact:views/ipxact:view/ipxact:name[text() = '$view']" ))
|
{
|
{
|
my($view_fileset_name) = $comp_view->findnodes('../spirit:fileSetRef/spirit:localName/text()')->to_literal ;
|
my($view_fileset_name) = $comp_view->findnodes('../ipxact:fileSetRef/ipxact:localName/text()')->to_literal ;
|
|
|
|
|
|
|
if($configuration eq "default")
|
if($configuration eq "default")
|
{
|
{
|
$outfile ="${home}${prefix}/${vendor}__${library}${lib_comp_sep}${component}${comp_xml_sep}/${dest_dir}/${view}/${destination}";
|
$outfile ="${home}${prefix}/${vendor}__${library}${lib_comp_sep}${component}${comp_xml_sep}/${dest_dir}/${view}/${destination}";
|
}
|
}
|
Line 367... |
Line 355... |
}
|
}
|
else
|
else
|
{
|
{
|
my $q_width = " ";
|
my $q_width = " ";
|
if( ${vector} eq "vector" ) { $q_width = "[ $left : $right]";}
|
if( ${vector} eq "vector" ) { $q_width = "[ $left : $right]";}
|
if( $direction eq "node" ) { push @wire_nodes, "$type $q_width ${port_name};";}
|
push @wire_nodes, "$type $q_width ${port_name};";
|
}
|
}
|
}
|
}
|
|
|
@port_list = sys::lib::trim_sort(@port_list);
|
@port_list = sys::lib::trim_sort(@port_list);
|
|
|
Line 441... |
Line 429... |
#/* insert any and all verilog fragments at the end before closing */
|
#/* insert any and all verilog fragments at the end before closing */
|
#/* the module */
|
#/* the module */
|
#/* */
|
#/* */
|
#/**********************************************************************/
|
#/**********************************************************************/
|
|
|
|
if(defined $view_fileset_name & length $view_fileset_name > 0)
|
|
{
|
my @fragments = yp::lib::get_files($vendor,$library,$component,$version,$view_fileset_name,"fragment") ;
|
my @fragments = yp::lib::get_files($vendor,$library,$component,$version,$view_fileset_name,"fragment") ;
|
|
|
foreach my $fragment(@fragments)
|
foreach my $fragment(@fragments)
|
{
|
{
|
$SRCFILE ="${home}${prefix}/${fragment}";
|
$SRCFILE ="${home}${prefix}/${fragment}";
|
Line 453... |
Line 442... |
foreach $line ()
|
foreach $line ()
|
{
|
{
|
chomp($line);
|
chomp($line);
|
print DEST_FILE "${line}\n";
|
print DEST_FILE "${line}\n";
|
}
|
}
|
|
|
}
|
}
|
|
}
|
|
|
|
|
print DEST_FILE "\n\n\n endmodule\n\n";
|
print DEST_FILE "\n\n\n endmodule\n\n";
|
}
|
}
|
|
|
1
|
1
|