URL
https://opencores.org/ocsvn/w11/w11/trunk
[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [bin/] [xilinx_vhdl_chop] - Blame information for rev 31
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
2 |
wfjm |
#!/usr/bin/perl -w
|
2 |
|
|
# $Id: xilinx_vhdl_chop 314 2010-07-09 17:38:41Z mueller $
|
3 |
|
|
#
|
4 |
|
|
# Copyright 2007- by Walter F.J. Mueller
|
5 |
|
|
#
|
6 |
|
|
# This program is free software; you may redistribute and/or modify it under
|
7 |
|
|
# the terms of the GNU General Public License as published by the Free
|
8 |
|
|
# Software Foundation, either version 2, or at your option any later version.
|
9 |
|
|
#
|
10 |
|
|
# This program is distributed in the hope that it will be useful, but
|
11 |
|
|
# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
12 |
|
|
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
13 |
|
|
# for complete details.
|
14 |
|
|
#
|
15 |
|
|
# Revision History:
|
16 |
|
|
# Date Rev Vers Comment
|
17 |
|
|
# 2007-06-06 50 1.0 Initial version
|
18 |
|
|
#
|
19 |
|
|
# splits a xilinx unisim_VITAL.vhd file along separators looking like:
|
20 |
|
|
#
|
21 |
|
|
# -- $Header: /and5b1.vhd,v 1.4 2004/04/08 18:46:23 patrickp Exp $
|
22 |
|
|
#
|
23 |
|
|
|
24 |
|
|
use 5.003; # require Perl 5.003 or higher
|
25 |
|
|
use strict; # require strict checking
|
26 |
|
|
|
27 |
|
|
while (<>) {
|
28 |
|
|
chomp;
|
29 |
|
|
my @line = split;
|
30 |
|
|
if (/^-- \$Header/) {
|
31 |
|
|
my @file = split(/\//,$line[2]);
|
32 |
|
|
my $name = $file[$#file];
|
33 |
|
|
$name =~ s/,v//;
|
34 |
|
|
print "writing $name \n";
|
35 |
|
|
close(OFILE);
|
36 |
|
|
open(OFILE, "> $name") or die "Couldn't open output file: $!\n";
|
37 |
|
|
}
|
38 |
|
|
print OFILE $_,"\n";
|
39 |
|
|
}
|
40 |
|
|
close(OFILE);
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.