From d8198e15770a66cad14c4fd8e1eaae7b718d998b Mon Sep 17 00:00:00 2001 From: Manuel Penschuck Date: Wed, 15 Oct 2014 22:02:30 +0200 Subject: [PATCH] CreateProject: Now supports verilog-includePath and FDC files. Generates ldf-files version 3.2 --- base/create_project.pl | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/base/create_project.pl b/base/create_project.pl index dfb4e74..9a20899 100755 --- a/base/create_project.pl +++ b/base/create_project.pl @@ -10,6 +10,7 @@ use warnings; use Data::Dumper; use File::Copy; use Term::ANSIColor; +use Cwd 'abs_path'; sub parsePRJ { my $input = shift; @@ -23,9 +24,11 @@ sub parsePRJ { $options->{$1} = $2; } - if ($line =~ m/^\s*add_file -(vhdl|verilog)( -lib "?([^"\s]+)"?|)? "?([^"]+)"?$/g) { + if ($line =~ m/^\s*add_file -(vhdl|verilog|fpga_constraint)( -lib "?([^"\s]+)"?|)? "?([^"]+)"?$/g) { push @files, [$3, $4]; } + + } close FH; @@ -49,13 +52,22 @@ sub generateLDF { $prj_title =~ s/trb3_(central|periph)_(.+)/$2/; my $def_impl = $options->{'top_module'}; + + my $inclPath = $options->{'include_path'}; + $inclPath = '' if (!$inclPath); + $inclPath =~ s/\{(.*)\}$/$1/; + #$inclPath = abs_path($inclPath) if ($inclPath); print FH "\n"; - print FH "\n"; + print FH "\n"; print FH " \n"; print FH " \n"; - print FH " \n"; - + print FH " \n"; + print FH " \n"; + + my $lpf_included = 0; for my $filer (@{$files}) { @@ -71,6 +83,8 @@ sub generateLDF { } elsif ("lpf" eq $suffix) { print FH " \n"; $lpf_included = 1; + } elsif ("fdc" eq $suffix) { + print FH " \n"; } else { print "WARNING: Could not determine type of input file $file. Not included!\n"; } -- 2.43.0