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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.61/] [tools/] [bin/] [xilinx_vhdl_chop] - Rev 26

Compare with Previous | Blame | View Log

#!/usr/bin/perl -w
# $Id: xilinx_vhdl_chop 314 2010-07-09 17:38:41Z mueller $
#
# Copyright 2007- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# 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
# 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
# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for complete details.
#
#  Revision History: 
# Date         Rev  Vers    Comment
# 2007-06-06    50   1.0    Initial version
#
# splits a xilinx unisim_VITAL.vhd file along separators looking like:
#
#   -- $Header: <path>/and5b1.vhd,v 1.4 2004/04/08 18:46:23 patrickp Exp $
#

use 5.003;                                  # require Perl 5.003 or higher
use strict;                                 # require strict checking

while (<>) {
  chomp;
  my @line = split;
  if (/^-- \$Header/) {
    my @file = split(/\//,$line[2]);
    my $name = $file[$#file];
    $name =~ s/,v//;
    print "writing $name \n";
    close(OFILE);
    open(OFILE, "> $name") or die "Couldn't open output file: $!\n";
  }
  print OFILE $_,"\n";
}
close(OFILE);

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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