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

Subversion Repositories hwlu

[/] [hwlu/] [trunk/] [syn/] [xst/] [bin/] [change_dw.pl] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 kavi
#! /usr/bin/perl
2
#
3
# File       : change_dw.pl
4
# Description: Changes values for the DW generic at declaration site.
5
#              To be used with the "hw_loops<num>_top.vhd" top-level file.
6
#              Resulting file is expected to be renamed to 
7
#              "hw_loops<num>_top_fix.vhd".
8
# Usage      : ./change_dw.pl <file.vhd> <dw>
9
#
10
# Author     : Nikolaos Kavvadias (c) 2010
11
#
12
 
13
open(FILE1,"<$ARGV[0]")|| die "## cannot open file $ARGV[0]\n";
14
 
15
$dw_ix  = 0;
16
 
17
while ($line = <FILE1>)
18
{
19
  if ($line =~ m/.*DW.*:.*integer.*8/)
20
  {
21
    if ($dw_ix < 1)
22
    {
23
      $line =~ s//    DW  : integer := $ARGV[1]/;
24
      $dw_ix = 1;
25
    }
26
  }
27
  print $line;
28
}

powered by: WebSVN 2.1.0

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