From 1d61f54e9ff96c0bbbae150591ba7b0a932aba87 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Mon, 26 Oct 2015 18:52:05 +0100 Subject: [PATCH] fixing compile script for errors on lxhadeb07 --- scripts/compile.pl | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/scripts/compile.pl b/scripts/compile.pl index 536fef0..8a7835a 100755 --- a/scripts/compile.pl +++ b/scripts/compile.pl @@ -16,7 +16,8 @@ my $lm_license_file_for_synplify = $config{lm_license_file_for_synplify}; my $lm_license_file_for_par = $config{lm_license_file_for_par}; my $synplify_command = $config{synplify_command}; -my $synplify_locale_workaround = "en_US\@UTF-8"; +#my $synplify_locale_workaround = "en_US\@UTF-8"; +my $synplify_locale_workaround = "C"; my $lattice_bin_path = "$lattice_path/bin/lin64"; # note the lin/lin64 at the end, no isfgpa needed my $include_TDC = $config{include_TDC} || 0; @@ -57,6 +58,8 @@ my $result = GetOptions ( "g|guide" => \$guidefile, ); + + if($help) { print "Usage: compile_priph_gsi.de \n\n"; print "-h --help\tPrints the usage manual.\n"; @@ -84,15 +87,16 @@ if ($syn!=0 || $map!=0 || $par!=0 || $timing!=0 || $bitgen!=0){ # source the standard lattice environment $ENV{bindir}="$lattice_bin_path"; -open my $SOURCE, "bash -c '. $lattice_bin_path/diamond_env >& /dev/null; env'|" or - die "Can't fork: $!"; -while (<$SOURCE>) { - if (/^(.*)=(.*)/) { - $ENV{$1} = ${2} ; - } -} -close $SOURCE; +#open my $SOURCE, "bash -c '. $lattice_bin_path/diamond_env >& /dev/null; env'|" or +# die "Can't fork: $!"; +#while (<$SOURCE>) { +# if (/^(.*)=(.*)/) { +# print "setting A:$1 nach ${2}\n"; +# $ENV{$1} = ${2} ; +# } +#} +#close $SOURCE; $ENV{'PAR_DESIGN_NAME'}=$TOPNAME; @@ -103,6 +107,8 @@ $ENV{'LM_LICENSE_FILE'}=$lm_license_file_for_synplify; $ENV{'SYNPLIFY_BINARY'}=$config{synplify_binary}; + + my $FAMILYNAME="LatticeECP3"; my $DEVICENAME="LFE3-150EA"; my $PACKAGE="FPBGA1156"; @@ -116,12 +122,16 @@ unless(-d $WORKDIR) { system("ln -sfT $lattice_path $WORKDIR/lattice-diamond"); + if($con==1 || $all==1){ #create full lpf file print GREEN, "Generating constraints file...\n\n", RESET; system("cp ../pinout/$pinout_file.lpf $WORKDIR/$TOPNAME.lpf"); + # system("cat ../pinout/trb3sc_basic.lpf >> $WORKDIR/$TOPNAME.lpf"); - system("cat ../pinout/basic_constraints.lpf >> $WORKDIR/$TOPNAME.lpf"); + my $c = "cat ../pinout/basic_constraints.lpf >> $WORKDIR/$TOPNAME.lpf"; + system($c); + system("cat $TOPNAME.lpf >> $WORKDIR/$TOPNAME.lpf"); if($include_TDC) { @@ -361,6 +371,7 @@ sub execute { my ($c, $op) = @_; #print "option: $op \n"; $op = "" if(!$op); + $c = ". $lattice_bin_path/diamond_env; " . $c; print GREEN, "\n\ncommand to execute: $c \n", RESET; $r=system($c); if($r) { -- 2.43.0