#!/usr/bin/perl # ------------------------------------------------------------------------------ # update_ise # replace ucf and vhd filelocation and name in the Xilinx xise project file # Help Parameter : # Parameter : update_ise.pl # ------------------------------------------------------------------------------ # Changelog: # 2019-06-12 : zas # * All parameters given with agruments instead of env variables # 2015-05-26 : guo # * update to environment from HELS v.15.0526 # 2012-05-27 : cof # * Initial release # ------------------------------------------------------------------------------ $separator = '-' x 79; $indent = ' ' x 2; $iseFileSpec = $ARGV[0]; $vhdlFileSpec = $ARGV[1]; $ucfFileSpec = $ARGV[2]; $verbose = 1; if ($verbose == 1) { print "Script Parameters:\n"; print " * iseFileSpec: $iseFileSpec\n"; print " * vhdlFileSpec: $vhdlFileSpec\n"; print " * ucfFileSpec: $ucfFileSpec\n"; } #------------------------------------------------------------------------------- # program I/O files # $tempFileSpec = $iseFileSpec . '.tmp'; if ($verbose == 1) { print "\n$separator\n"; print "Updating file specifications in $iseFileSpec\n"; print $indent, "temporary file spec: $tempFileSpec\n"; } #------------------------------------------------------------------------------- # read original file, edit and save to temporary file # my $line; open(ISEFile, $iseFileSpec) || die "couldn't open $iseFileSpec!"; open(tempFile, ">$tempFileSpec"); while (chop($line = )) { # replace VHDL files if ($line =~ m/FILE_VHDL/i) { $line =~ s/