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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [bin/] [xilinx_vhdl_chop] - Diff between revs 2 and 24

Only display areas with differences | Details | Blame | View Log

Rev 2 Rev 24
#!/usr/bin/perl -w
#!/usr/bin/perl -w
# $Id: xilinx_vhdl_chop 314 2010-07-09 17:38:41Z mueller $
# $Id: xilinx_vhdl_chop 314 2010-07-09 17:38:41Z mueller $
#
#
# Copyright 2007- by Walter F.J. Mueller 
# Copyright 2007- by Walter F.J. Mueller 
#
#
# This program is free software; you may redistribute and/or modify it under
# This program is free software; you may redistribute and/or modify it under
# the terms of the GNU General Public License as published by the Free
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 2, or at your option any later version.
# Software Foundation, either version 2, or at your option any later version.
#
#
# This program is distributed in the hope that it will be useful, but
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for complete details.
# for complete details.
#
#
#  Revision History:
#  Revision History:
# Date         Rev  Vers    Comment
# Date         Rev  Vers    Comment
# 2007-06-06    50   1.0    Initial version
# 2007-06-06    50   1.0    Initial version
#
#
# splits a xilinx unisim_VITAL.vhd file along separators looking like:
# splits a xilinx unisim_VITAL.vhd file along separators looking like:
#
#
#   -- $Header: /and5b1.vhd,v 1.4 2004/04/08 18:46:23 patrickp Exp $
#   -- $Header: /and5b1.vhd,v 1.4 2004/04/08 18:46:23 patrickp Exp $
#
#
use 5.003;                                  # require Perl 5.003 or higher
use 5.003;                                  # require Perl 5.003 or higher
use strict;                                 # require strict checking
use strict;                                 # require strict checking
while (<>) {
while (<>) {
  chomp;
  chomp;
  my @line = split;
  my @line = split;
  if (/^-- \$Header/) {
  if (/^-- \$Header/) {
    my @file = split(/\//,$line[2]);
    my @file = split(/\//,$line[2]);
    my $name = $file[$#file];
    my $name = $file[$#file];
    $name =~ s/,v//;
    $name =~ s/,v//;
    print "writing $name \n";
    print "writing $name \n";
    close(OFILE);
    close(OFILE);
    open(OFILE, "> $name") or die "Couldn't open output file: $!\n";
    open(OFILE, "> $name") or die "Couldn't open output file: $!\n";
  }
  }
  print OFILE $_,"\n";
  print OFILE $_,"\n";
}
}
close(OFILE);
close(OFILE);
 
 

powered by: WebSVN 2.1.0

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