]> jspc29.x-matter.uni-frankfurt.de Git - trb3sc.git/commitdiff
fixing compile script for errors on lxhadeb07
authorJan Michel <j.michel@gsi.de>
Mon, 26 Oct 2015 17:52:05 +0000 (18:52 +0100)
committerJan Michel <j.michel@gsi.de>
Mon, 26 Oct 2015 17:52:05 +0000 (18:52 +0100)
scripts/compile.pl

index 536fef0345f7238e9edfdb5f559755997d9dc151..8a7835af1b91ce08116dfeccfe771078c86b8b40 100755 (executable)
@@ -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 <OPTIONS><ARGUMENTS>\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) {